/* ============================================
   MYNTEXA AI LANDING PAGE - STYLE.CSS
   Simple, Professional, Minimal Design
   ============================================ */

/* ========== 1. CSS RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* ========== 2. CSS VARIABLES ========== */
:root {
    /* Backgrounds */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    
    /* Accent Colors */
    --color-indigo: #6366F1;
    --color-mint: #4ADE80;
    --color-violet: #8B5CF6;
    --color-purple: #A855F7;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-accent: linear-gradient(135deg, #4ADE80 0%, #6366F1 100%);
    --gradient-hero: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Shadows */
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-button: 0 8px 24px rgba(99, 102, 241, 0.25);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Font Sizes - Mobile & Tablet (default) */
    --h1: 40px;
    --h2: 32px;
    --h3: 24px;
    --body: 16px;
    
    /* Spacing - Mobile & Tablet (default) */
    --section-padding: 60px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Enhancement (1024px and above) */
@media (min-width: 1024px) {
    :root {
        /* Font Sizes - Desktop */
        --h1: 64px;
        --h2: 48px;
        --h3: 32px;
        --body: 18px;
        
        /* Spacing - Desktop */
        --section-padding: 80px;
    }
}

/* ========== 3. BASE STYLES ========== */
body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--body);
}

/* Smooth scroll with offset for fixed header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 25px; /* Header height + small margin */
}

section {
    scroll-margin-top: 25px;
}

#hero {
    scroll-margin-top: 0; /* No offset for hero */
}

/* ========== 4. UTILITY CLASSES ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 5. HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switch {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switch:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--color-mint);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
}

.mobile-menu.active {
    transform: translateY(0);
    pointer-events: auto;
    opacity: 1;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.mobile-nav-link {
    padding: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

/* Mobile Header */
@media (max-width: 1023px) {
    .header-container {
        padding: 12px 16px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .header-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .header-logo img {
        width: 28px;
        height: 28px;
    }
}

.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--body);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-full {
    width: 100%;
    margin-bottom: 32px; /* Space before footer */
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* Section Header Centered */
.section-header-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.section-subtitle-center {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ========== 6. HERO SECTION ========== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 24px var(--section-padding);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--h1);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--body);
    color: #ffffff;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ========== 7. WHAT WE DO SECTION ========== */
/* ========== 7. ABOUT SECTION ========== */
#about {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

/* ========== 8. SERVICES SECTION ========== */
#services {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--color-indigo);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card h3 {
    font-size: var(--h3);
    margin-bottom: 16px;
    color: var(--text-primary);
}

.service-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== 9. BOOKING/CONTACT FORM ========== */
#booking {
    padding-top: 10px;
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease;
}

.form-message.success {
    display: block;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
    border: 1px solid var(--accent-mint);
    color: var(--accent-mint);
}

.form-message.error {
    display: block;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid #ef4444;
    color: #ef4444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--body);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #ef4444;
    animation: shake 0.3s ease;
}

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

.form-error {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

.form-error.show {
    display: block;
    animation: slideDown 0.2s ease;
}

.form-legal {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-mint);
}

.form-legal p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.form-legal a {
    color: var(--accent-mint);
    text-decoration: none;
    font-weight: 500;
}

.form-legal a:hover {
    text-decoration: underline;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5L7 9L11 5' stroke='%236366F1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-group select:hover {
    border-color: var(--primary);
}

.form-group select option {
    padding: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}


/* ========== 10. AI BUTTONS (FIXED) ========== */
.ai-buttons-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.ai-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    animation: pulse 2s infinite;
}

.ai-btn:hover:not(:disabled) {
    transform: scale(1.1) rotate(5deg);
}

.ai-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-btn[data-platform="telegram"]:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.5);
    border-color: #0088CC;
}

.ai-btn[data-platform="whatsapp"]:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
    border-color: #25D366;
}

.ai-btn[data-platform="livechat"]:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    border-color: var(--color-indigo);
}

.ai-btn[data-platform="call"]:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    border-color: var(--color-mint);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-card);
    }
    50% {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }
}

/* Mobile & Tablet AI Buttons */
@media (max-width: 1023px) {
    .ai-buttons-container {
        bottom: 16px;
        right: 16px;
    }
    
    .ai-btn {
        width: 48px;
        height: 48px;
    }
    
    .ai-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ========== 11. MODALS ========== */
.modal {
    display: none !important;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: var(--h3);
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-form .form-group {
    margin-bottom: 16px;
}

/* Chat Modal Specific Styles */
.chat-modal {
    max-width: 450px;
    padding: 0;
    overflow: hidden;
    height: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    /* Prevent scrolling behind modal */
    overscroll-behavior: contain;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.chat-status {
    font-size: 12px;
    color: var(--secondary);
    display: block;
    margin-top: 2px;
}

.chat-header .modal-close {
    position: static;
    color: white;
    font-size: 28px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: messageSlideIn 0.3s ease-out;
}

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

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--secondary);
}

.message-content {
    max-width: 70%;
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.message-content a {
    color: var(--accent-mint);
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.2s;
}

.message-content a:hover {
    opacity: 0.8;
}

.user-message .message-content p {
    color: white;
}

.user-message .message-content a {
    color: white;
    text-decoration: underline;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

.chat-input-form {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.chat-input-form input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.chat-input-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

@media (max-width: 768px) {
    .chat-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
        /* Fix for iOS Safari */
        height: -webkit-fill-available;
        max-height: -webkit-fill-available;
    }
    
    .chat-messages {
        /* Ensure scrolling works on mobile */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .chat-input-form {
        padding: 12px 16px;
        /* Prevent keyboard from covering input on iOS */
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }
}

/* ========== 12. FOOTER ========== */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-contact {
    display: flex;
    align-items: center;
}

.footer-email {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-email:hover {
    color: var(--accent-mint);
}

.footer-email svg {
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-link:nth-child(1):hover {
    color: #0077B5; /* LinkedIn blue */
}

.social-link:nth-child(2):hover {
    color: #1877F2; /* Facebook blue */
}

.social-link:nth-child(3):hover {
    color: #E4405F; /* Instagram pink */
}

.social-link:nth-child(4):hover {
    color: #0088CC; /* Telegram blue */
}

.social-link:nth-child(5):hover {
    color: #25D366; /* WhatsApp green */
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-indigo);
}

.separator {
    color: var(--text-secondary);
}

/* Mobile & Tablet Footer */
@media (max-width: 1023px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .footer-copyright {
        order: 4;
    }
    
    .footer-contact {
        order: 1;
    }
    
    .footer-social {
        order: 2;
    }
    
    .footer-links {
        order: 3;
        flex-direction: column;
    }
    
    .separator {
        display: none;
    }
}

/* ========== 13. ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus states for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-indigo);
    outline-offset: 2px;
}

/* ========== 14. LOADING STATE ========== */
button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 15. TOAST NOTIFICATIONS ========== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast.success {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.05));
    border-color: var(--accent-mint);
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: #ef4444;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--accent-mint);
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast-content {
    flex: 1;
}

.toast-message {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    #toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}
