/**
 * Premium Vogue Mobile Header Buttons
 * Luxury styling for mobile header interactions
 */

/* Mobile Header Buttons Container */
@media (max-width: 768px) {
    .mobile-header-buttons {
        display: flex !important;
        gap: 2px;
        padding: 8px 4px;
        width: 100%;
        justify-content: space-around;
        background: #FBF7F0; /* Cream background */
        border-bottom: 2px solid #C9A961; /* Gold border */
        position: fixed;
        top: 0; /* At the top of the screen */
        left: 0;
        right: 0;
        z-index: 10000; /* Higher z-index for visibility */
        box-shadow: 0 2px 10px rgba(26, 48, 40, 0.1);
    }
    
    /* Premium Mobile Header Button - Rectangle Design */
    .mobile-header-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 10px 4px;
        background: transparent;
        border: none;
        border-radius: 0; /* Rectangle - no radius */
        color: #1A3028; /* Forest green */
        font-family: 'SF Pro Display', -apple-system, sans-serif;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: -0.02em;
        transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-header-btn svg {
        width: 22px;
        height: 22px;
        stroke-width: 2;
        transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }
    
    .mobile-header-btn span {
        transition: all 0.3s ease;
    }
    
    /* Active/Hover States */
    .mobile-header-btn:active {
        transform: scale(0.95);
        background: rgba(201, 169, 97, 0.1); /* Light gold background */
    }
    
    .mobile-header-btn.active,
    .mobile-header-btn:focus {
        color: #C9A961; /* Gold text */
        background: rgba(201, 169, 97, 0.08);
        border-bottom: 2px solid #C9A961;
    }
    
    .mobile-header-btn.active svg {
        stroke: #C9A961;
        filter: drop-shadow(0 1px 2px rgba(201, 169, 97, 0.3));
    }
    
    /* Apply button special styling - primary action */
    .mobile-header-btn.apply-btn {
        background: #C9A961 !important;
        color: white !important;
    }
    
    .mobile-header-btn.apply-btn svg {
        stroke: white !important;
    }
    
    .mobile-header-btn.apply-btn:active {
        background: #B8935A !important;
    }
    
    /* Search button styling */
    .mobile-header-btn.search-btn svg {
        stroke: #1A3028;
    }
    
    /* Ensure buttons are always visible on mobile */
    .mobile-header-buttons {
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
    }
    
    /* Hide conflicting top elements */
    .app-tab-bar,
    .sffc-opp-header {
        display: none !important;
    }
    
    /* Adjust content to not be hidden behind header buttons */
    body {
        padding-top: 60px !important;
    }
    
    .sffc-messages-container,
    .ultimate-messages,
    .senna-messages,
    .sffc-conversational-view {
        padding-top: 70px !important;
    }
    
    /* Tracker Count Badge */
    .tracker-count {
        position: absolute;
        top: 4px;
        right: 50%;
        transform: translateX(10px);
        background: #1A3028; /* Forest green */
        color: white;
        width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 700;
        box-shadow: 0 2px 4px rgba(26, 48, 40, 0.3);
    }
}

/* Search Overlay - Premium Vogue Style */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-search-overlay.active {
    display: flex;
    flex-direction: column;
}

.mobile-search-overlay.visible {
    opacity: 1;
}

.search-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-overlay-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    flex: 1;
    text-align: center;
}

.search-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.search-close-btn svg {
    width: 20px;
    height: 20px;
}

.search-overlay-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Premium Search Input */
.premium-search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.premium-search-input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 16px;
    font-family: 'SF Pro Display', -apple-system, sans-serif;
    color: #1a1a2e;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.premium-search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.premium-search-input:focus {
    outline: none;
    border-color: #C9A961;
    background: white;
    box-shadow: 
        0 12px 40px rgba(201, 169, 97, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

.premium-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1A3028 0%, #C9A961 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.premium-search-btn svg {
    width: 20px;
    height: 20px;
}

/* Search Suggestions */
.search-suggestions {
    margin-bottom: 24px;
}

.search-suggestions h4 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chips .chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chips .chip:hover {
    background: rgba(201, 169, 97, 0.3);
    border-color: #C9A961;
    transform: scale(1.05);
}

/* Shortlist Popup - Premium Vogue Style */
.mobile-shortlist-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-shortlist-popup.active {
    display: flex;
    flex-direction: column;
}

.mobile-shortlist-popup.visible {
    opacity: 1;
}

.mobile-shortlist-popup.visible .shortlist-popup-content {
    transform: translateY(0);
}

.shortlist-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(180deg, 
        rgba(201, 169, 97, 0.1) 0%,
        rgba(26, 48, 40, 0.05) 100%);
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.shortlist-popup-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.shortlist-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shortlist-close-btn svg {
    width: 20px;
    height: 20px;
}

.shortlist-popup-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Empty State */
.shortlist-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.shortlist-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    stroke: rgba(255, 255, 255, 0.3);
    margin-bottom: 16px;
}

.shortlist-empty-state p {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.shortlist-empty-state span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Shortlist Items */
.mobile-shortlist-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.mobile-shortlist-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

/* Shortlist Footer */
.shortlist-popup-footer {
    padding: 20px;
    background: linear-gradient(180deg, 
        rgba(201, 169, 97, 0.05) 0%,
        rgba(26, 48, 40, 0.1) 100%);
    border-top: 1px solid rgba(201, 169, 97, 0.2);
}

.analyze-shortlist-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1A3028 0%, #C9A961 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 8px 24px rgba(26, 48, 40, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.analyze-shortlist-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(26, 48, 40, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.analyze-shortlist-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Senna Container Adjustments */
@media (max-width: 768px) {
    .senna-ultimate-container.mobile-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        z-index: 99998 !important;
    }
    
    body.senna-open {
        overflow: hidden;
    }
    
    body.overlay-open {
        overflow: hidden;
    }
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Button Ripple Effect */
.mobile-header-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(201, 169, 97, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mobile-header-btn:active::after {
    width: 100px;
    height: 100px;
}