/* =========================================================
   Customer Service Register
   Modern Blue Premium UI
   Version 1.0.0
========================================================= */


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {

    --csr-primary: #2563eb;

    --csr-primary-dark: #1d4ed8;

    --csr-primary-deep: #0f3b82;

    --csr-sky: #38bdf8;

    --csr-light: #eff6ff;

    --csr-light-blue: #f8fbff;

    --csr-border: #dbe5f0;

    --csr-text: #172033;

    --csr-text-light: #64748b;

    --csr-placeholder: #94a3b8;

    --csr-white: #ffffff;

    --csr-danger: #dc2626;

    --csr-success: #16a34a;

    --csr-radius: 18px;

    --csr-shadow:
        0 20px 60px rgba(15, 59, 130, .12);

}


/* =========================================================
   WRAPPER
========================================================= */

.csr-register-wrapper {

    width: 100%;

    max-width: 820px;

    margin: 50px auto;

    padding: 0 18px;

    color: var(--csr-text);

    font-family:
        "Noto Sans Thai",
        "Leelawadee UI",
        "Tahoma",
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 16px;

    line-height: 1.7;

}


/* =========================================================
   CARD
========================================================= */

.csr-register-card {

    width: 100%;

    background: var(--csr-white);

    border-radius: 28px;

    overflow: hidden;

    border: 1px solid rgba(219, 229, 240, .9);

    box-shadow: var(--csr-shadow);

}


/* =========================================================
   HEADER
========================================================= */

.csr-register-header {

    position: relative;

    display: flex;

    align-items: center;

    gap: 22px;

    padding: 38px 42px;

    color: var(--csr-white);

    background:

        radial-gradient(
            circle at 85% 15%,
            rgba(56, 189, 248, .35),
            transparent 32%
        ),

        linear-gradient(
            135deg,
            #0f3b82 0%,
            #1d4ed8 50%,
            #2563eb 100%
        );

}


/* Decorative circle */

.csr-register-header::after {

    content: "";

    position: absolute;

    width: 180px;

    height: 180px;

    right: -70px;

    bottom: -100px;

    border-radius: 50%;

    background:
        rgba(255,255,255,.08);

}


/* =========================================================
   HEADER ICON
========================================================= */

.csr-header-icon {

    position: relative;

    z-index: 2;

    flex: 0 0 68px;

    width: 68px;

    height: 68px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 18px;

    background:
        rgba(255,255,255,.15);

    border:
        1px solid rgba(255,255,255,.25);

    box-shadow:
        0 10px 30px rgba(0,0,0,.12);

    backdrop-filter: blur(10px);

}


.csr-header-icon span {

    font-size: 30px;

    font-weight: 900;

}


/* =========================================================
   HEADER CONTENT
========================================================= */

.csr-header-content {

    position: relative;

    z-index: 2;

}


.csr-overline {

    margin-bottom: 5px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 2px;

    opacity: .85;

}


.csr-header-content h1 {

    margin: 0;

    color: #ffffff;

    font-size: 30px;

    font-weight: 800;

    line-height: 1.35;

}


.csr-header-content p {

    margin: 8px 0 0;

    color: rgba(255,255,255,.88);

    font-size: 15px;

    line-height: 1.7;

}


/* =========================================================
   BODY
========================================================= */

.csr-register-body {

    padding: 38px 42px 42px;

}


/* =========================================================
   PACKAGE BOX
========================================================= */

.csr-package-box {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding: 22px 24px;

    margin-bottom: 35px;

    border-radius: 18px;

    border: 1px solid #bfdbfe;

    background:

        linear-gradient(
            135deg,
            #eff6ff,
            #f8fbff
        );

}


.csr-package-left,
.csr-package-right {

    display: flex;

    flex-direction: column;

}


.csr-package-right {

    align-items: flex-end;

}


.csr-package-label {

    display: block;

    margin-bottom: 3px;

    color: var(--csr-text-light);

    font-size: 13px;

    font-weight: 600;

}


.csr-package-name {

    color: var(--csr-primary-deep);

    font-size: 20px;

    font-weight: 800;

    line-height: 1.4;

}


.csr-package-price {

    color: var(--csr-primary);

    font-size: 28px;

    font-weight: 900;

    line-height: 1.3;

}


/* =========================================================
   SECTION TITLE
========================================================= */

.csr-section-title {

    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 25px;

}


.csr-section-number {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 42px;

    height: 42px;

    flex: 0 0 42px;

    border-radius: 12px;

    background: var(--csr-light);

    color: var(--csr-primary);

    font-size: 13px;

    font-weight: 900;

}


.csr-section-title strong {

    display: block;

    color: var(--csr-text);

    font-size: 18px;

    font-weight: 800;

    line-height: 1.4;

}


.csr-section-title small {

    display: block;

    margin-top: 2px;

    color: var(--csr-text-light);

    font-size: 13px;

}


/* =========================================================
   FORM GRID
========================================================= */

.csr-form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

}


/* =========================================================
   FORM GROUP
========================================================= */

.csr-form-group {

    margin-bottom: 20px;

}


.csr-form-group label {

    display: block;

    margin-bottom: 8px;

    color: var(--csr-text);

    font-size: 15px;

    font-weight: 700;

    line-height: 1.5;

}


.csr-form-group label span {

    color: var(--csr-danger);

    margin-left: 2px;

}


/* =========================================================
   INPUT WRAPPER
========================================================= */

.csr-input-wrap {

    position: relative;

    width: 100%;

}


/* =========================================================
   INPUT ICON
========================================================= */

.csr-input-icon {

    position: absolute;

    left: 16px;

    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    display: flex;

    align-items: center;

    justify-content: center;

    width: 20px;

    height: 20px;

    color: var(--csr-primary);

    font-size: 15px;

    pointer-events: none;

}


/* =========================================================
   INPUT
========================================================= */

.csr-input-wrap input {

    display: block;

    width: 100%;

    min-height: 56px;

    padding:
        0 16px 0 48px;

    border:
        1px solid var(--csr-border);

    border-radius: 14px;

    outline: none;

    background: #ffffff;

    color: var(--csr-text);

    font-family: inherit;

    font-size: 16px;

    line-height: 1.5;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;

    appearance: none;

}


.csr-input-wrap input::placeholder {

    color: var(--csr-placeholder);

    opacity: 1;

}


.csr-input-wrap input:hover {

    border-color: #b8c8dc;

}


.csr-input-wrap input:focus {

    border-color: var(--csr-primary);

    background: #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, .10);

}


/* =========================================================
   VALID / INVALID
========================================================= */

.csr-input-wrap input:valid:not(:placeholder-shown) {

    border-color: #bfdbfe;

}


.csr-input-wrap input:focus:invalid {

    border-color: #fca5a5;

}


/* =========================================================
   PRIVACY BOX
========================================================= */

.csr-privacy-box {

    margin-top: 5px;

    margin-bottom: 22px;

    padding: 17px 18px;

    border-radius: 14px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

}


.csr-checkbox {

    display: flex;

    align-items: flex-start;

    gap: 12px;

}


.csr-checkbox input {

    width: 19px;

    height: 19px;

    flex: 0 0 19px;

    margin-top: 3px;

    accent-color: var(--csr-primary);

    cursor: pointer;

}


.csr-checkbox label {

    margin: 0;

    color: #475569;

    font-size: 14px;

    line-height: 1.7;

    cursor: pointer;

}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.csr-submit-button {

    position: relative;

    width: 100%;

    min-height: 58px;

    padding: 12px 22px;

    border: 0;

    border-radius: 15px;

    background:

        linear-gradient(
            135deg,
            #1d4ed8,
            #2563eb,
            #0284c7
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 17px;

    font-weight: 800;

    line-height: 1.4;

    cursor: pointer;

    box-shadow:
        0 12px 28px
        rgba(37, 99, 235, .25);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;

}


.csr-submit-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 17px 35px
        rgba(37, 99, 235, .30);

}


.csr-submit-button:active {

    transform: translateY(0);

}


.csr-submit-button:disabled {

    opacity: .65;

    cursor: wait;

    transform: none;

}


.csr-arrow {

    display: inline-block;

    margin-left: 8px;

    font-size: 21px;

    transition:
        transform .2s ease;

}


.csr-submit-button:hover .csr-arrow {

    transform: translateX(4px);

}


/* =========================================================
   SECURITY
========================================================= */

.csr-security {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    margin-top: 15px;

    color: #94a3b8;

    font-size: 13px;

    line-height: 1.6;

    text-align: center;

}


/* =========================================================
   FOOTER
========================================================= */

.csr-footer {

    margin-top: 16px;

    color: #94a3b8;

    font-size: 13px;

    line-height: 1.6;

    text-align: center;

}


.csr-footer span {

    margin: 0 7px;

    color: #cbd5e1;

}


/* =========================================================
   ERROR / SUCCESS
   สำหรับส่วน save-customer.php
========================================================= */

.csr-message {

    padding: 15px 18px;

    margin-bottom: 22px;

    border-radius: 14px;

    font-size: 15px;

    line-height: 1.7;

}


.csr-message-error {

    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #991b1b;

}


.csr-message-success {

    background: #f0fdf4;

    border: 1px solid #bbf7d0;

    color: #166534;

}


/* =========================================================
   PAYMENT BOX
========================================================= */

.csr-payment-box {

    text-align: center;

    padding: 10px 0;

}


.csr-payment-title {

    margin-bottom: 5px;

    color: var(--csr-primary-deep);

    font-size: 25px;

    font-weight: 800;

}


.csr-payment-subtitle {

    margin-bottom: 25px;

    color: var(--csr-text-light);

    font-size: 15px;

}


.csr-payment-amount {

    display: inline-block;

    margin-bottom: 25px;

    color: var(--csr-primary);

    font-size: 34px;

    font-weight: 900;

    line-height: 1.3;

}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 768px) {

    .csr-register-wrapper {

        margin: 30px auto;

    }


    .csr-register-header {

        padding: 32px 28px;

    }


    .csr-register-body {

        padding: 30px 28px 34px;

    }


    .csr-header-content h1 {

        font-size: 27px;

    }


    .csr-package-price {

        font-size: 25px;

    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 600px) {

    .csr-register-wrapper {

        margin: 15px auto;

        padding: 0 10px;

        font-size: 15px;

    }


    .csr-register-card {

        border-radius: 21px;

    }


    .csr-register-header {

        display: block;

        padding: 28px 22px;

        text-align: center;

    }


    .csr-header-icon {

        margin: 0 auto 17px;

    }


    .csr-header-content h1 {

        font-size: 24px;

        line-height: 1.4;

    }


    .csr-header-content p {

        font-size: 14px;

        line-height: 1.7;

    }


    .csr-register-body {

        padding: 25px 20px 28px;

    }


    .csr-package-box {

        align-items: flex-start;

        flex-direction: column;

        gap: 13px;

        padding: 18px;

        margin-bottom: 28px;

    }


    .csr-package-right {

        align-items: flex-start;

    }


    .csr-package-name {

        font-size: 18px;

    }


    .csr-package-price {

        font-size: 25px;

    }


    .csr-section-title {

        margin-bottom: 20px;

    }


    .csr-section-title strong {

        font-size: 17px;

    }


    .csr-form-grid {

        grid-template-columns: 1fr;

        gap: 0;

    }


    .csr-form-group {

        margin-bottom: 17px;

    }


    .csr-form-group label {

        font-size: 15px;

    }


    .csr-input-wrap input {

        min-height: 55px;

        font-size: 16px;

    }


    .csr-submit-button {

        min-height: 56px;

        font-size: 16px;

    }


    .csr-security {

        padding: 0 8px;

        font-size: 12px;

    }


    .csr-footer {

        font-size: 12px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .csr-register-header {

        padding: 25px 18px;

    }


    .csr-register-body {

        padding:
            22px 16px 25px;

    }


    .csr-header-content h1 {

        font-size: 22px;

    }


    .csr-package-box {

        padding: 16px;

    }


    .csr-input-wrap input {

        padding-left: 45px;

    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.csr-submit-button:focus-visible,
.csr-input-wrap input:focus-visible,
.csr-checkbox input:focus-visible {

    outline:

        3px solid
        rgba(56, 189, 248, .55);

    outline-offset: 3px;

}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .csr-submit-button,
    .csr-arrow,
    .csr-input-wrap input {

        transition: none;

    }

}