/* =================================================================
   Oost Card Component - Revealed + Locked States
   Part of Search &amp; Concealment Overhaul
   ================================================================= */

/* =================================================================
   1. BASE CARD (shared between revealed and locked)
   ================================================================= */
.oost-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    padding: 20px 18px 16px;
    min-width: 260px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.oost-card:hover {
    transform: translateY(-2px);
}

/* Badges row (always visible on both states) */
.oost-card .card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.oost-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.oost-card .card-badge-type {
    background: rgba(8, 145, 178, 0.12);
    color: #0891B2;
}

.oost-card .card-badge-geo {
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    font-size: 0.68rem;
}

/* Save button (both states) */
.oost-card .card-save-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
    color: #94A3B8;
}

.oost-card .card-save-btn:hover {
    background: rgba(148, 163, 184, 0.12);
}

.oost-card .card-save-btn.saved {
    color: #EF4444;
}


/* =================================================================
   2. REVEALED CARD
   ================================================================= */
.oost-card-revealed {
    border: 1.5px solid #F5A623;
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(245, 166, 35, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.oost-card-revealed:hover {
    box-shadow: 0 6px 24px rgba(245, 166, 35, 0.15), 0 2px 6px rgba(0, 0, 0, 0.05);
    border-color: #E09915;
}

/* Sparkle badge */
.oost-card-revealed .sparkle-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(245, 166, 35, 0.2);
}

.oost-card-revealed .sparkle-badge::before {
    content: "\2728";
    font-size: 0.7rem;
}

/* Revealed card content */
.oost-card-revealed .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.35;
    margin: 28px 0 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oost-card-revealed .card-org {
    font-size: 0.78rem;
    color: #64748B;
    margin: 0 0 6px;
    font-weight: 500;
}

.oost-card-revealed .card-desc {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oost-card-revealed .card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.oost-card-revealed .card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #475569;
}

.oost-card-revealed .card-meta-item .meta-icon {
    font-size: 0.82rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Urgency highlight for deadline cards */
.oost-card-revealed .card-meta-item.urgency {
    color: #DC2626;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.06);
    padding: 4px 8px;
    border-radius: 8px;
    margin: 2px -8px;
}

/* Apply CTA */
.oost-card-revealed .card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #059669;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: auto;
}

.oost-card-revealed .card-cta:hover {
    background: #047857;
}

/* Actions row */
.oost-card-revealed .card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}


/* =================================================================
   3. LOCKED CARD
   ================================================================= */
.oost-card-locked {
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(248, 250, 252, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.oost-card-locked:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Placeholder bars (NOT text, just coloured rectangles) */
.oost-card-locked .placeholder-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 12px;
    opacity: 0.5;
}

.oost-card-locked .placeholder-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #E2E8F0, #CBD5E1);
}

/* Bars for "title" area */
.oost-card-locked .placeholder-bars-title {
    margin-bottom: 4px;
}

.oost-card-locked .placeholder-bars-title .placeholder-bar {
    height: 14px;
    background: linear-gradient(90deg, #CBD5E1, #94A3B8);
}

/* Lock icon line (for deadline/funding) */
.oost-card-locked .lock-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #94A3B8;
    margin: 3px 0;
}

.oost-card-locked .lock-line .lock-icon {
    font-size: 0.72rem;
    opacity: 0.7;
}

/* Scout only button */
.oost-card-locked .card-scout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(148, 163, 184, 0.1);
    color: #64748B;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin-top: auto;
    text-decoration: none;
}

.oost-card-locked .card-scout-btn:hover {
    background: rgba(8, 145, 178, 0.08);
    border-color: rgba(8, 145, 178, 0.3);
    color: #0891B2;
}

.oost-card-locked .card-scout-btn .lock-icon {
    font-size: 0.72rem;
}

/* Actions row */
.oost-card-locked .card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}


/* =================================================================
   3b. FACT PILLS (shared, both card states)
   ================================================================= */
.card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0 8px;
}

.card-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: rgba(8, 145, 178, 0.08);
    color: #0E7490;
    border: 1px solid rgba(8, 145, 178, 0.15);
}

/* =================================================================
   3c. MATCH PERCENTAGE
   ================================================================= */
.card-match {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
    margin: 6px 0 4px;
}

.card-match.match-strong {
    color: #059669;
}

.card-match.match-good {
    color: #0891B2;
}

/* =================================================================
   3d. CONCEALED DESCRIPTION (locked cards only)
   ================================================================= */
.card-desc-concealed {
    font-size: 0.8rem;
    color: #64748B;
    line-height: 1.5;
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}


/* =================================================================
   4. DARK MODE OVERRIDES
   ================================================================= */
[data-theme="dark"] .oost-card-revealed {
    background: #1E293B;
    border-color: #D4A017;
}

[data-theme="dark"] .oost-card-revealed .card-title {
    color: #F1F5F9;
}

[data-theme="dark"] .oost-card-revealed .card-org {
    color: #94A3B8;
}

[data-theme="dark"] .oost-card-revealed .card-desc {
    color: #94A3B8;
}

[data-theme="dark"] .oost-card-revealed .card-meta-item {
    color: #94A3B8;
}

[data-theme="dark"] .oost-card-revealed .sparkle-badge {
    background: linear-gradient(135deg, #78350F, #92400E);
    color: #FDE68A;
}

[data-theme="dark"] .oost-card-locked {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .oost-card-locked .placeholder-bar {
    background: linear-gradient(90deg, #334155, #475569);
}

[data-theme="dark"] .oost-card-locked .placeholder-bars-title .placeholder-bar {
    background: linear-gradient(90deg, #475569, #64748B);
}

[data-theme="dark"] .oost-card-locked .lock-line {
    color: #64748B;
}

[data-theme="dark"] .oost-card-locked .card-scout-btn {
    background: rgba(71, 85, 105, 0.2);
    border-color: rgba(71, 85, 105, 0.3);
    color: #94A3B8;
}

[data-theme="dark"] .oost-card-locked .card-scout-btn:hover {
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.3);
    color: #22D3EE;
}

[data-theme="dark"] .score-circle {
    background: #1E293B;
}

[data-theme="dark"] .card-pill {
    background: rgba(8, 145, 178, 0.12);
    color: #22D3EE;
    border-color: rgba(8, 145, 178, 0.25);
}

[data-theme="dark"] .card-match {
    color: #94A3B8;
}

[data-theme="dark"] .card-match.match-strong {
    color: #34D399;
}

[data-theme="dark"] .card-match.match-good {
    color: #22D3EE;
}

[data-theme="dark"] .card-desc-concealed {
    color: #94A3B8;
}


/* =================================================================
   5. RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
    .oost-card {
        min-width: 240px;
        max-width: 280px;
        padding: 16px 14px 14px;
        border-radius: 12px;
    }

    .oost-card-revealed .card-title {
        font-size: 0.9rem;
    }

    .oost-card-revealed .card-desc {
        -webkit-line-clamp: 2;
    }

    .oost-card-revealed .sparkle-badge {
        font-size: 0.58rem;
        padding: 2px 8px;
    }

    .oost-card-revealed .card-cta {
        font-size: 0.76rem;
        padding: 7px 14px;
    }

    .oost-card-locked .card-scout-btn {
        font-size: 0.72rem;
        padding: 7px 14px;
    }
}
