/* Accessibility Improvements */
*:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
    display: block !important;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    position: fixed;
    top: 70px;
    left: 10px;
    z-index: 10001;
    width: auto;
    height: auto;
    padding: 8px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 1;
    pointer-events: auto;
}

/* Smooth animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Enhanced buttons - Additional modern effects */
.start-button, .payment-button, .continue-consultation-btn {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.start-button:hover, .payment-button:hover, .continue-consultation-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(14, 165, 233, 0.25), 0 8px 24px rgba(14, 165, 233, 0.15);
}

.start-button:active, .payment-button:active, .continue-consultation-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Value list animations - Enhanced */
.value-list li {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(14, 165, 233, 0.1);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    margin: 0.25rem 0;
}

.value-list li:hover {
    transform: translateX(8px) scale(1.02);
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(14, 165, 233, 0.08) 100%);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

.value-list li:nth-child(1) { animation-delay: 0.1s; }
.value-list li:nth-child(2) { animation-delay: 0.2s; }
.value-list li:nth-child(3) { animation-delay: 0.3s; }
.value-list li:nth-child(4) { animation-delay: 0.4s; }
.value-list li:nth-child(5) { animation-delay: 0.5s; }

/* Trust indicators styling - Enhanced */
.social-proof {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 233, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(20, 184, 166, 0.08) 100%) !important;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    position: relative;
    overflow: hidden;
}

.social-proof::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    border-radius: 16px;
    pointer-events: none;
}

/* Availability notice enhancement */
.availability-notice {
    border-radius: 16px !important;
    border: 2px solid rgba(34, 197, 94, 0.3) !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15) !important;
    position: relative;
    overflow: hidden;
}

.availability-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.08) 100%);
    border-radius: 16px;
    pointer-events: none;
}

/* Loading progress enhancement */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-bar {
    background: linear-gradient(90deg,
        #3498db 0%,
        #5dade2 25%,
        #2ecc71 50%,
        #5dade2 75%,
        #3498db 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .value-list {
        font-size: 0.95rem;
    }

    .social-proof {
        flex-direction: column;
        gap: 1rem;
    }

    .start-button, .payment-button {
        width: 100%;
        font-size: 1rem;
        padding: 14px 24px;
    }

    /* Larger touch targets on mobile */
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .start-button, .payment-button {
        border: 2px solid currentColor;
    }

    .value-list li span {
        font-weight: bold;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Error state improvements */
.error-container {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success animation */
.success-checkmark {
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Improved card shadows and hover states */
.consultation-card {
    transition: box-shadow 0.3s ease;
}

.consultation-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Status indicator pulse */
.status-indicator {
    display: inline-block;
    animation: pulse 2s infinite;
}

/* Better mobile spacing */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .consultation-card {
        border-radius: 12px;
    }

    .value-proposition h2 {
        font-size: 1.25rem;
    }
}

/* Fullscreen styles */
.fullscreen-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.agent-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.agent-container.fullscreen .agent-header {
    padding: 16px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agent-container.fullscreen .agent-title {
    color: #ffffff;
    font-weight: 600;
}

.agent-container.fullscreen .agent-title span {
    color: #ffffff;
}

.agent-container.fullscreen .timer-label {
    color: #e2e8f0;
    font-weight: 500;
}

.agent-container.fullscreen .timer-display {
    color: #10b981;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(16, 185, 129, 0.3);
}

.agent-container.fullscreen .refresh-btn {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: #ffffff;
    border: 1px solid #6b7280;
    transition: all 0.3s ease;
}

.agent-container.fullscreen .refresh-btn:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.agent-container.fullscreen .invoice-btn {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #ffffff;
    border: 1px solid #4b5563;
    transition: all 0.3s ease;
}

.agent-container.fullscreen .invoice-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #6b7280;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.agent-container.fullscreen .agent-iframe {
    height: calc(100vh - 80px) !important;
    border-radius: 0 !important;
}

.agent-container.fullscreen .fullscreen-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.agent-container.fullscreen .fullscreen-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Hide scrollbar in fullscreen */
.agent-container.fullscreen {
    overflow: hidden;
}

/* Exit fullscreen button style */
.fullscreen-exit-text {
    display: none;
}

.agent-container.fullscreen .fullscreen-exit-text {
    display: inline;
}

.agent-container.fullscreen .fullscreen-text {
    display: none;
}

/* Print styles for invoices */
@media print {
    .header, .footer, .cookie-banner {
        display: none;
    }

    .invoice-download-container {
        padding: 0;
        margin: 0;
    }
}