/* Thai font support */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

/* Language Switcher Component */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.language-switcher button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.language-switcher button:hover {
    background: var(--light-gray);
}

.language-switcher button.active {
    background: var(--primary-blue);
    color: white;
}

/* Login page language switcher */
.login-container .language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
}

.login-container .language-switcher button {
    color: rgba(255, 255, 255, 0.8);
}

.login-container .language-switcher button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.login-container .language-switcher button.active {
    background: white;
    color: var(--primary-blue);
}

/* Improved UI Styles */
body {
    font-family: 'Inter', 'Segoe UI', 'Sukhumvit Set', sans-serif;
}

body[data-lang="th"] {
    font-family: 'Sarabun', 'Sukhumvit Set', sans-serif;
}

/* Smooth animations */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Clean card design */
.form-container,
.list-container,
.dashboard-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Improved input focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(44, 75, 124, 0.08);
}

/* Better button hover effects */
.btn-primary,
.btn-secondary,
.btn-danger {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(44, 75, 124, 0.25);
}

/* Improved table */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: #F0F4F8;
    transform: translateX(2px);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive font sizes */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
        padding: 6px;
    }
    
    .language-switcher button {
        padding: 6px 12px;
        font-size: 12px;
    }
}
