/* Chaiyo Direct theme inspired by chaiyo.co.th
   Load after Bootstrap, Select2 and the four component stylesheets. */
:root {
    --chaiyo-blue: #1116a8;
    --chaiyo-blue-dark: #080d76;
    --chaiyo-blue-mid: #2638c7;
    --chaiyo-yellow: #ffdc00;
    --chaiyo-yellow-soft: #fff7c2;
    --chaiyo-red: #f33b50;
    --chaiyo-text: #202124;
    --chaiyo-muted: #5f6368;
    --chaiyo-border: #dfe3eb;
    --chaiyo-surface: #ffffff;
    --chaiyo-surface-soft: #f6f7fb;
    --chaiyo-radius: 12px;
    --chaiyo-shadow: 0 4px 18px rgba(17, 22, 168, .08);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body, html {
    font-family: 'Sarabun', sans-serif !important;
    color: var(--chaiyo-text);
}

body {
    font-size: 16px;
    line-height: 1.65;
    background: #fff;
}

body, p, li, label, input, textarea, select, button, .form-control,
.loan-selector, .loan-item, .loan-search, .consent-text, .faq-question,
.faq-answer, .repayment-page, .about-chaiyo {
    font-family: 'Sarabun', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--chaiyo-blue);
    font-family: 'Sarabun', sans-serif !important;
    font-weight: 700;
    line-height: 1.4;
}

p, li {
    color: inherit;
}

a {
    color: var(--chaiyo-blue);
    transition: color .18s ease;
}

    a:hover, a:focus {
        color: var(--chaiyo-blue-dark);
    }

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

button, .btn {
    border-radius: 8px;
    font-weight: 600;
}

/* Main Chaiyo palette */
.loan-label, .label-input100 {
    font-family: 'Sarabun', sans-serif !important;
}

.loan-selector, .custom-input, .custom-select-input,
.select2-container .select2-selection--single {
    font-family: 'Sarabun', sans-serif !important;
    color: var(--chaiyo-blue) !important;
}

.loan-selector {
    border: 1px solid var(--chaiyo-border) !important;
    border-radius: 8px;
    background: #fff;
}

    .loan-selector:hover, .loan-selector:focus-within {
        border-color: var(--chaiyo-blue) !important;
    }

.loan-menu {
    border: 1px solid var(--chaiyo-border) !important;
    border-radius: 10px;
    box-shadow: var(--chaiyo-shadow) !important;
}

.loan-item:hover, .loan-item.active {
    background: var(--chaiyo-yellow-soft);
}

.loan-item.active {
    color: var(--chaiyo-blue);
    font-weight: 700;
}

.loan-search {
    border: 1px solid var(--chaiyo-border) !important;
    border-radius: 8px;
}

.confirm-button, .rate-button {
    background: var(--chaiyo-blue) !important;
    color: #fff !important;
    border-radius: 10px;
}

    .confirm-button:hover, .rate-button:hover {
        background: var(--chaiyo-blue-dark) !important;
    }

.confirm-button {
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(17,22,168,.18);
}

.privacy-link {
    color: #0878d1 !important;
    text-decoration: underline;
}

/* Match Chaiyo's blue/yellow identity on page modules */
.loan-products-title, .about-section-heading h2, .repayment-header h1,
.payment-header h2, .faq-title, .compare-table-wrapper h2 {
    color: var(--chaiyo-blue) !important;
}

.steps-title {
    color: var(--chaiyo-text);
}

.loan-table thead th {
    background: #4774c5;
    color: #fff;
}

.loan-table tbody th, .loan-table tbody td {
    border-color: #fff;
}

.about-number, .service-icon, .office-icon {
    background: var(--chaiyo-yellow-soft);
}

.benefit-check {
    background: var(--chaiyo-blue);
}

.feature-card > span {
    background: var(--chaiyo-red);
}

.rate-card {
    background: #f3f4ff;
    border-left-color: var(--chaiyo-yellow);
}

.repayment-card {
    border-top-color: var(--chaiyo-blue);
}

.repayment-icon {
    background: var(--chaiyo-yellow-soft);
}

.repayment-highlight {
    background: #f3f4ff;
    color: var(--chaiyo-blue);
}

/* Floating LINE button: keep the whole label visible */
.floating-line-button {
    font-family: 'Sarabun', sans-serif !important;
    white-space: nowrap;
    width: max-content;
    max-width: calc(100vw - 24px);
}

    .floating-line-button .line-button-text {
        display: inline-block;
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        white-space: nowrap;
    }

    .floating-line-button .line-icon {
        flex: 0 0 38px;
    }

        .floating-line-button .line-icon svg {
            display: block;
            width: 38px;
            height: 38px;
        }

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    body {
        font-size: 15px;
    }

    .loan-selector, .loan-selector span, .custom-input, .custom-select-input,
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 17px !important;
    }

    .label-input100 {
        font-size: 15px !important;
    }

    .confirm-button {
        font-size: 20px !important;
    }
}

@media (max-width: 380px) {
    .floating-line-button {
        right: 12px !important;
        bottom: 14px !important;
        padding: 8px 13px 8px 9px !important;
        gap: 7px !important;
    }

        .floating-line-button .line-icon, .floating-line-button .line-icon svg {
            width: 32px;
            height: 32px;
            flex-basis: 32px;
        }
}
