/*
 * page-hero.css — THE ONLY hero/banner stylesheet in the Sewaqa project.
 *
 * Every dark-navy page hero (user + admin + public) renders through the
 * <x-layout.page-hero> Blade component. This file is the single source
 * of truth for hero styling; nothing else in the codebase defines hero
 * rules.
 *
 * Canonical component: <x-layout.page-hero>
 * Canonical class:     .app-page-hero
 */

/* ─────────────────────────────────────────────────────────
 * 1. TOKENS — fixed by design; consumer views never override.
 * ───────────────────────────────────────────────────────── */
:root {
    --app-hero-height:          120px;
    --app-hero-bg:              #27295E;
    --app-hero-radius:          14px;
    --app-hero-padding-x:       28px;
    --app-hero-padding-y:       0px;
    --app-hero-title-color:     #ffffff;
    --app-hero-subtitle-color:  rgba(255,255,255,.82);
    --app-hero-icon-color:      #ffffff;
    --app-hero-icon-size:       28px;
    --app-hero-title-size:      24px;
    --app-hero-title-weight:    800;
    --app-hero-subtitle-size:   13px;
    --app-hero-gap-inline:      16px;   /* icon ↔ title gap */
    --app-hero-actions-gap:     8px;    /* between action chips */
    --app-hero-margin-bottom:   20px;   /* below hero */
}

/* ─────────────────────────────────────────────────────────
 * 2. BASE — .app-page-hero (canonical class, single class)
 * ───────────────────────────────────────────────────────── */
.app-page-hero {
    height: var(--app-hero-height);
    min-height: var(--app-hero-height);
    max-height: var(--app-hero-height);
    background: var(--app-hero-bg);
    color: var(--app-hero-title-color);
    border-radius: var(--app-hero-radius);
    padding: var(--app-hero-padding-y) var(--app-hero-padding-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--app-hero-gap-inline);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    direction: rtl;
    text-align: right;
    margin: 0 0 var(--app-hero-margin-bottom);
    box-shadow: 0 6px 16px rgba(16, 18, 34, .10);
}

/* Content column — title + optional subtitle stack */
.app-page-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* Title */
.app-page-hero__title {
    color: var(--app-hero-title-color);
    font-size: var(--app-hero-title-size);
    font-weight: var(--app-hero-title-weight);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--app-hero-gap-inline);
    flex-wrap: nowrap;
    text-transform: none;
}

/* Icon — inline with the title, pure white */
.app-page-hero__icon {
    color: var(--app-hero-icon-color);
    font-size: var(--app-hero-icon-size);
    line-height: 1;
    flex-shrink: 0;
    margin: 0;
    background: transparent;
}

/* Subtitle — muted white */
.app-page-hero__subtitle {
    color: var(--app-hero-subtitle-color);
    font-size: var(--app-hero-subtitle-size);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    text-align: right;
}

/* Actions cluster — back-link OR CTA buttons on the inline-end */
.app-page-hero__actions {
    display: flex;
    gap: var(--app-hero-actions-gap);
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Auto-generated back-link chip */
.app-page-hero__back {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: var(--app-hero-subtitle-size);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .12s;
}
.app-page-hero__back:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* CTA chips (any button/link the caller drops into the actions slot) */
.app-page-hero__actions .btn-create,
.app-page-hero__actions .btn-welcome,
.app-page-hero__actions .btn-create-quiz,
.app-page-hero__actions .btn-header-back,
.app-page-hero__actions .back-link,
.app-page-hero .btn-create,
.app-page-hero .btn-welcome,
.app-page-hero .btn-create-quiz {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .20);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: var(--app-hero-subtitle-size);
    font-weight: 500;
    box-shadow: none;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.app-page-hero__actions .btn-create:hover,
.app-page-hero__actions .btn-welcome:hover,
.app-page-hero__actions .btn-create-quiz:hover,
.app-page-hero__actions .btn-header-back:hover,
.app-page-hero__actions .back-link:hover,
.app-page-hero .btn-create:hover,
.app-page-hero .btn-welcome:hover,
.app-page-hero .btn-create-quiz:hover {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    transform: none;
}

/* Simple in-hero pills (unread count, quick summaries) */
.app-page-hero__actions .header-pill,
.app-page-hero__actions .unread-pill {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--app-hero-subtitle-size);
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────
 * 3. RESPONSIVE — hero grows a bit on very narrow screens
 * ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .app-page-hero {
        height: auto;
        min-height: var(--app-hero-height);
        max-height: none;
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    .app-page-hero__actions { justify-content: flex-start; }
    .app-page-hero__title { font-size: 20px; }
    .app-page-hero__icon { font-size: 22px; }
}

/* ─────────────────────────────────────────────────────────
 * 4. PAGE-SHELL PADDING — one uniform 15px inset for every
 *    page wrapper (user + admin + public). The hero + all
 *    content share the same frame across the app.
 * ───────────────────────────────────────────────────────── */
.u-area .u-page,
.formkit-page,
.modern-dashboard,
.modern-categories-page,
.modern-category-form,
.modern-countries-page,
.modern-questions-page,
.modern-quizzes-page,
.modern-vehicles-page,
.quizzes-page-wrapper,
.feedbacks-page,
.feedbacks-index-page,
.messages-page,
.message-show-page,
.settings-page,
.articles-page-wrapper,
.admin-content,
.main-content {
    padding: 15px;
}
