/**
 * Desktop Luxury Fixed - 10/10 Premium Design
 * Inspired by Louis Vuitton, Gucci, Harrods
 * Clean, Centered, Organized
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Luxury Color System - One Background */
    --luxury-bg: #FAFAF8; /* One consistent background */
    --luxury-surface: rgba(255, 255, 255, 0.7); /* Semi-transparent white for cards */
    --luxury-gold: #C9A961;
    --luxury-gold-dark: #B8935A;
    --luxury-black: #1A1A1A;
    --luxury-gray: #6B7280;
    --luxury-border: rgba(0, 0, 0, 0.04);
    
    /* Layout System */
    --header-height: 72px;
    --content-max-width: 1000px;
    --shortlist-width: 320px;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    
    /* Z-Index Hierarchy - FIXED */
    --z-base: 1;
    --z-header: 100;
    --z-shortlist: 50;
    --z-input: 90;
    --z-modal: 200;
}

/* ============================================
   DESKTOP LAYOUT - PROPERLY ORGANIZED
   ============================================ */

@media (min-width: 1024px) {
    
    /* Reset */
    * {
        box-sizing: border-box;
    }
    
    /* Hide all mobile elements */
    .app-tab-bar,
    .sffc-menu-toggle,
    .sffc-stage-menu,
    .sffc-shortlist-header-toggle,
    .app-search-bar,
    .quick-action-cards {
        display: none !important;
    }
    
    /* Floating Menu Bar - Visible and Centered on Desktop */
    .sffc-floating-menu-bar {
        display: flex !important;
        position: fixed !important;
        top: 50% !important;
        left: 20px !important; /* Moved to left side */
        transform: translateY(-50%) !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px !important;
        background: white !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        z-index: 1000 !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .sffc-menu-icon {
        width: 44px !important;
        height: 44px !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        color: #666 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .sffc-menu-icon:hover {
        background: rgb(255, 255, 247) !important;
        color: var(--luxury-black) !important;
        border-color: rgba(201, 169, 97, 0.2) !important;
        transform: scale(1.05) !important;
    }
    
    .sffc-menu-icon svg {
        width: 20px !important;
        height: 20px !important;
        margin: 0 auto !important;
    }
    
    /* Main Background - One Color */
    body {
        background: rgb(255, 255, 247) !important;
    }
    
    .sffc-opportunities-wrapper {
        background: rgb(255, 255, 247) !important;
        min-height: 100vh;
        position: relative;
        overflow-x: hidden;
    }
    
    /* ============================================
       HEADER - MINIMAL & ELEGANT
       ============================================ */
    
    .sffc-opp-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--header-height);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--luxury-border);
        z-index: var(--z-header);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 var(--space-xl);
    }
    
    /* Brand - Minimal */
    .sffc-brand {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .sffc-brand-logo {
        width: 40px;
        height: 40px;
        background: var(--luxury-gold);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sffc-brand-s {
        font-size: 20px;
        font-weight: 600;
        color: white;
        font-family: 'Playfair Display', serif;
    }
    
    .sffc-brand-text {
        font-size: 18px;
        font-weight: 500;
        color: var(--luxury-black);
        font-family: 'Inter', sans-serif;
        letter-spacing: -0.02em;
    }
    
    /* Center Title */
    .sffc-user-header {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }
    
    .sffc-opp-title {
        font-size: 20px;
        font-weight: 400;
        color: var(--luxury-black);
        font-family: 'Playfair Display', serif;
        margin: 0;
    }
    
    .user-first-name {
        color: var(--luxury-gold);
        font-weight: 600;
    }
    
    /* Navigation Pills */
    .conversation-stage {
        display: flex;
        gap: var(--space-xs);
    }
    
    .stage-indicators {
        display: flex;
        gap: 4px;
        padding: 4px;
        background: var(--luxury-bg);
        border-radius: 24px;
    }
    
    .stage-indicator {
        padding: 8px 20px;
        background: transparent;
        border: none;
        border-radius: 20px;
        color: var(--luxury-gray);
        font-size: 14px;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .stage-indicator:hover {
        background: white;
        color: var(--luxury-black);
    }
    
    .stage-indicator.active {
        background: var(--luxury-gold);
        color: white;
    }
    
    /* Profile Actions */
    .sffc-profile-actions {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }
    
    #currency-selector-container {
        display: flex;
    }
    
    .sffc-edit-profile-btn {
        padding: 8px 20px;
        background: transparent;
        border: 1px solid var(--luxury-border);
        border-radius: 20px;
        color: var(--luxury-black);
        font-size: 14px;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .sffc-edit-profile-btn:hover {
        background: var(--luxury-gold);
        color: white;
        border-color: var(--luxury-gold);
    }
    
    .sffc-edit-profile-btn span {
        display: inline-block;
        margin-left: 4px;
    }
    
    /* ============================================
       MAIN CONTAINER - PROPERLY CENTERED
       ============================================ */
    
    .sffc-main-container {
        padding-top: var(--header-height);
        padding-left: 0 !important; /* Remove left padding */
        min-height: 100vh;
        display: flex;
        justify-content: center;
        position: relative;
    }
    
    .sffc-conversational-view {
        width: 100%;
        max-width: var(--content-max-width);
        padding: var(--space-xl);
        margin: 0 auto;
        display: flex;
        flex-direction: column;
    }
    
    /* ============================================
       SEARCH BAR - INTEGRATED & CLEAN
       ============================================ */
    
    .sffc-message-search {
        margin-bottom: var(--space-lg);
        position: relative;
        z-index: 10;
    }
    
    .sffc-search-wrapper {
        max-width: 600px;
        margin: 0 auto;
        position: relative;
    }
    
    .sffc-search-input {
        width: 100%;
        height: 48px;
        padding: 0 48px 0 20px;
        background: var(--luxury-surface);
        border: 1px solid var(--luxury-border);
        border-radius: 24px;
        font-size: 15px;
        color: var(--luxury-black);
        font-family: 'Inter', sans-serif;
        transition: all 0.2s ease;
    }
    
    .sffc-search-input:focus {
        outline: none;
        background: white;
        border-color: var(--luxury-gold);
        box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
    }
    
    .sffc-search-icon {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        color: var(--luxury-gray);
        pointer-events: none;
    }
    
    /* ============================================
       CHAT AREA - CENTERED & CLEAN
       ============================================ */
    
    .sffc-chat-area {
        flex: 1;
        overflow-y: auto;
        padding: var(--space-lg) 0;
        padding-bottom: 120px; /* Space for input */
    }
    
    /* Custom Scrollbar */
    .sffc-chat-area::-webkit-scrollbar {
        width: 6px;
    }
    
    .sffc-chat-area::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .sffc-chat-area::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
    }
    
    /* Messages Container */
    .senna-messages {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Individual Messages */
    .senna-message {
        margin-bottom: var(--space-lg);
        opacity: 0;
        animation: fadeInUp 0.4s ease forwards;
    }
    
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
        from {
            opacity: 0;
            transform: translateY(10px);
        }
    }
    
    /* User Messages */
    .sffc-message-user {
        display: flex;
        justify-content: flex-end;
    }
    
    .sffc-message-user .message-content {
        background: var(--luxury-gold);
        color: white;
        padding: 14px 20px;
        border-radius: 20px 20px 4px 20px;
        max-width: 60%;
        font-size: 15px;
        line-height: 1.5;
        font-family: 'Inter', sans-serif;
    }
    
    /* Senna Messages */
    .sffc-message-senna {
        display: flex;
        justify-content: flex-start;
    }
    
    .sffc-message-senna .message-content {
        background: var(--luxury-surface);
        color: var(--luxury-black);
        padding: 14px 20px;
        border-radius: 20px 20px 20px 4px;
        max-width: 60%;
        font-size: 15px;
        line-height: 1.5;
        font-family: 'Inter', sans-serif;
        border: 1px solid var(--luxury-border);
    }
    
    /* Job Cards Grid */
    .job-cards-in-chat {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-lg);
        margin: var(--space-lg) 0;
    }
    
    .job-card-vogue {
        background: var(--luxury-surface);
        backdrop-filter: blur(10px);
        border: 1px solid var(--luxury-border);
        border-radius: 12px;
        padding: var(--space-lg);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .job-card-vogue:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
        background: white;
    }
    
    .vogue-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--luxury-black);
        font-family: 'Inter', sans-serif;
        margin-bottom: var(--space-sm);
    }
    
    .vogue-company {
        font-size: 14px;
        color: var(--luxury-gray);
        margin-bottom: var(--space-md);
    }
    
    .vogue-meta {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-md);
        padding-top: var(--space-md);
        border-top: 1px solid var(--luxury-border);
    }
    
    .vogue-meta-item {
        font-size: 13px;
        color: var(--luxury-gray);
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    /* Quick Options */
    .quick-options {
        display: flex;
        gap: var(--space-sm);
        margin: var(--space-md) 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .option-card {
        padding: 10px 20px;
        background: var(--luxury-surface);
        border: 1px solid var(--luxury-border);
        border-radius: 20px;
        font-size: 14px;
        color: var(--luxury-gray);
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .option-card:hover {
        background: var(--luxury-gold);
        color: white;
        border-color: var(--luxury-gold);
    }
    
    /* ============================================
       INPUT AREA - TRANSPARENT & FIXED
       ============================================ */
    
    .senna-input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent; /* TRANSPARENT as requested */
        padding: var(--space-lg);
        z-index: var(--z-input);
        pointer-events: none; /* Allow clicking through transparent area */
    }
    
    .senna-input-wrapper {
        max-width: var(--content-max-width);
        margin: 0 auto;
        display: flex;
        gap: var(--space-md);
        align-items: center;
        pointer-events: auto; /* Enable interaction only on input elements */
    }
    
    #senna-input {
        flex: 1;
        height: 52px;
        padding: 0 var(--space-lg);
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--luxury-border);
        border-radius: 26px;
        font-size: 15px;
        color: var(--luxury-black);
        font-family: 'Inter', sans-serif;
        transition: all 0.2s ease;
    }
    
    #senna-input:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.95);
        border-color: var(--luxury-gold);
        box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
    }
    
    #senna-input::placeholder {
        color: var(--luxury-gray);
    }
    
    .senna-send-btn {
        width: 52px;
        height: 52px;
        padding: 0;
        background: var(--luxury-gold);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .senna-send-btn:hover {
        background: var(--luxury-gold-dark);
        transform: scale(1.05);
    }
    
    .senna-send-btn:active {
        transform: scale(0.95);
    }
    
    .senna-send-btn svg {
        width: 20px;
        height: 20px;
        color: white;
    }
    
    /* ============================================
       SHORTLIST - PROPERLY POSITIONED RIGHT SIDE
       ============================================ */
    
    .sffc-shortlist-floating {
        position: fixed !important;
        top: 50% !important; /* Center vertically like the toggle */
        transform: translateY(-50%) !important; /* Center adjustment */
        right: 20px !important; /* Visible on right side */
        max-height: 70vh !important; /* Limit height */
        width: var(--shortlist-width) !important;
        background: white !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 12px !important;
        z-index: 100 !important;
        display: flex !important;
        flex-direction: column !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    }
    
    .sffc-shortlist-floating.active {
        right: 0; /* Slide in from right */
    }
    
    /* Shortlist Toggle Button - REPLACED BY APPLICATION TRACKER WIDGET */
    .shortlist-toggle {
        display: none !important; /* Hidden - using application tracker widget instead */
    }
    
    /* Shortlist Header */
    .sffc-shortlist-header {
        padding: var(--space-lg);
        background: var(--luxury-gold);
        color: white;
        cursor: default;
    }
    
    .sffc-shortlist-title {
        font-size: 20px;
        font-weight: 600;
        font-family: 'Playfair Display', serif;
        margin: 0;
    }
    
    .sffc-shortlist-subtitle {
        font-size: 14px;
        margin-top: 4px;
        opacity: 0.9;
    }
    
    /* Shortlist Content */
    .sffc-shortlist-content {
        flex: 1;
        overflow-y: auto;
        padding: var(--space-lg);
    }
    
    .sffc-shortlist-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .sffc-shortlist-content::-webkit-scrollbar-thumb {
        background: rgba(201, 169, 97, 0.3);
        border-radius: 2px;
    }
    
    .sffc-empty {
        text-align: center;
        color: var(--luxury-gray);
        padding: var(--space-xl);
        font-style: italic;
    }
    
    /* Shortlist Actions */
    .sffc-shortlist-actions {
        padding: var(--space-lg);
        background: white;
        border-top: 1px solid var(--luxury-border);
    }
    
    .sffc-analyze-btn {
        width: 100%;
        padding: 14px;
        background: var(--luxury-gold);
        color: white;
        border: none;
        border-radius: 24px;
        font-size: 15px;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .sffc-analyze-btn:hover {
        background: var(--luxury-gold-dark);
    }
    
    /* ============================================
       PROFILE BUILDER - MODAL
       ============================================ */
    
    .sffc-profile-builder-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: var(--z-modal);
        display: none;
        align-items: center;
        justify-content: center;
    }
    
    .sffc-profile-builder-overlay.active {
        display: flex;
    }
    
    .sffc-profile-builder {
        width: 90%;
        max-width: 1200px;
        max-height: 90vh;
        background: white;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }
    
    /* ============================================
       RESPONSIVE ADJUSTMENTS
       ============================================ */
    
    /* Larger screens */
    @media (min-width: 1400px) {
        :root {
            --content-max-width: 1100px;
        }
        
        .job-cards-in-chat {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    
    @media (min-width: 1600px) {
        :root {
            --content-max-width: 1200px;
        }
    }
    
    /* When shortlist is open, adjust content */
    .sffc-shortlist-floating.active ~ .sffc-main-container .sffc-conversational-view {
        padding-right: calc(var(--shortlist-width) + var(--space-xl));
    }
}