/**
 * Vogue Premium Fixes
 * Comprehensive fixes for all UI issues
 */

/* ============================================
   FLOATING MENU BAR - VERTICAL LEFT SIDE
   ============================================ */

/* Hide the desktop stage indicators in header */
.conversation-stage .stage-indicators {
    display: none !important;
}

/* Vertical floating menu bar on left */
.sffc-floating-menu-bar {
    position: fixed !important;
    left: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    background: white !important;
    padding: 20px 16px !important;
    border-radius: 20px !important;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    z-index: 75 !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    width: 80px !important;
}

.sffc-floating-menu-bar:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 5px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-50%) translateX(4px) !important;
}

/* Stage Icons - Vertical Design */
.sffc-menu-icon {
    width: 48px !important;
    height: 48px !important;
    background: transparent !important;
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    color: #6B6B6B !important;
    position: relative !important;
}

.sffc-menu-icon:hover {
    background: var(--vogue-black) !important;
    border-color: var(--vogue-black) !important;
    color: white !important;
    transform: scale(1.1) !important;
}

.sffc-menu-icon.active {
    background: linear-gradient(135deg, var(--vogue-gold), #B8935A) !important;
    color: white !important;
    border-color: var(--vogue-gold) !important;
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.3) !important;
}

.sffc-menu-icon svg {
    width: 24px !important;
    height: 24px !important;
    stroke-width: 2 !important;
}

/* Tooltips on Right */
.sffc-menu-icon::before {
    content: attr(title);
    position: absolute;
    left: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--vogue-black);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.sffc-menu-icon::after {
    content: '';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid var(--vogue-black);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sffc-menu-icon:hover::before,
.sffc-menu-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   CONTENT ADJUSTMENT FOR LEFT SIDEBAR
   ============================================ */

/* Add left padding to main content to account for vertical menu */
.sffc-main-container {
    padding-left: 120px !important;
    transition: padding 0.3s ease !important;
}

@media (max-width: 768px) {
    .sffc-main-container {
        padding-left: 80px !important;
    }
}

/* ============================================
   HEADER REORGANIZATION & WIDTH
   ============================================ */

.sffc-opp-header {
    max-width: 100% !important;
    width: 100% !important;
    padding: 24px 48px !important;
    display: flex !important;
    align-items: center !important;
    gap: 32px !important;
}

/* Brand First */
.sffc-brand {
    order: 1 !important;
    flex: 0 0 auto !important;
}

/* User Header Second */
.sffc-user-header {
    order: 2 !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.sffc-opp-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    color: var(--vogue-black) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.sffc-title-underline {
    display: none !important;
}

/* Stage Indicators Third */
.conversation-stage {
    order: 3 !important;
    flex: 0 0 auto !important;
}

/* Profile Actions Last */
.sffc-profile-actions {
    order: 4 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

/* ============================================
   JOB CARDS IN CHAT - INCREASED WIDTH
   ============================================ */

.job-cards-in-chat {
    margin: 32px 0 !important;
    display: grid !important;
    gap: 20px !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Single column on mobile */
@media (max-width: 768px) {
    .job-cards-in-chat {
        grid-template-columns: 1fr !important;
    }
}

/* Two columns on tablet */
@media (min-width: 769px) and (max-width: 1199px) {
    .job-cards-in-chat {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Two wider columns on desktop for better readability */
@media (min-width: 1200px) {
    .job-cards-in-chat {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
}

/* Job Card Content Fix */
.job-card-vogue {
    min-height: 280px !important;
    padding: 28px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.vogue-title {
    font-size: 20px !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    margin-bottom: 8px !important;
}

.vogue-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 12px 0 !important;
}

.vogue-meta-item {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: ellipsis !important;
    max-width: none !important;
}

/* ============================================
   PROFILE BUILDER CHOICE GRID - PREMIUM FIXES
   ============================================ */

.sffc-pb-choice-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 20px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.sffc-pb-choice-btn {
    padding: 24px !important;
    background: white !important;
    border: 2px solid rgba(201, 169, 97, 0.15) !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-height: 120px !important;
    position: relative !important;
    overflow: hidden !important;
}

.sffc-pb-choice-btn:hover {
    border-color: var(--vogue-gold) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.15) !important;
}

/* Professional Icons for Choice Buttons */
.sffc-pb-choice-icon {
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, var(--vogue-gold), var(--vogue-gold-light)) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
}

.sffc-pb-choice-icon svg {
    width: 24px !important;
    height: 24px !important;
    color: white !important;
}

.sffc-pb-choice-label {
    font-family: 'Playfair Display', serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--vogue-black) !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

.sffc-pb-choice-description {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: var(--vogue-gray) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* Selected State */
.sffc-pb-choice-btn.selected {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05), rgba(201, 169, 97, 0.02)) !important;
    border-color: var(--vogue-gold) !important;
}

.sffc-pb-choice-btn.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--vogue-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sffc-pb-choice-btn.selected::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Multi-Choice Grid Specific */
.sffc-pb-multi-choice-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 16px !important;
}

.sffc-pb-multi-choice-grid .sffc-pb-choice-btn {
    min-height: 80px !important;
    padding: 16px !important;
}

/* Location Grid */
.sffc-pb-location-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
}

/* Salary Grid */
.sffc-pb-salary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.sffc-pb-salary-grid .sffc-pb-choice-btn {
    text-align: center !important;
    align-items: center !important;
}

/* ============================================
   REMOVE ALL EMOJIS - PROFESSIONAL ICONS ONLY
   ============================================ */

/* Hide any emoji content */
.sffc-pb-choice-emoji,
.choice-emoji,
.emoji-icon {
    display: none !important;
}

/* Replace with professional SVG icons */
.sffc-pb-choice-btn[data-value="entry-level"]::before,
.sffc-pb-choice-btn[data-value="mid-level"]::before,
.sffc-pb-choice-btn[data-value="senior"]::before,
.sffc-pb-choice-btn[data-value="executive"]::before {
    content: '';
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vogue-gold), var(--vogue-gold-light));
    border-radius: 12px;
    display: block;
    margin-bottom: 12px;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .sffc-floating-menu-bar {
        left: 8px !important;
        width: 60px !important;
        padding: 12px 8px !important;
        gap: 12px !important;
    }
    
    .sffc-menu-icon {
        width: 44px !important;
        height: 44px !important;
    }
    
    .sffc-menu-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Hide tooltips on mobile */
    .sffc-menu-icon::before,
    .sffc-menu-icon::after {
        display: none !important;
    }
    
    .sffc-opp-header {
        padding: 16px 20px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    
    .sffc-brand {
        order: 1 !important;
    }
    
    .sffc-user-header {
        order: 2 !important;
        width: 100% !important;
    }
    
    .conversation-stage {
        order: 3 !important;
        width: 100% !important;
    }
    
    .sffc-profile-actions {
        order: 4 !important;
        width: 100% !important;
        justify-content: flex-end !important;
    }
    
    .sffc-pb-choice-grid {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
    }
}

/* ============================================
   OVERFLOW FIXES
   ============================================ */

/* Prevent text overflow in all cards */
.sffc-pb-choice-btn *,
.job-card-vogue * {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Ensure proper text truncation where needed */
.text-truncate {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}