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

/* Mobile Input Area - Fixed to Bottom */
@media (max-width: 768px) {
    .senna-input-area {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 12px 16px 20px !important;
        background: linear-gradient(to top, 
            rgba(255, 255, 255, 1) 0%, 
            rgba(255, 255, 255, 0.98) 50%,
            rgba(255, 255, 255, 0.95) 100%) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08) !important;
        z-index: 1000 !important;
        border-top: 1px solid rgba(229, 231, 235, 0.5) !important;
    }
    
    /* Adjust content area to not be hidden behind input */
    .sffc-messages-container,
    .ultimate-messages,
    .senna-messages,
    .sffc-conversational-view {
        padding-bottom: 120px !important;
    }
}

/* Vogue Style Input Design */
.senna-input-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    border-radius: 12px !important; /* Further reduced for vogue style */
    padding: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.senna-input-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.senna-input-wrapper:focus-within {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.senna-input {
    width: 100%;
    padding: 14px 50px 14px 18px !important;
    background: white;
    border: none !important; /* Remove all borders */
    outline: none !important;
    border-radius: 10px !important; /* Match wrapper radius minus padding */
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    color: #1f2937;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.senna-input::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-weight: 300;
}

.senna-input:focus {
    background: white;
    box-shadow: none !important;
}

/* Send Button Vogue Style */
.senna-send-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.senna-send-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.senna-send-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.senna-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
    transition: transform 0.3s ease;
}

.senna-send-btn:hover svg {
    transform: translateX(2px);
}

/* 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, #3b82f6 0%, #8b5cf6 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 */
}

/* Fix Apply Button Visibility on Cards */
.job-card-vogue .quick-apply-wrapper,
.job-card .quick-apply-wrapper,
.opportunity-card .quick-apply-wrapper {
    position: relative !important; /* Changed from absolute */
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    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: 10px 16px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-quick-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

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

.btn-quick-apply svg,
.btn-quick-apply .icon {
    width: 16px;
    height: 16px;
}

.btn-analyze-first {
    flex: 1;
    padding: 10px 16px !important;
    background: white !important;
    color: #4b5563 !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-analyze-first:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
}

/* 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;
}