/**
 * ============================================
 * Public Styles - ระบบรับสมัครงาน
 * สำหรับหน้าที่ผู้สมัครเห็น (ไม่ต้อง login)
 * Modern Theme - Emerald Accent
 * ============================================
 */

:root {
    --color-primary: #059669;
    --color-primary-dark: #047857;
    --color-primary-light: #d1fae5;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
}

/* Accessibility: Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

body {
    font-family: 'Sarabun', sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #f5f3f0; /* warm gray แทน cool gray */
}

/* Override Tailwind bg-gray-50 ให้เป็น warm tone */
.bg-gray-50 {
    background-color: #f5f3f0 !important;
}

/* ============================================
   Job Cards
   ============================================ */
.job-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 4px 12px rgb(0 0 0 / 0.03);
    border: 1px solid #e8e5e1;
    transition: all 200ms ease;
}

.job-card:hover {
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
    border-color: #d1fae5;
}

.job-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.job-type-teacher { background: #d1fae5; color: #065f46; }
.job-type-executive { background: #ede9fe; color: #5b21b6; }
.job-type-officer { background: #dbeafe; color: #1e40af; }
.job-type-housekeeper { background: #fef3c7; color: #92400e; }
.job-type-janitor { background: #fed7aa; color: #9a3412; }
.job-type-security { background: #e0e7ff; color: #3730a3; }
.job-type-driver { background: #cffafe; color: #155e75; }
.job-type-other { background: #f3f4f6; color: #374151; }
.job-type-support { background: #fef3c7; color: #92400e; }
.job-type-temporary { background: #fee2e2; color: #991b1b; }
.job-type-full_time { background: #d1fae5; color: #065f46; }
.job-type-part_time { background: #fef3c7; color: #92400e; }
.job-type-contract { background: #e0e7ff; color: #3730a3; }
.job-type-internship { background: #ecfdf5; color: #047857; }

/* ============================================
   Application Form
   ============================================ */
.form-section {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 4px 12px rgb(0 0 0 / 0.03);
    border: 1px solid #e8e5e1;
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #d1fae5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--color-primary);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-label .required {
    color: var(--color-danger);
    margin-left: 0.125rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #faf9f7;
    border: 1px solid #e0ddd9;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-family: 'Sarabun', sans-serif;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    background: #ffffff;
}

.form-input.error {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

/* ============================================
   File Upload
   ============================================ */
.file-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 200ms ease;
    background: #f9fafb;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--color-primary);
    background: #ecfdf5;
}

.file-upload-zone .icon {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

/* ============================================
   Status Tracker (legacy fallback)
   ============================================ */
.status-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    padding: 1rem 0;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.status-step-circle {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    border: 3px solid #e5e7eb;
    background: #ffffff;
    color: #9ca3af;
    z-index: 1;
    transition: all 0.3s ease;
}

.status-step.completed .status-step-circle {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #ffffff;
}

.status-step.current .status-step-circle {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.15);
    animation: pulseEmerald 2s infinite;
}

.status-step.rejected .status-step-circle {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #ffffff;
}

.status-step-line {
    width: 3.5rem;
    height: 3px;
    background: #e5e7eb;
    flex-shrink: 0;
    margin-top: -1.25rem;
    border-radius: 2px;
}

.status-step-line.completed {
    background: var(--color-success);
}

.status-step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.status-step.current .status-step-label,
.status-step.completed .status-step-label {
    color: #1e293b;
}

@keyframes pulseEmerald {
    0%, 100% { box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.15); }
    50% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0.05); }
}

/* ============================================
   Application Confirmation
   ============================================ */
.confirmation-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
    border: 1px solid #f3f4f6;
    text-align: center;
    max-width: 32rem;
    margin: 2rem auto;
}

.confirmation-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #ffffff;
    font-size: 2rem;
}

.application-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    display: inline-block;
    letter-spacing: 0.05em;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .form-section {
        padding: 1rem;
    }

    .status-step-line {
        width: 1.5rem;
    }

    .status-step-circle {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.75rem;
    }

    .application-code {
        font-size: 1.125rem;
    }
}

/* ============================================================
   LIQUID GLASS DESIGN SYSTEM (light) — 2026 redesign
   Apple/SaaS-inspired, school-friendly, emoji-free
   ============================================================ */
:root {
    --ink: #0f172a;
    --ink-soft: #475569;
    --ink-faint: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.66);
    --glass-bg-strong: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.75);
    --glass-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 1.5rem;
    --radius-xl: 1.75rem;
}

/* พื้นหลังสะอาดตามดีไซน์ Baiboon Careers (#fbfbfd) — ไม่ใช้ aurora mesh แล้ว */
html { background: #fbfbfd; min-height: 100%; }
body { background: transparent; }
.bg-gray-50 { background-color: transparent !important; }

/* ---- Glass surfaces ---- */
.glass-nav {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.04);
}
.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}
.glass-search {
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}
/* Fallback ถ้า browser ไม่รองรับ backdrop-filter */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .glass-nav, .glass-card { background: #ffffff; }
    .glass-search { background: #ffffff; }
}

/* ---- Hero (light) ---- */
.hero-aurora {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(38rem 28rem at 12% -5%, rgba(16, 185, 129, 0.18), transparent 60%),
        radial-gradient(36rem 28rem at 102% 8%, rgba(56, 189, 248, 0.16), transparent 55%),
        radial-gradient(28rem 22rem at 62% 120%, rgba(253, 224, 71, 0.16), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f1faf6 100%);
}
.hero-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(48px);
    opacity: 0.55;
    pointer-events: none;
}

/* ---- SaaS card ---- */
.ats-card {
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

/* ---- Buttons ---- */
.btn-emerald {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.30);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-emerald:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-emerald:active { transform: translateY(0); }

.btn-ghost-glass {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--ink);
    transition: background 0.2s ease, transform 0.2s ease;
}
.btn-ghost-glass:hover { background: rgba(255, 255, 255, 0.85); transform: translateY(-1px); }

/* ---- Icon chip (แทน emoji) ---- */
.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    color: #059669;
    flex-shrink: 0;
}

/* ---- Section heading ---- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #059669;
}

/* ---- Entrance animation ---- */
@keyframes floatUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: floatUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.12s; }
.reveal-3 { animation-delay: 0.19s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; }
    body { background-attachment: scroll; }
}

/* hide scrollbar utility (ใช้กับ filter pills) */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
   Brand green = Baiboon Careers design #1f8a4c
   remap Tailwind emerald (public pages) ให้เข้าชุดดีไซน์ใหม่
   ============================================================ */
.text-emerald-700, .text-emerald-600 { color: #1f8a4c !important; }
.bg-emerald-600 { background-color: #1f8a4c !important; }
.hover\:bg-emerald-700:hover { background-color: #196e3c !important; }
.hover\:text-emerald-700:hover, .hover\:text-emerald-600:hover { color: #196e3c !important; }
.bg-emerald-50 { background-color: #eef7f1 !important; }
.border-emerald-600 { border-color: #1f8a4c !important; }
.eyebrow { color: #1f8a4c; }
.icon-chip { background: linear-gradient(180deg, #eef7f1, #d7ecdf); color: #1f8a4c; }

/* ============================================================
   Baiboon Careers — upgrade shared components (apply / thank_you)
   ให้เข้าชุดดีไซน์ใหม่ + green accent
   ============================================================ */
.form-section {
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.form-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 980px;
    background: linear-gradient(180deg, #27a45e, #1f8a4c);
    display: inline-block;
    flex-shrink: 0;
}
.form-section-title i { color: #1f8a4c; }
.form-label { font-size: 13px; color: #6e6e73; font-weight: 500; margin-bottom: 6px; }
.form-input {
    background: #fbfbfd;
    border: 1px solid #e0e0e3;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
}
.form-input:focus { border-color: #1f8a4c; box-shadow: 0 0 0 3px rgba(31,138,76,.15); background: #fff; }
.form-input.error { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.file-upload-zone { border: 1.5px dashed #d2d2d7; border-radius: 14px; background: #fbfbfd; }
.file-upload-zone:hover, .file-upload-zone.dragover { border-color: #1f8a4c; background: #f5faf6; }

.confirmation-card {
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,.05);
    padding: 40px;
}
.confirmation-icon {
    background: linear-gradient(160deg, #27a45e, #1f8a4c);
    box-shadow: 0 12px 26px rgba(31,138,76,.28);
}
.application-code {
    font-family: 'IBM Plex Sans','IBM Plex Sans Thai',monospace;
    color: #1f8a4c;
    background: #eef7f1;
    border-radius: 14px;
    letter-spacing: .06em;
}
