/* ============================================================
   RECENT CHANGES COMPONENT - SOL Design System
   ============================================================
   ARCHITECTURE: Styling for the "What's New" section on welcome screens
   WHY: Inform doctors of new features in a non-intrusive way
   NOTE: Uses SOL CSS variables for consistency with rest of app
   ============================================================ */

/* Container Section */
.sol-recent-changes {
    margin-top: var(--sol-space-xl);
    padding-top: var(--sol-space-lg);
    border-top: 1px solid var(--sol-border-subtle);
    width: 100%;
    max-width: 800px;
}

/* Section Title */
.sol-changes-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sol-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 var(--sol-space-lg) 0;
    text-align: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--sol-radius-md);
    border: 1px solid var(--sol-border-subtle);
}

.sol-changes-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--sol-accent-primary);
    border-radius: 50%;
    animation: title-pulse 2s ease-in-out infinite;
}

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

/* Card Container - Horizontal layout */
.sol-changes-list {
    display: flex;
    gap: var(--sol-space-md);
    flex-wrap: wrap;
    justify-content: center;
}

/* Individual Change Card */
.sol-change-card {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 260px;
    padding: var(--sol-space-lg) var(--sol-space-md);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(30, 35, 50, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--sol-radius-lg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sol-change-card:hover {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(35, 40, 55, 0.85);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Card Header - Badge + Date */
.sol-change-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sol-space-xs);
}

/* Relative Date */
.sol-change-date {
    font-size: 0.65rem;
    color: var(--sol-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--sol-radius-sm);
}

/* Headline */
.sol-change-headline {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 var(--sol-space-sm) 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.sol-change-card:hover .sol-change-headline {
    color: #ffffff;
}

/* Summary */
.sol-change-summary {
    font-size: 0.8rem;
    color: var(--sol-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Tips Container */
.sol-change-tips {
    margin-top: var(--sol-space-md);
    padding-top: var(--sol-space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: var(--sol-space-xs);
    flex-wrap: wrap;
}

/* Tip pill (action hint) - Override for change cards */
.sol-change-card .sol-empty-tip,
.sol-change-tip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.95);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: all 0.15s ease;
}

.sol-change-card .sol-empty-tip:hover,
.sol-change-tip:hover {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.35);
    color: #e2e8f0;
}

.sol-change-card .sol-empty-tip::before,
.sol-change-tip::before {
    content: '\2192';
    font-size: 0.65rem;
    color: rgba(59, 130, 246, 0.7);
}

/* Category Badges */
.sol-change-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--sol-radius-sm);
}

/* Feature - Blue (NEW) */
.sol-change-badge--feature {
    background: var(--sol-info-bg);
    color: var(--sol-info);
    border: 1px solid var(--sol-info-border);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Improvement - Green (BETTER) */
.sol-change-badge--improvement {
    background: var(--sol-stable-bg);
    color: var(--sol-stable);
    border: 1px solid var(--sol-stable-border);
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Fix - Gray (FIXED) */
.sol-change-badge--fix {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sol-text-secondary);
    border: 1px solid var(--sol-border-subtle);
}

/* ============================================================
   CONTEXT-SPECIFIC OVERRIDES
   ============================================================ */

/* Guest Hero Context - Wider layout, no top border */
.sol-guest-hero .sol-recent-changes {
    margin-top: var(--sol-space-2xl);
    padding-top: 0;
    border-top: none;
    max-width: 100%;
}

.sol-guest-hero .sol-changes-list {
    justify-content: center;
}

/* Empty State Context - Centered with border */
.sol-empty-card .sol-recent-changes {
    margin-top: var(--sol-space-lg);
    text-align: left;
}

.sol-empty-card .sol-changes-list {
    justify-content: center;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
    .sol-changes-list {
        flex-direction: column;
        align-items: center;
    }

    .sol-change-card {
        max-width: 300px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sol-recent-changes {
        margin-top: var(--sol-space-lg);
        padding-top: var(--sol-space-md);
    }

    .sol-change-card {
        max-width: none;
    }
}

/* ============================================================
   GUEST HERO LAYOUT FIXES
   ============================================================
   FIX (2026-01-22): Prevent floating elements from overlapping
   BUG: Voice bar, chat FAB, and sidebar toggle overlapped What's New cards on mobile
   ROOT CAUSE: Fixed-position elements with no content padding adjustment
   FIX: Add padding-bottom, reposition FABs when guest hero visible
*/

/* Reserve space at bottom for any floating elements on mobile */
@media (max-width: 900px) {
    .sol-guest-hero:not(.hidden) {
        padding-bottom: 100px;
    }

    .sol-guest-hero:not(.hidden) .sol-recent-changes {
        padding-bottom: var(--sol-space-xl);
    }
}

/* Hide FABs on guest hero - not useful without signed-in user */
body:has(.sol-guest-hero:not(.hidden)) .sol-mobile-sidebar-toggle,
body:has(.sol-guest-hero:not(.hidden)) .chat-fab {
    display: none !important;
}
