/* components only — mobile rules in mobile-shell.css */
/* Mathla Platform — static CSS (no Vite, no @apply) */

.font-display, .mathla-serif {
    font-family: var(--font-display, 'Cinzel', 'Zain', Georgia, serif);
}

.mathla-gold-gradient {
    background: linear-gradient(135deg, var(--mathla-primary-light) 0%, var(--mathla-primary) 100%);
}

.mathla-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    color: #fff;
    background-color: var(--mathla-primary);
    text-decoration: none;
    transition: background-color 0.15s ease;
    min-height: 44px;
    border: none;
    cursor: pointer;
}
.mathla-btn-primary:hover { background-color: var(--mathla-primary-dark); }

.mathla-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    border: 2px solid var(--mathla-primary);
    color: var(--mathla-primary-dark);
    background: transparent;
    text-decoration: none;
    min-height: 44px;
    cursor: pointer;
}
.mathla-btn-outline:hover { background-color: rgba(212, 175, 55, 0.08); }

.mathla-btn-apple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    color: #fff;
    background-color: #000;
    text-decoration: none;
    min-height: 44px;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.mathla-btn-apple:hover { background-color: #1a1a1a; color: #fff; }


.mathla-card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(214, 211, 209, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--mathla-primary-light);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--mathla-muted);
    text-decoration: none;
    min-width: 64px;
    min-height: 56px;
}
.mobile-nav-item.active { color: var(--mathla-primary-dark); }

.mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e7e5e4;
    z-index: 50;
}
@media (min-width: 1024px) {
    .mobile-bottom-nav { display: none !important; }
}

.skip-link {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    z-index: 100;
}
.skip-link:focus {
    top: 1rem;
    inset-inline-start: 1rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.5rem 1rem;
    clip: auto;
    overflow: visible;
    background: var(--mathla-primary);
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
}

.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;
}

.safe-area-pb { padding-bottom: env(safe-area-inset-bottom, 0); }

html[dir="rtl"] header .mathla-locale-switcher { direction: ltr; }

/* Auth pages — constrain card; mobile-shell sets .mathla-card { max-width:100% } */
.mathla-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.12), transparent 55%),
        var(--mathla-bg, #f5f5f4);
    color: var(--mathla-text-body, #44403c);
}

.mathla-auth-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
}

.mathla-auth-header__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mathla-auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
    width: 100%;
}

.mathla-auth-card {
    width: 100%;
    max-width: 26rem !important;
    margin: 0 auto;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(214, 211, 209, 0.85);
    box-shadow: 0 10px 40px rgba(0, 27, 58, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 2rem 1.5rem 1.75rem;
    box-sizing: border-box;
}

@media (min-width: 480px) {
    .mathla-auth-card {
        padding: 2.25rem 2rem 2rem;
    }
}

.mathla-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.mathla-auth-brand__mark {
    height: 4.5rem;
    width: auto;
    display: block;
}

.mathla-auth-brand__wordmark {
    font-family: var(--font-display, Georgia, "Times New Roman", serif);
    font-size: 1.55rem;
    letter-spacing: 0.12em;
    color: #001B3A;
    font-weight: 600;
    line-height: 1.1;
}

.mathla-auth-brand__sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #58595B;
    margin-top: 0.2rem;
}

.mathla-auth-card h1 {
    margin-bottom: 1.25rem;
}

.mathla-auth-card form input[type="text"],
.mathla-auth-card form input[type="email"],
.mathla-auth-card form input[type="password"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mathla-auth-header .mathla-auth-header-logo img {
    height: 3rem;
    width: auto;
}
@media (min-width: 640px) {
    .mathla-auth-header .mathla-auth-header-logo img {
        height: 3.5rem;
    }
}


/* Zain + card alignment (2026-07-10) */
body, button, input, select, textarea {
    font-family: var(--font-sans, 'Zain', system-ui, sans-serif);
    font-synthesis: weight;
}

.font-display, .mathla-serif, h1, h2.font-display {
    font-family: var(--font-display, 'Cinzel', 'Zain', Georgia, serif);
}

/* Cards without explicit padding were flush to edges (esp. RTL). */
.mathla-card:not([class*="p-"]):not([class*="px-"]):not([class*="py-"]):not(.overflow-hidden) {
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;
}

/* Keep metric numbers sitting cleanly under labels in both LTR and RTL. */
.mathla-card .tabular-nums,
.mathla-stat-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

html[dir="rtl"] .mathla-card,
html[dir="rtl"] .mathla-app-main {
    text-align: start;
}

html[dir="rtl"] .uppercase.tracking-wide {
    letter-spacing: 0.02em;
}

/* Review queue decision buttons (Approve / Duplicate / Reject).
   Plain CSS in platform.css on purpose: the review page was fighting
   platform.css .mathla-btn-* (min-height: 44px), the stale Tailwind
   snapshot, and mobile-shell.css `button { font-size: 16px }`.
   These classes are sized to match the old Reject pill exactly:
   px-5 py-2.5 rounded-full font-medium. */
.rq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    min-height: 0;
    transition: background-color 0.15s ease;
}
.rq-btn-approve {
    background-color: var(--mathla-primary);
    color: #fff;
}
.rq-btn-approve:hover { background-color: var(--mathla-primary-dark); }
.rq-btn-duplicate {
    background-color: transparent;
    color: var(--mathla-primary-dark);
    border: 2px solid var(--mathla-primary);
}
.rq-btn-duplicate:hover { background-color: #fffbeb; }
.rq-btn-reject {
    background-color: #dc2626;
    color: #fff;
}
.rq-btn-reject:hover { background-color: #b91c1c; }

/* Review queue pagination (aside list) — compact pill control.
   Plain CSS in platform.css for the same reasons as .rq-btn:
   the default Laravel pagination view renders raw `pagination.previous`
   / `pagination.next` keys (no pagination lang file) and uses generic
   `gray`/`blue` Tailwind classes that clash with the stone/gold theme.
   No @apply, no Tailwind snapshot dependency. */
.rq-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.rq-pagination__summary {
    margin: 0;
    font-size: 0.75rem;
    color: #78716c;
}
.rq-pagination__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}
.rq-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.625rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mathla-primary-dark);
    background: #fff;
    border: 1px solid rgba(214, 211, 209, 0.8);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.rq-pagination__btn:hover {
    background: #fffbeb;
    border-color: var(--mathla-primary);
}
.rq-pagination__btn--active {
    background: var(--mathla-primary);
    border-color: var(--mathla-primary);
    color: #fff;
    cursor: default;
}
.rq-pagination__btn--active:hover {
    background: var(--mathla-primary);
}
.rq-pagination__btn--disabled {
    color: #a8a29e;
    background: #f5f5f4;
    border-color: rgba(214, 211, 209, 0.6);
    cursor: not-allowed;
}
.rq-pagination__ellipsis {
    color: #a8a29e;
    padding: 0 0.25rem;
    font-size: 0.875rem;
}

/* Notification dropdown width.
   The historical rule lived in platform-mobile.css / a11y-static.css, neither
   of which any layout loads anymore, so the panel shrink-wrapped to its
   content (~280px) and looked too narrow. Plain CSS (no Tailwind snapshot
   dependency). Desktop: fixed comfortable width anchored end-0 to the bell.
   Mobile (<lg): fixed to the viewport so it can be genuinely wide without
   colliding with the header controls (locale switcher / Collect) that sit
   inline-end of the bell. */
.mathla-notification-panel {
    width: min(26rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    inset-inline-end: 0;
}
@media (max-width: 1023px) {
    .mathla-notification-panel {
        position: fixed;
        top: 4rem;
        inset-inline: 0.75rem;
        width: auto;
        max-width: none;
    }
}

/* Review Video Player Controls & Overlay */
[data-review-video-player] {
    position: relative;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    width: 100%;
}

[data-review-video-player] video {
    min-height: 240px;
    max-height: 70vh;
    object-fit: contain;
    width: 100%;
    display: block;
    margin: 0 auto;
    background: #000;
}

[data-review-video-player]:fullscreen video,
[data-review-video-player]:-webkit-full-screen video {
    max-height: 100vh;
    height: 100vh;
}

.mathla-review-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    backdrop-filter: blur(4px);
}
.mathla-review-tool-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.mathla-review-speed {
    position: relative;
}

.mathla-review-speed-caret {
    font-size: 0.75rem;
    margin-inline-start: 0.25rem;
}

.mathla-review-speed-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    inset-inline-end: 0;
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 4.5rem;
}

.mathla-review-speed-option {
    display: block;
    width: 100%;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #d4d4d8;
    background: transparent;
    border: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.mathla-review-speed-option:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.mathla-review-speed-option--active {
    background: var(--mathla-primary, #D4AF37);
    color: #ffffff;
    font-weight: 600;
}

/* Password visibility toggle (auth pages) — plain CSS, no Tailwind deps */
.mathla-password-wrap {
    position: relative;
}
.mathla-password-input {
    padding-inline-end: 2.75rem;
}
.mathla-password-toggle {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    padding: 0;
    color: #58595B;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: color 0.15s ease;
}
.mathla-password-toggle:hover {
    color: var(--mathla-primary-dark);
}
.mathla-password-toggle:focus-visible {
    outline: 2px solid var(--mathla-primary);
    outline-offset: 2px;
}
.mathla-password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

