/* ==========================================================================
   base.css — Shared global styles for new design pages
   Must be loaded BEFORE all other new/css/*.css files.
   ========================================================================== */
/* ---- Noto Sans / Noto Sans Arabic @font-face declarations (local, variable fonts) ---- */
@font-face {
    font-family: 'Noto Sans';
    src: url('../../fonts/Noto_Sans/NotoSans-VariableFont_wdth,wght.ttf') format('truetype-variations'),
         url('../../fonts/Noto_Sans/NotoSans-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('../../fonts/Noto_Sans/NotoSans-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations'),
         url('../../fonts/Noto_Sans/NotoSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../../fonts/Noto_Sans_Arabic/NotoSansArabic-VariableFont_wdth,wght.ttf') format('truetype-variations'),
         url('../../fonts/Noto_Sans_Arabic/NotoSansArabic-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Design Tokens (CSS Custom Properties) ---------- */
:root {
    --color-blue: #0D4261;
    --color-gold: #A29475;
    --color-offwhite: #F2F0EF;
    --color-footer-bg: #D2D2D2;
    --font-main: "Noto Sans Arabic", "Noto Sans", sans-serif;
}

/* ---------- Content Pane Background ----------
   Shared offwhite background used by all new-design pages */
#ctl00_ContentPane {
    background-color: var(--color-offwhite);
}

/* ---------- Shared Results Panel ----------
   Common card styling for results sections across search pages */
.search-page-results,
.text-search-results,
.law-search-results {
    width: 100%;
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(13, 66, 97, 0.10);
    overflow: hidden;
}

/* ---------- Shared Results Title ---------- */
.search-page-results-title,
.text-search-results-title {
    color: var(--color-blue);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
    padding-right: 6px;
}

/* ---------- Shared Grid Placeholder ----------
   "No results" / empty-state illustration block */
.search-page-grid-placeholder,
.text-search-grid-placeholder,
.law-search-grid-placeholder,
.alpha-search-grid-placeholder {
    display: none;
    width: min(260px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: rgba(13, 66, 97, 0.6);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.search-page-grid-placeholder img,
.text-search-grid-placeholder img,
.law-search-grid-placeholder img,
.alpha-search-grid-placeholder img {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

/* ---------- Shared Loading Overlay ---------- */
.search-page-results-loading,
.alpha-search-results-loading,
.alpha-search-tree-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    z-index: 5;
    color: var(--color-blue, #0D4261);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Shared Spinner ---------- */
.alpha-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(13, 66, 97, 0.15);
    border-top-color: var(--color-gold, #A29475);
    animation: shared-spin 0.8s linear infinite;
}

@keyframes shared-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Shared Search Section (Glass Panel) ----------
   The frosted-glass search bar container reused across pages */
.menu-search-section,
.search-page-search-section,
.text-search-search-section,
.law-search-search-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    box-shadow: 0px 12px 17.2px rgba(13, 66, 97, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -10px 18px rgba(13, 66, 97, 0.10);
    border-radius: 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(30px);
}

/* ---------- Shared Responsive: Results panels at mobile ---------- */
@media (max-width: 768px) {
    .search-page-results,
    .text-search-results,
    .law-search-results {
        padding: 16px;
    }
}
