/*
========================================
Phase 1 UX
Global company discovery + company status
========================================
*/

.header-company-search {
    margin: 0.4rem auto 0.8rem;
    max-width: 760px;
}

.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-form .ticker-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    padding: 0 3rem 0 0.95rem;
    font-size: 0.95rem;
}

.header-search-form .ticker-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-search-form button {
    position: absolute;
    right: 6px;
    height: 32px;
    width: 32px;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-search-form button:hover {
    background: #1d4ed8;
}

.header-company-search .ticker-results {
    margin-top: 7px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    max-height: min(62vh, 420px);
}

.header-company-search .ticker-suggestion-header,
.mobile-menu-search .ticker-suggestion-header {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.5rem 0.75rem 0.2rem;
    font-weight: 700;
}

.ticker-source-badge {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.65rem;
    color: #475569;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.05rem 0.35rem;
    vertical-align: middle;
}

.header-search-hint {
    margin: 0.45rem 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.78rem;
}

.mobile-menu-search {
    margin: 0.5rem 0 1rem;
}

.mobile-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-form .ticker-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    padding: 0 2.8rem 0 0.9rem;
}

.mobile-search-form button {
    position: absolute;
    right: 6px;
    height: 32px;
    width: 32px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.company-status-summary {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 1rem;
    margin: 0 0 1.35rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.company-mobile-status-strip {
    display: none;
}

.company-status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.company-status-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.company-status-subtitle {
    margin: 0.15rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
}

.company-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}

.company-status-pill.reported {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.company-status-pill.scheduled {
    color: #92400e;
    background: #ffedd5;
    border: 1px solid #fdba74;
}

.company-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.company-status-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 0.7rem 0.75rem;
    min-height: 90px;
}

.company-status-label {
    margin: 0 0 0.35rem;
    font-size: 0.74rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.company-status-value {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.2;
}

.company-status-value.positive {
    color: #166534;
}

.company-status-value.negative {
    color: #b91c1c;
}

.company-status-meta {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.company-status-meta.positive {
    color: #166534;
    font-weight: 600;
}

.company-status-meta.negative {
    color: #b91c1c;
    font-weight: 600;
}

.company-status-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.company-follow-feedback {
    margin: 0;
    font-size: 0.83rem;
    color: #334155;
}

.company-follow-buttons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.company-follow-action {
    border: 1px solid #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
    border-radius: 10px;
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 42px;
}

.company-follow-action:hover {
    background: #1e40af;
}

.company-follow-action.is-following {
    background: #166534;
    border-color: #166534;
}

.company-manage-alerts {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    background: #ffffff;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}

.company-manage-alerts:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.company-mobile-action-bar {
    display: none;
}

@media (max-width: 991px) {
    .header-company-search {
        margin: 0.35rem 0 0.65rem;
    }

    .header-search-hint {
        font-size: 0.74rem;
        text-align: left;
        padding-left: 0.35rem;
    }
}

@media (max-width: 768px) {
    .company-mobile-status-strip {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        overflow-x: auto;
        white-space: nowrap;
        margin: -0.3rem 0 0.95rem;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .company-mobile-status-strip::-webkit-scrollbar {
        display: none;
    }

    .company-mobile-status-chip {
        border: 1px solid #cbd5e1;
        background: #ffffff;
        color: #0f172a;
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .company-mobile-status-chip.reported {
        color: #166534;
        border-color: #86efac;
        background: #dcfce7;
    }

    .company-mobile-status-chip.scheduled {
        color: #92400e;
        border-color: #fdba74;
        background: #ffedd5;
    }

    .company-mobile-status-chip.positive {
        color: #166534;
        border-color: #86efac;
        background: #f0fdf4;
    }

    .company-mobile-status-chip.negative {
        color: #b91c1c;
        border-color: #fca5a5;
        background: #fef2f2;
    }

    .company-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .company-status-actions {
        display: none;
    }

    .company-mobile-action-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10040;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.1);
        padding: 0.55rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
        display: flex;
        gap: 0.6rem;
    }

    .company-mobile-action-bar .company-follow-action,
    .company-mobile-action-bar .company-manage-alerts {
        flex: 1;
        justify-content: center;
        text-align: center;
        min-height: 44px;
    }

    .company-enhanced-page {
        padding-bottom: 92px;
    }
}

@media (max-width: 480px) {
    .company-status-grid {
        grid-template-columns: 1fr;
    }
}
