/**
 * Shared guest design tokens.
 * Page-level styles live in resource/css/solution/{page}.css.
 */
:root {
    --mobile-bottom-bar-height: 79px;
    --primary: #0d6efd;
    --primary-dark: #0043a8;
    --secondary: #1e40af;
    --secondary-dark: #1e3a8a;
    --success: #198754;
    --danger: #ef4444;
    --warning: #ffc107;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --indigo-50: #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-200: #c7d2fe;
    --indigo-600: #4f46e5;

    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 50px;

    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --transition-base: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: #1f2937;
}

body {
    max-width: 100%;
    /* font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; */
    font-family: "Prompt", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    /* font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; */
    /* font-family: "Kanit", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; */
    /* font-family: "Sarabun", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    min-width: 0;
    overflow-x: clip;
    overflow-wrap: break-word;
}

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

button,
input,
select,
textarea {
    font-family: inherit !important;
}

body > main {
    flex: 1 0 auto;
    min-width: 0;
}

body > .custom-footer {
    flex: 0 0 auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent {
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 1030;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    width: min(720px, calc(100vw - 2.5rem));
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent__content {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    min-width: 0;
}

.cookie-consent__icon {
    display: grid;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: 1.2rem;
}

.cookie-consent__text h2 {
    margin: 0 0 0.25rem;
    color: var(--gray-900);
    font-size: 1rem;
    font-weight: 800;
}

.cookie-consent__text p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.65;
}

.cookie-consent__text a {
    color: var(--blue-700);
    font-weight: 700;
    text-decoration: none;
}

.cookie-consent__text a:hover {
    text-decoration: underline;
}

.cookie-consent__actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.cookie-consent__actions .btn {
    min-width: 5.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-bottom: calc(var(--mobile-bottom-bar-height) + env(safe-area-inset-bottom, 0px));
    }

    .cookie-consent {
        right: 1rem;
        bottom: calc(var(--mobile-bottom-bar-height) + 1rem + env(safe-area-inset-bottom, 0px));
        grid-template-columns: 1fr;
        width: calc(100vw - 2rem);
    }

    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__actions .btn {
        flex: 1 1 0;
    }
}

@media (max-width: 575.98px) {
    :root {
        --mobile-bottom-bar-height: 77px;
    }
}
