/**
 * Thai Government Website Standards CSS
 * Based on DGA (Digital Government Development Agency) Guidelines
 * Compliant with TWCAG 2010 (Thai Web Content Accessibility Guidelines)
 */

/* ============================================
   THAI GOVERNMENT COLOR PALETTE
   ============================================ */
:root {
    /* Primary - Royal Blue (สีน้ำเงินราชการ) */
    --thai-royal-blue: #1e3a8a;
    --thai-royal-blue-dark: #1e40af;
    --thai-royal-blue-light: #3b82f6;
    --thai-navy: #0f172a;

    /* Secondary - Thai Gold (สีทอง) */
    --thai-gold: #d97706;
    --thai-gold-light: #fbbf24;
    --thai-gold-dark: #b45309;

    /* Neutrals */
    --thai-white: #ffffff;
    --thai-gray-50: #f9fafb;
    --thai-gray-100: #f3f4f6;
    --thai-gray-200: #e5e7eb;
    --thai-gray-300: #d1d5db;
    --thai-gray-600: #4b5563;
    --thai-gray-700: #374151;
    --thai-gray-900: #111827;

    /* Status Colors (Softer, Government-Appropriate) */
    --thai-success: #059669;
    --thai-success-light: #10b981;
    --thai-warning: #d97706;
    --thai-warning-light: #f59e0b;
    --thai-danger: #dc2626;
    --thai-danger-light: #ef4444;
    --thai-info: #0284c7;
    --thai-info-light: #0ea5e9;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Shadows (Subtle, Professional) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TYPOGRAPHY - THAI WEB FONTS
   ============================================ */
body {
    font-family: 'Sarabun', 'Noto Sans Thai', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--thai-gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
    font-weight: 600;
    line-height: 1.4;
    color: var(--thai-royal-blue-dark);
}

h1 {
    font-size: 2.25rem;
}

/* 36px */
h2 {
    font-size: 1.875rem;
}

/* 30px */
h3 {
    font-size: 1.5rem;
}

/* 24px */
h4 {
    font-size: 1.25rem;
}

/* 20px */
h5 {
    font-size: 1.125rem;
}

/* 18px */
h6 {
    font-size: 1rem;
}

/* 16px */

/* ============================================
   GOVERNMENT STANDARD COMPONENTS
   ============================================ */

/* Government Header */
.gov-header {
    background: linear-gradient(135deg, var(--thai-royal-blue) 0%, var(--thai-navy) 100%);
    color: var(--thai-white);
    padding: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
}

.gov-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--thai-white);
    margin: 0;
}

/* Government Cards */
.gov-card {
    background: var(--thai-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--thai-royal-blue);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.gov-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.gov-card-header {
    background: linear-gradient(135deg, var(--thai-royal-blue) 0%, var(--thai-royal-blue-dark) 100%);
    color: var(--thai-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 6px 6px 0 0;
    font-weight: 600;
}

.gov-card-gold .gov-card-header {
    background: linear-gradient(135deg, var(--thai-gold) 0%, var(--thai-gold-dark) 100%);
}

/* Government Buttons */
.btn-gov-primary {
    background: var(--thai-royal-blue);
    border: 2px solid var(--thai-royal-blue);
    color: var(--thai-white);
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-gov-primary:hover {
    background: var(--thai-royal-blue-dark);
    border-color: var(--thai-royal-blue-dark);
    color: var(--thai-white);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.btn-gov-gold {
    background: var(--thai-gold);
    border: 2px solid var(--thai-gold);
    color: var(--thai-white);
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-gov-gold:hover {
    background: var(--thai-gold-dark);
    border-color: var(--thai-gold-dark);
    color: var(--thai-white);
}

.btn-gov-outline {
    background: transparent;
    border: 2px solid var(--thai-royal-blue);
    color: var(--thai-royal-blue);
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-gov-outline:hover {
    background: var(--thai-royal-blue);
    color: var(--thai-white);
}

/* ============================================
   ACCESSIBILITY (WCAG 2.0 AA COMPLIANCE)
   ============================================ */

/* Focus Indicators - Very Important for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--thai-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* Skip to Content Link (Accessibility Best Practice) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--thai-royal-blue);
    color: var(--thai-white);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --thai-royal-blue: #000080;
        --thai-gold: #FFD700;
    }
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

/* Touch-Friendly Buttons (Minimum 44x44px) */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
}

/* ============================================
   GOVERNMENT STATUS BADGES
   ============================================ */
.badge-gov {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.badge-gov-primary {
    background: rgba(30, 58, 138, 0.1);
    color: var(--thai-royal-blue);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.badge-gov-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--thai-success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-gov-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--thai-gold);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-gov-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--thai-danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ============================================
   GOVERNMENT SECTION STYLING
   ============================================ */
.gov-section {
    padding: var(--spacing-2xl) 0;
}

.gov-section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--thai-royal-blue);
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-md);
    border-left: 5px solid var(--thai-gold);
}

.gov-section-light {
    background: var(--thai-gray-50);
}

/* ============================================
   GOVERNMENT FORMS
   ============================================ */
.gov-form-label {
    display: block;
    font-weight: 600;
    color: var(--thai-gray-700);
    margin-bottom: var(--spacing-xs);
}

.gov-form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 2px solid var(--thai-gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.gov-form-input:focus {
    border-color: var(--thai-royal-blue);
    outline: none;
}

.gov-form-input.error {
    border-color: var(--thai-danger);
}

/* ============================================
   PRINT STYLES (Government Document Standards)
   ============================================ */
@media print {
    body {
        color: black;
        background: white;
    }

    .no-print {
        display: none !important;
    }

    .gov-header {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }
}