/* public/assets/css/s35-awards.css
   KHMER HRMS — Staff Awards (M17)
   Season: S35 — Staff Awards
   Loaded unconditionally in layouts/main.php (on-screen) and
   print_page_start.php (print/PDF) — same always-loaded, namespaced
   convention already established by s34-certifications.css, so
   nothing here can collide with any other page. Uses only the
   existing CSS variables (--primary, --surface, --border, --text,
   --text-muted, etc.) so Day/Night mode and the 5 color themes work
   with zero extra code (Rule: CSS variables only, never hardcoded
   colors, outside the print certificate's own deliberately fixed
   gold/navy palette — a certificate is a physical/PDF artifact handed
   to a third party, so it always renders identically regardless of
   the viewer's on-screen theme, exactly like certifications'
   .cert-frame and hr_card_templates' printed card faces already do).
*/

/* ── On-screen: award type badge (index/show/leaderboard) ── */
.award-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    color: var(--primary);
    white-space: nowrap;
}

/* ── On-screen: leaderboard podium + rows ── */
.award-leaderboard-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 767px) {
    .award-leaderboard-podium { grid-template-columns: 1fr; }
}
.award-podium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.award-podium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.07);
}
.award-podium-card.rank-1 { border-color: #D97706; order: 2; }
.award-podium-card.rank-2 { order: 1; }
.award-podium-card.rank-3 { order: 3; }
@media (max-width: 767px) {
    .award-podium-card.rank-1, .award-podium-card.rank-2, .award-podium-card.rank-3 { order: initial; }
}
.award-podium-medal {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.1rem; font-weight: 700;
    color: #fff;
}
.award-podium-medal.medal-1 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.award-podium-medal.medal-2 { background: linear-gradient(135deg, #CBD5E1, #94A3B8); }
.award-podium-medal.medal-3 { background: linear-gradient(135deg, #D6A277, #B57A4A); }
.award-podium-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 8px;
    border: 2px solid var(--border);
    display: block;
}
.award-podium-name { font-weight: 700; font-size: 0.95rem; }
.award-podium-count { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.award-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.award-leaderboard-row:last-child { border-bottom: none; }
.award-leaderboard-rank {
    width: 28px; text-align: center; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.award-leaderboard-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ── Print: Award Certificate (A4 Landscape, fixed design) ──
   Namespaced .award-cert-* — harmless on any other print document
   sharing print_page_start.php/print_page_end.php's shared shell. */
.award-cert-canvas {
    box-sizing: border-box;
    overflow: hidden;
    page-break-inside: avoid;
    break-inside: avoid;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.award-cert-frame {
    width: 100%;
    height: 100%;
    border: 3px solid #D97706;
    outline: 1px solid #F5D9A8;
    outline-offset: -8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
}
.award-cert-body { text-align: center; width: 100%; }
.award-cert-trophy { font-size: 34pt; line-height: 1; margin-bottom: 4px; }
.award-cert-title { font-size: 22pt; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #1E3A5F; margin-bottom: 2px; }
.award-cert-subtitle { font-size: 13pt; color: #3A3A4A; margin-bottom: 14px; }
.award-cert-lead { font-size: 11pt; color: #555; margin-bottom: 4px; }
.award-cert-name-kh { font-family: 'Moul', serif; font-size: 22pt; margin: 8px 0 2px; color: #1E3A5F; }
.award-cert-name-en { font-size: 12pt; color: #333; margin-bottom: 2px; }
.award-cert-position { font-size: 9pt; color: #777; margin-bottom: 14px; }
.award-cert-award-name { font-size: 17pt; font-weight: 700; color: #92400E; margin: 6px 0 14px; }
.award-cert-desc { font-size: 10pt; color: #555; max-width: 520px; margin: 0 auto 14px; line-height: 1.5; }
.award-cert-meta-table { margin: 0 auto; font-size: 9.5pt; color: #444; }
.award-cert-meta-table td { padding: 2px 12px; }
.award-cert-footer-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 26px; padding: 0 30px; }
.award-cert-sig { text-align: center; font-size: 8.5pt; color: #666; }
.award-cert-sig-line { border-top: 1px solid #999; width: 150px; margin: 0 auto 4px; }
.award-cert-cardno { font-size: 7.5pt; color: #999; }

/* ── On-screen: Grant/Edit Award form layout ──
   Named classes, not an inline grid-template-columns style, so the
   mobile breakpoint below can actually override it — inline styles
   always beat an external stylesheet rule regardless of specificity,
   which is exactly the bug s34-certifications.css's own "PATCH —
   Mobile Responsiveness Audit" comment documents fixing for
   Certifications' create/edit forms. Same fix applied here from the
   start. */
.award-grid-sidebar { grid-template-columns: 1fr 320px; }
@media (max-width: 900px) {
    .award-grid-sidebar { grid-template-columns: 1fr; }
}
.award-form-side { position: sticky; top: 88px; }
.award-form-side .employee-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius, 10px);
    background: var(--surface-alt, rgba(0, 0, 0, .03));
}
.award-form-side .employee-preview-empty {
    padding: 20px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
@media (max-width: 991px) {
    .award-form-side { position: static; }
}
