/**
 * Senna Mobile & Vogue Styling
 * Enhanced visual design with mobile-first approach
 */

/* Mobile Premium Vogue Styling */
@media (max-width: 768px) {
    /* Hide trigger content on mobile */
    .senna-trigger-content {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Premium Vogue Input Area - Fixed to Bottom */
    .senna-input-area {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 0 !important;
        height: 65px !important;
        background: linear-gradient(180deg, 
            rgba(251, 247, 240, 0.95) 0%,
            rgba(251, 247, 240, 0.98) 50%,
            #FBF7F0 100%) !important;
        backdrop-filter: blur(20px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
        box-shadow: 
            0 -2px 10px rgba(26, 48, 40, 0.08) !important;
        z-index: 9998 !important;
        border: none !important;
        border-top: 1px solid rgba(201, 169, 97, 0.4) !important;
    }
    
    /* Luxe gradient overlay effect */
    .senna-input-area::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(201, 169, 97, 0.3) 20%,
            rgba(201, 169, 97, 0.4) 50%,
            rgba(201, 169, 97, 0.3) 80%,
            transparent 100%);
        animation: shimmer 3s ease-in-out infinite;
    }
    
    /* Adjust content area to not be hidden behind input at bottom and header at top */
    .sffc-messages-container,
    .ultimate-messages,
    .senna-messages,
    .sffc-conversational-view {
        padding-top: 70px !important; /* Space for header buttons at top */
        padding-bottom: 100px !important; /* Space for input at bottom */
    }
    
    @keyframes shimmer {
        0%, 100% { opacity: 0.5; transform: translateX(-100%); }
        50% { opacity: 1; transform: translateX(100%); }
    }
}

/* Premium Vogue Style Input Wrapper - Luxury Design */
.senna-input-wrapper {
    position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBF7F0 100%);
    border: none !important;
    border-radius: 0 !important;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: none !important;
    overflow: hidden;
}

/* Gold accent line animation */
.senna-input-wrapper::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #C9A961 20%, 
        #E5D4A1 50%, 
        #C9A961 80%, 
        transparent 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (max-width: 768px) {
    .senna-input-wrapper {
        background: linear-gradient(180deg, #FFFFFF 0%, #FBF7F0 100%);
        border: none !important;
        box-shadow: none !important;
        margin: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }
}

.senna-input-wrapper:hover {
    background: linear-gradient(180deg, #FFFFFF 0%, #F5EFE6 100%);
}

.senna-input-wrapper:focus-within {
    background: #FFFFFF;
}

.senna-input-wrapper:focus-within::before {
    transform: scaleX(1);
}

.senna-input {
    width: 100%;
    flex: 1;
    padding: 22px 70px 22px 24px !important;
    background: transparent !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: none !important;
    border-radius: 0 !important;
    font-size: 17px;
    font-family: 'Playfair Display', 'Georgia', serif;
    color: #1A3028;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: none !important;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Premium typography fallback */
.senna-input {
    font-family: -apple-system-ui-serif, ui-serif, 'Georgia', serif;
}

@media (max-width: 768px) {
    .senna-input {
        padding: 20px 75px 20px 20px !important;
        font-size: 18px;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        color: #1A3028;
        font-weight: 500;
        width: 100%;
        height: 100%;
        box-shadow: none !important;
    }
}

.senna-input::placeholder {
    color: rgba(26, 48, 40, 0.4);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-size: 16px;
}

/* Elegant placeholder animation */
@keyframes placeholderFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

.senna-input::placeholder {
    animation: placeholderFade 3s ease-in-out infinite;
}

/* Dynamic placeholder messages on mobile */
@media (max-width: 768px) {
    .senna-input::placeholder {
        font-size: 16px;
        letter-spacing: 0.3px;
    }
}

.senna-input:focus {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #1A3028;
    font-weight: 600;
}

.senna-input:focus::placeholder {
    opacity: 0;
    transform: translateX(10px);
}

/* Premium Vogue Send Button - Luxury Square Design */
.senna-send-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 65px;
    height: 100%;
    background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%);
    border: none !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: none !important;
    outline: none !important;
    overflow: hidden;
}

/* Premium gold shimmer effect */
.senna-send-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(229, 212, 161, 0.4) 50%, 
        transparent 70%);
    animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
    0% { transform: rotate(45deg) translate(-100%, -100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: rotate(45deg) translate(100%, 100%); opacity: 0; }
}

@media (max-width: 768px) {
    .senna-send-btn {
        width: 70px;
        height: 100%;
        background: linear-gradient(145deg, #C9A961 0%, #B8935A 50%, #C9A961 100%);
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

/* Luxury shimmer effect */
.senna-send-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.senna-send-btn:hover {
    background: linear-gradient(135deg, #B8935A 0%, #C9A961 100%);
    transform: scale(1.02);
}

.senna-send-btn:hover::after {
    animation-duration: 2s;
}

.senna-send-btn:active {
    background: #1A3028;
    transform: scale(0.98);
}

.senna-send-btn:active::after {
    display: none;
}

.senna-send-btn svg {
    width: 24px;
    height: 24px;
    color: white;
    stroke: white;
    fill: none;
    stroke-width: 2;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 2px 4px rgba(26, 48, 40, 0.2));
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .senna-send-btn svg {
        width: 26px;
        height: 26px;
        stroke-width: 2.5;
    }
}

.senna-send-btn:hover svg {
    transform: translateX(3px);
    filter: drop-shadow(0 3px 6px rgba(26, 48, 40, 0.3));
    stroke: #FBF7F0;
}

.senna-send-btn:active svg {
    transform: scale(0.85);
    stroke: #C9A961;
}

/* Premium send button icon animation */
.senna-send-btn.sending svg {
    animation: sendPulse 0.6s ease;
}

@keyframes sendPulse {
    0% { transform: scale(1) rotate(0); }
    50% { transform: scale(0.8) rotate(180deg); opacity: 0.5; }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

/* Increase Message Font Sizes */
.sffc-message-content {
    font-size: 16px !important;
    line-height: 1.7 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    color: #1f2937;
}

.message-text {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #374151;
}

/* User messages */
.sffc-message.user .sffc-message-content,
.message.user .message-text {
    font-size: 16px !important;
    color: white;
}

/* Visual Interactive Messages */
.sffc-message-content .visual-card,
.message-text .visual-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.visual-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Job Analytics Chart */
.job-analytics-chart {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.chart-value {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Salary Range Visual */
.salary-visual {
    background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    position: relative;
    overflow: hidden;
}

.salary-bar {
    height: 40px;
    background: linear-gradient(90deg, #C9A961 0%, #B8935A 100%);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.salary-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

/* Skills Match Visualization */
.skills-match-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.skill-badge {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-badge.matched {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
    color: #14532d;
}

.skill-badge.missing {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
    color: #7f1d1d;
}

/* Enhanced Visual Interactive Elements for Ultimate Messages */
.ultimate-messages .visual-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 20px;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transition: all 0.3s ease;
}

.ultimate-messages .job-analytics-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ultimate-messages .match-chart {
    display: flex;
    align-items: flex-end;
    height: 150px;
    gap: 12px;
    margin: 20px 0;
}

.ultimate-messages .match-bar {
    flex: 1;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
}

.ultimate-messages .match-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ultimate-messages .match-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

.ultimate-messages .info-graphic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.ultimate-messages .info-card {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.ultimate-messages .info-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.ultimate-messages .info-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 4px;
}

.ultimate-messages .info-card-label {
    font-size: 12px;
    color: #6b7280;
}

/* Job Match Score Circle */
.match-score-circle {
    width: 120px;
    height: 120px;
    margin: 16px auto;
    position: relative;
}

.match-score-circle svg {
    transform: rotate(-90deg);
}

.match-score-circle .score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.match-score-circle .score-label {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #6b7280;
}

/* Quick Apply Button in Job Cards */
.job-card-vogue {
    position: relative;
    padding-bottom: 60px; /* Make room for quick apply */
}

/* Premium Quick Apply Wrapper - Elegant Minimal Design */
.job-card-vogue .quick-apply-wrapper,
.job-card .quick-apply-wrapper,
.opportunity-card .quick-apply-wrapper {
    position: relative !important;
    display: flex;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(201, 169, 97, 0.08);
    z-index: 10;
}

/* Apply button for existing cards */
.job-card .apply-btn,
.opportunity-card .apply-button,
.job-card-vogue .apply-button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    padding: 12px 20px !important;
    margin-top: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center;
}

.job-card .apply-btn:hover,
.opportunity-card .apply-button:hover,
.job-card-vogue .apply-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

.btn-quick-apply {
    flex: 1;
    padding: 11px 16px !important;
    background: linear-gradient(135deg, #C9A961 0%, #B8935A 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 10px rgba(201, 169, 97, 0.18) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: 'SF Pro Text', -apple-system, sans-serif !important;
}

.btn-quick-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.28) !important;
    background: linear-gradient(135deg, #B8935A 0%, #C9A961 100%) !important;
}

.btn-quick-apply:active {
    transform: translateY(0);
}

.btn-quick-apply svg,
.btn-quick-apply .icon {
    width: 15px;
    height: 15px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.btn-quick-apply:hover svg,
.btn-quick-apply:hover .icon {
    opacity: 1;
    transform: scale(1.05);
}

.btn-analyze-first {
    flex: 1;
    padding: 11px 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #6b7280 !important;
    border: 1px solid rgba(201, 169, 97, 0.12) !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-family: 'SF Pro Text', -apple-system, sans-serif !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.btn-analyze-first:hover {
    background: rgba(201, 169, 97, 0.04) !important;
    border-color: rgba(201, 169, 97, 0.25) !important;
    color: #C9A961 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.12) !important;
}

.btn-analyze-first svg,
.btn-analyze-first .icon {
    width: 15px;
    height: 15px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-analyze-first:hover svg,
.btn-analyze-first:hover .icon {
    opacity: 1;
    transform: scale(1.05);
}

/* Ensure job cards have proper spacing */
.job-card-vogue,
.job-card,
.opportunity-card {
    padding-bottom: 16px !important;
    position: relative;
}

.job-card-vogue .job-details,
.job-card-vogue .job-content,
.job-card .job-details,
.job-card .job-content,
.opportunity-card .job-details,
.opportunity-card .job-content {
    margin-bottom: 8px;
}

/* Company Logo Enhancement */
.company-logo-visual {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 12px;
}

/* Interactive Job Timeline */
.job-timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    margin: 12px 0;
}

.timeline-step {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    position: relative;
}

.timeline-step.active {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    right: -6px;
}

.timeline-step.active .timeline-dot {
    border-color: #764ba2;
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-apply-wrapper {
        flex-direction: row !important; /* Keep buttons side by side on mobile */
    }
    
    .btn-quick-apply,
    .btn-analyze-first {
        flex: 1;
        font-size: 13px !important;
        padding: 10px 8px !important;
    }
    
    /* Ensure message font sizes are larger on mobile */
    .sffc-message-content,
    .message-text {
        font-size: 17px !important;
        line-height: 1.8 !important;
    }
}

/* Animation for visual elements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.visual-card,
.job-analytics-chart,
.salary-visual {
    animation: slideInUp 0.5s ease-out;
}

/* Pulse animation for match scores */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.match-score-circle.high-match {
    animation: pulse 2s infinite;
}

/* Additional fixes to ensure input field fills area with no borders */
@media (max-width: 768px) {
    /* Ensure input area fills width without padding */
    .senna-input-area {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Input wrapper fills the entire input area */
    .senna-input-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        height: 65px !important;
        width: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    /* Remove all borders and shadows from input */
    .senna-input,
    .senna-input:focus,
    .senna-input:hover,
    .senna-input:active {
        border: none !important;
        border-width: 0 !important;
        border-style: none !important;
        outline: none !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    /* Ensure send button has no borders */
    .senna-send-btn,
    .senna-send-btn:hover,
    .senna-send-btn:focus,
    .senna-send-btn:active {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    /* Remove any focus rings or outlines */
    *:focus {
        outline: none !important;
    }
}