@import url('../vendor/fontawesome/css/all.min.css');

/* Frontend announcement popup */
.site-popup[hidden] { display: none; }
.site-popup { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.site-popup__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.site-popup__dialog { position: relative; display: flex; flex-direction: column; width: min(480px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden; border: 2px solid var(--primary-color, #fc7f10); border-radius: 16px; background: #fff; color: #172033; box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 24px 64px rgba(15, 23, 42, .24); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .2s ease, transform .2s ease; }
.site-popup .site-popup__dialog:focus, .site-popup .site-popup__dialog:focus-visible { outline: none; }
.site-popup.is-open .site-popup__overlay { opacity: 1; }
.site-popup.is-open .site-popup__dialog { opacity: 1; transform: none; }
.site-popup__close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 36px; height: 36px; min-height: 36px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #475569; box-shadow: 0 1px 3px rgba(15, 23, 42, .14); cursor: pointer; transition: background .15s ease, color .15s ease; }
.site-popup__close:hover { background: #f1f5f9; color: #0f172a; }
.site-popup__media { flex: 0 1 auto; min-height: 0; background: #f8fafc; }
.site-popup__media a { display: block; }
.site-popup__media img { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: contain; }
.site-popup__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 28px 8px; }
.site-popup__title { margin: 0 32px 8px 0; color: #0f172a; font-size: 1.375rem; line-height: 1.3; letter-spacing: -.01em; }
.site-popup__media + .site-popup__body .site-popup__title { margin-right: 0; }
.site-popup__message { margin: 0; color: #475569; font-size: .9375rem; line-height: 1.65; }
.site-popup__footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 12px; padding: 20px 28px 24px; }
.site-popup__btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid transparent; border-radius: 10px; font-family: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.site-popup__btn--primary { background: #e87515; border-color: #e87515; color: #fff; }
.site-popup__btn--primary:hover { background: #cf6410; border-color: #cf6410; color: #fff; }
.site-popup__btn--secondary { background: #fff; border-color: #cbd5e1; color: #334155; }
.site-popup__btn--secondary:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }
.site-popup__dialog--image { width: auto; max-width: min(500px, 100%); border: 0; background: transparent; box-shadow: none; }
.site-popup__dialog--image .site-popup__media { background: transparent; }
.site-popup__dialog--image .site-popup__media img { width: auto; max-width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: 0 auto; border: 2px solid var(--primary-color, #fc7f10); border-radius: 16px; box-shadow: 0 24px 64px rgba(15, 23, 42, .24); }
.site-popup__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 480px) { .site-popup { padding: 16px; } .site-popup__dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); } .site-popup__body { padding: 24px 20px 4px; } .site-popup__footer { flex-direction: column-reverse; padding: 16px 20px 20px; } .site-popup__btn { width: 100%; } .site-popup__dialog--image .site-popup__media img { max-height: calc(100dvh - 32px); } }
@media (prefers-reduced-motion: reduce) { .site-popup__overlay, .site-popup__dialog { transition: none; } .site-popup__dialog { transform: none; } }

/* Shared, scoped usability refinements. Preserve page-specific grids and branding. */
html { scroll-padding-top: 96px; }
body { overflow-wrap: break-word; }
/* Button typography must not replace icon-font glyphs. */
body i[class*="btn-"] { font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; }
body i.fab[class*="btn-"], body i.fa-brands[class*="btn-"] { font-family: 'Font Awesome 6 Brands', 'Font Awesome 5 Brands'; font-weight: 400; }
body .btn-login .spinner { display: none; }
body .btn-login.loading .spinner { display: inline-block; }
body .btn-login.loading .btn-arrow { display: none; }
body :is(.btn.btn, .vp-btn.vp-btn, .nav-login-btn, input[type="submit"], input[type="button"]) {
    min-height: 48px;
    padding: 11px 18px;
    font-size: .9375rem;
    line-height: 1.35;
    white-space: normal;
    gap: 8px;
    border-radius: 10px;
}
body :is(.btn-sm.btn-sm, .btn-xs.btn-xs) { min-height: 44px; padding: 9px 12px; font-size: .875rem; }
body :is(.btn-icon, .icon-btn, .vp-menu-btn, .vp-notif-btn, .vp-sidebar-close, .topbar-btn, .nav-toggle, .mobile-toggle) {
    min-width: 44px;
    min-height: 44px;
}
body :is(.btn-primary, .nav-login-btn) { background: #fc7f10; border-color: #fc7f10; color: #fff; }
body :is(.btn-primary, .nav-login-btn):hover { background: #e06900; border-color: #e06900; color: #fff; }
body :is(.btn, .vp-btn):hover { transform: translateY(-1px); }
body :is(.card, .dashboard-card, .stat-card, .metric-card, .widget):hover { transform: none; }
body :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid #2463a6;
    outline-offset: 3px;
}
body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]) {
    font-size: 1rem;
    min-height: 48px;
}
body :is(.form-help, .help-text, .form-hint) { font-size: .875rem; line-height: 1.5; }
body :is(.form-label, .form-group label) { font-size: .875rem; line-height: 1.5; }
body :is(.admin-content, .vp-content, .portal-content) { min-width: 0; }
body :is(.admin-topbar, .vp-topbar) { gap: 12px; }
body :is(.topbar-left, .vp-topbar-left, .vp-topbar-title-wrap) { min-width: 0; }
body :is(.vp-page-title, .topbar-breadcrumb strong) { overflow-wrap: anywhere; line-height: 1.35; }
body :is(.table-wrap, .table-responsive, .table-container) { max-width: 100%; overflow-x: auto; }
body :is(.alert, .vp-flash) { line-height: 1.6; }
body .vp-nav-link { min-height: 44px; }
body .vp-logout-btn { width: 100%; cursor: pointer; }
body .admin-sidebar .logout-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 12px 14px; border: 0; border-radius: 8px; background: transparent; color: #c9d1d9; font: inherit; text-align: left; cursor: pointer; }
body .admin-sidebar .logout-link:hover { background: #21262d; color: #fff; }
body .admin-sidebar.collapsed .logout-link span { display: none; }
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100000;
    padding: 12px 18px;
    background: #fff;
    color: #172033;
    border: 2px solid #2463a6;
    border-radius: 8px;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
@media (max-width: 640px) {
    body :is(.btn.btn, .vp-btn.vp-btn, .btn-sm.btn-sm, .btn-xs.btn-xs) { min-height: 44px; }
    body :is(.table-wrap, .table-responsive, .table-container) .btn { width: auto; }
    body :is(.vp-content, .admin-content) { padding-inline: 16px; }
    body :is(.vp-topbar, .admin-topbar) { padding-inline: 12px; }
    body :is(.vp-page-title, .topbar-breadcrumb strong) { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
