/* Visitor register — centered comfortable form */

.visitor-register-page .auth-main.v2,
.auth-main.visitor-register-layout {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 2rem 1rem 3rem;
    background-size: cover !important;
    background-position: center !important;
}

.auth-main.visitor-register-layout > .bg-overlay {
    opacity: 0.55;
}

.auth-main.visitor-register-layout > .visitor-register-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1152px;
    margin: 0 auto;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 4px 6px rgba(27, 46, 94, 0.04),
        0 20px 40px rgba(75, 20, 140, 0.1);
    overflow: hidden;
}

.visitor-register-shell .card-body {
    padding: 2rem 1.75rem 1.75rem;
}

.visitor-register-header {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eef0f3;
}

.visitor-register-header .visitor-logo {
    width: 56%;
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.visitor-register-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1d2630;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.visitor-register-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

.visitor-register-header a.back-login {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: #6f2dbd;
    text-decoration: none;
    font-weight: 500;
}

.visitor-register-header a.back-login:hover {
    text-decoration: underline;
}

.visitor-section {
    margin-bottom: 1.5rem;
    padding: 1.15rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, #fafbfc 0%, #f5f7fa 100%);
    border: 1px solid #e8ecf1;
}

.visitor-section__title {
    font-size: 0.95rem;
    font-weight: 650;
    color: #1d2630;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visitor-section__title i {
    color: #6f2dbd;
    font-size: 1.1rem;
}

.visitor-register-shell label {
    font-size: 0.82rem;
    font-weight: 550;
    color: #495057;
    margin-bottom: 0.35rem;
}

.visitor-register-shell .form-control,
.visitor-register-shell .form-select,
.visitor-register-shell select.form-control {
    border-radius: 10px;
    border-color: #dfe3e8;
    padding: 0.55rem 0.8rem;
    font-size: 0.92rem;
    background: #fff;
}

.visitor-register-shell .form-control:focus,
.visitor-register-shell select.form-control:focus {
    border-color: #9e75b6;
    box-shadow: 0 0 0 0.2rem rgba(111, 45, 189, 0.12);
}

.visitor-register-shell .req {
    color: #dc3545;
    font-weight: 600;
}

.visitor-camera-box {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#my_camera {
    width: 100% !important;
    max-width: 480px;
    min-height: 270px;
    aspect-ratio: 4 / 3;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    background: #111;
    border: 1px dashed #ced4da;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

#capture-output {
    width: 100% !important;
    max-width: 480px;
    min-height: 270px;
    aspect-ratio: 4 / 3;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    background: #111;
    border: 1px dashed #ced4da;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

#my_camera video {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}

#capture-output img,
.visitor-capture-img {
    display: block !important;
    margin: 0 auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}

.visitor-cam-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.85rem;
}

.visitor-cam-actions .btn {
    border-radius: 10px;
    font-weight: 550;
    font-size: 0.85rem;
}

.visitor-pdpa-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    line-height: 1.7;
    color: #475569;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.88rem;
}

.visitor-note {
    font-size: 0.82rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.visitor-submit-wrap {
    text-align: center;
    padding-top: 0.25rem;
}

.visitor-submit-wrap .btn-submit {
    min-width: 220px;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #7b3fd4 0%, #4b148c 100%);
    box-shadow: 0 6px 18px rgba(111, 45, 189, 0.3);
}

.visitor-submit-wrap .btn-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(111, 45, 189, 0.38);
}

.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

@media (max-width: 767.98px) {
    .auth-main.visitor-register-layout {
        padding: 1rem 0.65rem 2rem;
    }

    .visitor-register-shell .card-body {
        padding: 1.5rem 1.1rem 1.35rem;
    }

    .visitor-register-header h1 {
        font-size: 1.2rem;
    }

    .visitor-section {
        padding: 1rem 0.85rem;
    }
}
