/* Policy Library - Moodle Database CSS template */

/* Intro box (list header) */
.pl-intro { padding: 12px 16px; margin-bottom: 16px; border-left: 4px solid #4a6fa5; background: #f4f7fb; }
.pl-intro p { margin: 0 0 6px; }

/* At-a-glance box (right column) */
.pl-glance { float: right; width: 240px; max-width: 100%; margin: 0 0 12px 16px; padding: 8px 12px; border: 1px solid #ccc; border-radius: 8px; background: #f7f7f7; font-size: .9em; }
.pl-glance p { margin: 0 0 6px; }

/* Header row: icon on the left, Document Type and Tier stacked on the right */
.pl-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 0; }
.pl-head-text p { margin: 0; }

/* Icon keyed to Document Type (fallback first, then per type) */
.pl-icon { flex: 0 0 auto; }
.pl-icon::before { content: "📄"; display: block; font-size: 42px; line-height: 1; }
.pl-type-Policy .pl-icon::before { content: "📘"; }
.pl-type-Agreement .pl-icon::before { content: "🤝"; }
.pl-type-Waiver .pl-icon::before { content: "🛡️"; }
.pl-type-Procedure .pl-icon::before { content: "🧭"; }
.pl-type-Template .pl-icon::before { content: "🧩"; }
.pl-type-Notice .pl-icon::before { content: "📢"; }

.pl-type { font-weight: bold; font-size: 1.1em; line-height: 1.1; }
.pl-tier { display: inline-block; margin-top: 3px !important; padding: 1px 8px; border-radius: 999px; background: #e3e8ef; font-weight: bold; font-size: .9em; }

/* "+N more" link added by the JavaScript template in list view */
.pl-more { font-weight: bold; text-decoration: none; }

/* Legal review badge colors */
.pl-review-Recommended { color: #8a5a00; }
.pl-review-Essential { color: #a40000; font-weight: bold; }

/* List entry separator: clears the floated box */
.pl-entry-sep { clear: both; border: 0; border-top: 3px solid #000; width: 100%; margin: 16px 0; }

/* Single view */
.pl-title { margin-bottom: 4px; }
.pl-actions { margin-bottom: 12px; }
.pl-notice { display: flow-root; padding: 10px 14px; margin: 12px 0; background: #fff8e1; border-left: 4px solid #e0a800; }
.pl-body { line-height: 1.6; }
.pl-section { clear: both; margin-top: 24px; }
.pl-sources, .pl-license { font-size: .9em; }
.pl-tags { margin-top: 12px; }

/* Add and advanced search forms */
.pl-form .pl-row, .pl-search .pl-row { margin-bottom: 14px; }
.pl-form label, .pl-search label { display: block; margin-bottom: 4px; }
.pl-hint { display: block; font-size: .85em; color: #555; margin-bottom: 4px; }
.pl-internal { padding: 8px; border: 1px dashed #999; }

/* Search bar: sort, order and per-page selects */
select[name="sort"],
select[name="order"],
select[name="perpage"] {
    font-size: 0.7em;
    padding: 2px 6px;
    border: 1px solid #1b760e;
    background-color: #eaf3de;
    color: #4a4a5e;
    --bs-form-select-bg-img: none;
    background-image: none;
}

/* Phones: stack the box above the content */
@media (max-width: 600px) {
  .pl-glance { float: none; width: auto; margin: 0 0 12px; }
}