/**
 * MSL Stocks - Page Styles
 * Based on Base44 stock review design
 */

/* ============================================
   Stock Page Container
   ============================================ */
.msl-stock-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: rtl;
}

/* ============================================
   Stock Header
   ============================================ */
.msl-stock-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 16px;
    border: 1px solid var(--msl-gray-200, #e5e7eb);
}

.msl-stock-header__logo-wrap {
    margin-bottom: 16px;
}

.msl-stock-header__logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.msl-stock-header__logo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.msl-stock-header__title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.3;
}

.msl-stock-header__symbol {
    font-weight: 600;
    color: #6b7280;
}

.msl-stock-header__exchange {
    display: inline-block;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 16px;
}

/* Real-time Price Ticker */
.msl-stock-header__price-ticker {
    max-width: 320px;
    margin: 16px auto 0;
}

.msl-stock-header__price-ticker .tradingview-widget-container {
    border-radius: 8px;
    overflow: hidden;
}

/* Search Widget at Top (for future) */
.msl-stock-header__search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 10px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msl-stock-header__search:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.msl-stock-header__search svg {
    width: 18px;
    height: 18px;
    color: #9ca3af;
}

/* ============================================
   Stock Search Bar
   ============================================ */
.msl-stock-search-bar {
    margin-bottom: 24px;
}

.msl-stock-search-bar__container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.msl-stock-search-bar__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.msl-stock-search-bar__icon {
    position: absolute;
    right: 16px;
    color: #9ca3af;
    pointer-events: none;
}

.msl-stock-search-bar__input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
    direction: rtl;
}

.msl-stock-search-bar__input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.msl-stock-search-bar__input::placeholder {
    color: #9ca3af;
}

/* Popular stocks tags */
.msl-stock-search-bar__popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.msl-stock-search-bar__popular-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.msl-stock-search-bar__tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.msl-stock-search-bar__tag:hover {
    background: #10b981;
    color: #fff;
}

/* Search results dropdown */
.msl-stock-search-bar__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
}

.msl-stock-search-bar__result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.msl-stock-search-bar__result:last-child {
    border-bottom: none;
}

.msl-stock-search-bar__result:hover {
    background: #f9fafb;
}

.msl-stock-search-bar__result strong {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.msl-stock-search-bar__result span {
    font-size: 13px;
    color: #6b7280;
    text-align: left;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msl-stock-search-bar__no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* ============================================
   Stock Widgets Container
   ============================================ */
.msl-stock-widgets {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

/* ============================================
   Enhanced KPI Cards for Stocks
   ============================================ */
.msl-stock-page .msl-kpi-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.msl-stock-page .msl-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Icon in corner */
.msl-stock-page .msl-kpi-card::before {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 12px;
    opacity: 0.5;
}

.msl-stock-page .msl-kpi-card__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msl-stock-page .msl-kpi-card__value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

/* Price card with upside */
.msl-stock-page .msl-kpi-card--price .msl-kpi-card__value {
    color: #10b981;
}

.msl-stock-page .msl-kpi-card__upside {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
    margin-top: 4px;
}

/* Rating card */
.msl-stock-page .msl-kpi-card__rating {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.msl-stock-page .msl-kpi-card__rating-label {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 8px;
}

.msl-stock-page .msl-kpi-card__count {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Change indicator */
.msl-stock-page .msl-kpi-card__change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 4px;
}

.msl-stock-page .msl-kpi-card__change.positive {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.msl-stock-page .msl-kpi-card__change.negative {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   TradingView Section
   ============================================ */
.msl-stock-page .msl-widget--tradingview_embed {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.msl-stock-page .msl-tradingview-container h3,
.msl-stock-page .msl-widget--tradingview_embed > h3 {
    padding: 16px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

/* ============================================
   Analyst Section
   ============================================ */
.msl-stock-page .msl-widget--analyst_card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.msl-stock-page .msl-analyst-card {
    padding: 24px;
}

.msl-stock-page .msl-analyst-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 24px;
}

/* Targets Table Style */
.msl-stock-page .msl-analyst-card__targets-table {
    width: 100%;
    margin-bottom: 24px;
}

.msl-stock-page .msl-analyst-card__targets-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.msl-stock-page .msl-analyst-card__targets-row:last-child {
    border-bottom: none;
}

.msl-stock-page .msl-analyst-card__target-label {
    color: #6b7280;
    font-size: 14px;
}

.msl-stock-page .msl-analyst-card__target-value {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
}

.msl-stock-page .msl-analyst-card__target-value.highlight {
    color: #10b981;
    font-size: 18px;
}

/* Score Display */
.msl-stock-page .msl-analyst-card__score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 24px;
}

.msl-stock-page .msl-analyst-card__score-big {
    font-size: 56px;
    font-weight: 700;
    color: #10b981;
    line-height: 1;
}

.msl-stock-page .msl-analyst-card__score-label {
    font-size: 18px;
    font-weight: 600;
    color: #10b981;
}

.msl-stock-page .msl-analyst-card__score-count {
    font-size: 13px;
    color: #6b7280;
}

/* Distribution bars horizontal */
.msl-stock-page .msl-analyst-card__dist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.msl-stock-page .msl-analyst-card__dist-label {
    width: 80px;
    font-size: 13px;
    color: #6b7280;
    text-align: left;
}

.msl-stock-page .msl-analyst-card__dist-bar {
    flex: 1;
    height: 24px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.msl-stock-page .msl-analyst-card__dist-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    min-width: fit-content;
}

.msl-stock-page .msl-analyst-card__dist-fill.strong-buy { background: #22c55e; }
.msl-stock-page .msl-analyst-card__dist-fill.buy { background: #86efac; color: #166534; }
.msl-stock-page .msl-analyst-card__dist-fill.hold { background: #fbbf24; color: #92400e; }
.msl-stock-page .msl-analyst-card__dist-fill.sell { background: #fca5a5; color: #991b1b; }
.msl-stock-page .msl-analyst-card__dist-fill.strong-sell { background: #ef4444; }

/* ============================================
   Content Sections
   ============================================ */
.msl-stock-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.msl-stock-page .msl-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.msl-stock-page .msl-section__title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: none;
    position: relative;
}

.msl-stock-page .msl-section__title::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: #10b981;
    border-radius: 2px;
}

.msl-stock-page .msl-section__content {
    color: #4b5563;
    line-height: 1.8;
    font-size: 15px;
}

.msl-stock-page .msl-section__content p {
    margin: 0 0 16px;
}

.msl-stock-page .msl-section__content ul {
    margin: 16px 0;
    padding-right: 20px;
}

.msl-stock-page .msl-section__content li {
    margin-bottom: 10px;
}

.msl-stock-page .msl-section__content strong {
    color: #111827;
    font-weight: 600;
}

/* ============================================
   Disclaimer
   ============================================ */
.msl-stock-disclaimer {
    margin-top: 32px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.7;
}

.msl-stock-disclaimer p {
    margin: 0;
}

/* ============================================
   Meta Info
   ============================================ */
.msl-stock-meta {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    margin-top: 24px;
}

/* ============================================
   Error Page
   ============================================ */
.msl-stock-error {
    max-width: 600px;
    margin: 48px auto;
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.msl-stock-error__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.msl-stock-error__title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px;
}

.msl-stock-error__message {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.6;
}

.msl-stock-error__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.msl-stock-error__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.msl-stock-error__btn--primary {
    background: #10b981;
    color: #fff;
}

.msl-stock-error__btn--primary:hover {
    background: #059669;
}

.msl-stock-error__btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .msl-stock-page {
        padding: 16px 12px 32px;
    }

    .msl-stock-header {
        padding: 24px 16px;
    }

    .msl-stock-header__title {
        font-size: 22px;
    }

    .msl-stock-page .msl-kpi-cards {
        grid-template-columns: 1fr;
    }

    .msl-stock-page .msl-kpi-card__value {
        font-size: 28px;
    }

    .msl-stock-page .msl-analyst-card__score-section {
        flex-direction: column;
        gap: 12px;
    }

    .msl-stock-page .msl-section {
        padding: 16px;
    }

    .msl-stock-page .msl-tradingview-chart {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .msl-stock-page .msl-analyst-card__dist-label {
        width: 60px;
        font-size: 11px;
    }
}

/* ============================================
   Stock Search Landing Page
   ============================================ */
.msl-stock-search-landing {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.msl-stock-search-landing__icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    color: #3b82f6;
}

.msl-stock-search-landing__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.msl-stock-search-landing__title {
    font-size: 28px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 12px;
}

.msl-stock-search-landing__subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 32px;
}

.msl-stock-search-landing__form {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.msl-stock-search-landing__input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.msl-stock-search-landing__input-wrap:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.msl-stock-search-landing__input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    direction: rtl;
    text-align: right;
}

.msl-stock-search-landing__input::placeholder {
    color: #9ca3af;
}

.msl-stock-search-landing__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 4px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msl-stock-search-landing__btn:hover {
    background: #2563eb;
}

.msl-stock-search-landing__btn svg {
    width: 22px;
    height: 22px;
}

.msl-stock-search-landing__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.msl-stock-search-landing__results.show {
    display: block;
}

.msl-stock-search-landing__result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.msl-stock-search-landing__result:last-child {
    border-bottom: none;
}

.msl-stock-search-landing__result:hover {
    background: #f9fafb;
}

.msl-stock-search-landing__result-symbol {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.msl-stock-search-landing__result-name {
    font-size: 14px;
    color: #6b7280;
    text-align: left;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msl-stock-search-landing__no-results {
    padding: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 15px;
}

/* ============================================
   Preloader / Loading Screen
   ============================================ */
.msl-stock-preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.msl-stock-preloader__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    color: #3b82f6;
    animation: msl-preloader-float 2s ease-in-out infinite;
}

.msl-stock-preloader__icon svg {
    width: 100%;
    height: 100%;
}

@keyframes msl-preloader-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.msl-stock-preloader__title {
    font-size: 22px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px;
}

.msl-stock-preloader__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 32px;
}

.msl-stock-preloader__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0f2fe;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: msl-preloader-spin 1s linear infinite;
}

@keyframes msl-preloader-spin {
    to { transform: rotate(360deg); }
}

/* Hide preloader when page loaded */
.msl-stock-page-loaded .msl-stock-preloader {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ============================================
   Notice Banners
   ============================================ */
.msl-notice {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.msl-notice-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.msl-notice-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.msl-notice p {
    margin: 0;
}

/* ============================================
   Hero Search — [msl_stock_search_hero]
   Embeddable on homepage / any Elementor page.
   Design Ops may override these defaults.
   ============================================ */
.msl-hero-search {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    direction: rtl;
}

.msl-hero-search__form {
    width: 100%;
    position: relative;
}

.msl-hero-search__input-group {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.msl-hero-search__input {
    flex: 1;
    padding: 14px 18px;
    font-size: 17px;
    border: 2px solid #d1d5db;
    border-left: none;
    border-radius: 0 8px 8px 0;
    outline: none;
    direction: ltr;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.msl-hero-search__input:focus {
    border-color: #2563eb;
}

.msl-hero-search__btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    border: 2px solid #2563eb;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.msl-hero-search__btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.msl-hero-search__error {
    color: #dc2626;
    font-size: 13px;
    margin: 8px 0 0;
    text-align: right;
}

/* Autocomplete dropdown */
.msl-hero-search__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}

.msl-hero-search__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    direction: ltr;
    text-align: left;
    transition: background 0.1s;
}

.msl-hero-search__dropdown-item:last-child {
    border-bottom: none;
}

.msl-hero-search__dropdown-item:hover,
.msl-hero-search__dropdown-item--active {
    background: #f0f4ff;
}

.msl-hero-search__dropdown-item strong {
    font-weight: 700;
    color: #1e40af;
    min-width: 60px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.msl-hero-search__dropdown-item span {
    color: #6b7280;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msl-hero-search__dropdown-item--fallback {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.msl-hero-search__dropdown-item--fallback strong {
    color: #6b7280;
}

.msl-hero-search__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #92400e;
    background: #fef3c7;
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: auto;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.msl-hero-search__popular {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}

.msl-hero-search__popular-label {
    color: #6b7280;
    font-weight: 500;
}

.msl-hero-search__popular-link {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 16px;
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: background 0.15s;
}

.msl-hero-search__popular-link:hover {
    background: #dbeafe;
}

/* Responsive — mobile */
@media (max-width: 480px) {
    .msl-hero-search__input-group {
        flex-direction: column;
        border-radius: 8px;
    }
    .msl-hero-search__input {
        border: 2px solid #d1d5db;
        border-radius: 8px 8px 0 0;
    }
    .msl-hero-search__btn {
        border-radius: 0 0 8px 8px;
    }
}

/* ============================================
   Wave 1.2: Building State (async spinner)
   ============================================ */
.msl-building {
    text-align: center;
    padding: 80px 20px 60px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.msl-building__icon {
    color: #2563eb;
    margin-bottom: 24px;
    animation: msl-building-pulse 2s ease-in-out infinite;
}
.msl-building__icon--error {
    color: #dc2626;
    animation: none;
}

@keyframes msl-building-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
}

.msl-building__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.msl-building__subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 32px;
    line-height: 1.6;
}

.msl-building__progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.msl-building__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: msl-building-spin 0.8s linear infinite;
}

@keyframes msl-building-spin {
    to { transform: rotate(360deg); }
}

.msl-building__timer {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.msl-building__status {
    font-size: 0.875rem;
    color: #94a3b8;
    min-height: 1.25rem;
}

.msl-building__retry {
    display: inline-block;
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.msl-building__retry:hover {
    color: #1d4ed8;
}

@media (max-width: 480px) {
    .msl-building {
        padding: 48px 16px 40px;
    }
    .msl-building__title {
        font-size: 1.25rem;
    }
}

/* ============================================
   Generated-at date badge (below H1)
   ============================================ */
.msl-stock-generated-at {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: -4px 0 16px;
    line-height: 1.4;
}
