/* Registration Form Styles */


/* === Radio / Checkbox Style === */
.form-group .form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.form-check-label {
    font-size: 1.05rem;
    letter-spacing: .02em;
    line-height: 1.3;
    color: #fff;
}

.form-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-top: 0;
    cursor: pointer;
    position: relative;
    outline: none;
    border: 2px solid rgba(255, 255, 255, .85);
    background: transparent;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease, transform .05s;
}

/* Hover/Active feedback */
.form-check-input:hover {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
}

.form-check-input:active {
    transform: scale(0.98);
}

/* Focus ring ให้เด่นบนพื้นหลังเข้ม */
.form-check-input:focus {
    box-shadow: 0 0 0 6px rgba(0, 173, 255, .25);
    border-color: #00adff;
}

/* ----- Radio ----- */
.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input[type="radio"]:checked {
    border-color: #00adff;
    background:
        radial-gradient(circle at 50% 50%, #00adff 0 45%, transparent 47% 100%);
    box-shadow: 0 0 0 6px rgba(0, 173, 255, .18);
}

/* ----- Checkbox ----- */
.form-check-input[type="checkbox"] {
    border-radius: 6px;
}

.form-check-input[type="checkbox"]:checked {
    border-color: #00adff;
    background:
        linear-gradient(45deg, transparent 45%, #00adff 45% 55%, transparent 0) left/50% 50% no-repeat,
        linear-gradient(-45deg, transparent 48%, #00adff 48% 58%, transparent 0) left/50% 100% no-repeat,
        linear-gradient(-45deg, #00adff 0 0) right/50% 50% no-repeat;
    box-shadow: 0 0 0 6px rgba(0, 173, 255, .18);
}

/* ตัวเลือกทั้งกลุ่ม – เพิ่มพื้นที่ลมหายใจและกรอบโปร่งใส */
.choice-group {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .02);
}

/* ขนาดใหญ่ขึ้นสำหรับจอมือถือ */
@media (max-width: 576px) {
    .form-check-input {
        width: 30px;
        height: 30px;
    }

    .form-check-label {
        font-size: 1.1rem;
    }
}

/* ===== Terms & Conditions Checkbox ===== */
.form-check.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-left: 0;
    /* override BS4 */
    margin-top: 8px;
}

/* reset ตำแหน่ง absolute ของ BS4 */
.form-check.agree-row .form-check-input {
    position: static;
    margin: 2px 0 0 0;
}

/* กล่อง checkbox ขาว ขอบโค้งเล็ก */
.form-check-input.agree-check {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 6px;
    background: rgba(255, 255, 255, .02);
    cursor: pointer;
    position: relative;
    outline: 0;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s;
}

/* hover / focus / active */
.form-check-input.agree-check:hover {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
}

.form-check-input.agree-check:focus {
    border-color: #00adff;
    box-shadow: 0 0 0 6px rgba(0, 173, 255, .25);
}

.form-check-input.agree-check:active {
    transform: scale(.98);
}

/* ติ๊กถูกสีน้ำเงิน + เงาอ่อน */
.form-check-input.agree-check:checked {
    border-color: #00adff;
    background: rgba(0, 173, 255, .08);
}

.form-check-input.agree-check::after {
    content: "";
    position: absolute;
    left: 7px;
    /* top: 2px; */
    width: 8px;
    height: 16px;
    transform: rotate(45deg) scale(0);
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    opacity: 0;
    transition: transform .15s ease-out, opacity .1s;
}

.form-check-input.agree-check:checked::after {
    border-color: #00adff;
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

/* ข้อความ 2 บรรทัด: บรรทัดแรกเข้ม, บรรทัดรองเล็กจาง */
.form-check-label.agree-label {
    color: #fff;
    font-size: .92rem;
    line-height: 1.35;
    max-width: 520px;
}

.form-check-label.agree-label .legal-sub {
    display: block;
    margin-top: .25rem;
    font-size: .80rem;
    opacity: .8;
}

/* ขยาย touch target บนมือถือ */
@media (max-width:576px) {
    .form-check-input.agree-check {
        width: 28px;
        height: 28px;
    }

    .form-check-label.agree-label {
        font-size: 1rem;
    }
}

/* === Registration Form === */
.register-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: bold;
}

.register-btn:hover {
    background: #e55a2b;
    color: white;
}

.registration-form {
    padding: 100px 20px 50px 20px;
    position: relative;
    z-index: 10;
}

.form-control {
    border-radius: 5px;
    padding: 5px 20px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
}

.form-control:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-label {
    padding-left: 2px;
    font-weight: 600;
    color: #FFFFFF;
    margin-top: 8px;
    margin-bottom: 5px;
}

.submit-btn {
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
}

.submit-btn:hover {
    color: white;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.back-btn {
    /* background: #113bc1; */
    /* color: white; */
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
}

/* .back-btn:hover {
    background: #e55a2b;
    color: white;
}

.back-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
} */

.require {
    color: red;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    padding-left: 15px;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.is-invalid~.invalid-feedback {
    display: block;
}

.form-check {
    padding: 5px 15px;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-check:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.guest-fields {
    background-color: #282828;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Step Summary Styles */
.step-summary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    color: #ffffff;
}

.step-summary h5 {
    color: #ff6b35;
    margin-bottom: 15px;
}

.step-summary p {
    margin-bottom: 5px;
}

.image_f {
    display: block;
}

.image_m {
    display: none;
}

@media (max-width: 1200px) and (min-width: 320px) {
    .image_f {
        display: none;
    }

    .image_m {
        display: block;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .registration-form {
        padding: 15px;
        margin-top: 3vw;
        margin-left: 10px;
        margin-right: 10px;
    }

    .form-control {
        padding: 5px 10px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 44px;
    }

    .submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin-top: 25px;
        min-height: 50px;
    }

    .form-check-input {
        transform: scale(1.2);
        margin-right: 8px;
    }

    .step-summary {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mr-3 {
    margin-right: 1rem;
}

.shadow {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Alert styles for consistency */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    color: inherit;
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

/* S
uccess Modal Styles */
.success-modal {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #333;
}

.success-modal .modal-body {
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    margin-bottom: 20px;
}

.success-icon img {
    width: 80px;
    height: 80px;
    filter: brightness(0) invert(1);
}

.success-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.success-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.success-modal .btn-primary {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.success-modal .btn-primary:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modal backdrop */
.modal-backdrop {
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .success-modal .modal-body {
        padding: 30px 20px;
    }

    .success-title {
        font-size: 1.5rem;
    }

    .success-message {
        font-size: 0.9rem;
    }
}