/* Astrologer Registration Styles */

.registration-card {
    background: #ffffff;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    padding: 2.5rem 3rem;
    border-radius: var(--radius-lg, 1rem);
    width: 100%;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid var(--color-border-subtle, #e2e8f0);
    background-color: var(--bg-light, #f8fafc);
    border-radius: var(--radius-md, 0.5rem);
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    height: auto;
}

input[type="file"].form-control {
    padding: 0.35rem 1rem;
    height: auto;
    min-height: calc(2.25rem + 2px);
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary, #f37021);
    background-color: var(--color-white, #ffffff);
    box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.15);
    outline: none;
}

/* Bulletproof Error Handling */
.is-invalid {
    border: 2px solid var(--color-danger, #dc3545) !important;
    background-color: #fef2f2 !important;
}

.invalid-feedback {
    color: var(--color-danger, #dc3545);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.35rem;
    display: block;
}

/* Helper Text */
.form-text, .text-muted {
    color: var(--color-text-muted, #6b7280) !important;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Language Toggle Switch */
.swal-lang-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.swal-lang-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.swal-lang-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}
.swal-lang-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.swal-lang-switch input:checked + .swal-lang-slider {
    background-color: var(--color-primary, #f37021);
}
.swal-lang-switch input:checked + .swal-lang-slider:before {
    transform: translateX(16px);
}

.document-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--color-text-dark, #1e293b);
}

.file-drop-area {
    position: relative;
    border: 2px dashed #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    padding: 2rem 1rem;
    text-align: center;
    transition: 0.3s;
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    border-color: var(--color-primary, #f37021);
    background: #fff5e6;
}

.file-drop-area.has-file {
    border-color: #2DD4BF;
    background: #ecfdf5;
}

.file-drop-icon {
    color: #4A90E2;
    margin-bottom: 1rem;
}

.file-drop-text {
    color: #64748b;
    margin-bottom: 1rem;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.btn-browse {
    background: linear-gradient(135deg, var(--color-primary, #f37021), var(--color-primary-hover, #e06015));
    color: white;
    padding: 0.6rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(243, 112, 33, 0.2);
    cursor: pointer;
    display: inline-block;
}

/* File Preview */
.file-preview-container {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
}

.file-preview-container.active {
    display: block;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #F8FAFC;
    border-radius: 6px;
    gap: 1rem;
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-preview-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #E2E8F0;
}

.file-preview-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.file-preview-size {
    font-size: 0.85rem;
    color: #64748b;
}

.file-preview-remove {
    background: var(--color-danger, #ef4444);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.file-preview-remove:hover {
    background: #dc2626;
}

.document-guidelines {
    padding: 0.75rem;
    background: #F8FAFC;
    border-radius: 6px;
    border-left: 3px solid #2DD4BF;
    margin-top: 0.5rem;
}

.border-left-success {
    border-left: 4px solid #2DD4BF !important;
}

/* Radio button styling */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.radio-option input[type="radio"] {
    cursor: pointer;
    margin-right: 5px;
}

.radio-option:hover {
    color: var(--color-primary, #f37021);
}

/* Referral container styling */
#referralFieldsContainer {
    padding: 1.5rem;
    background-color: var(--bg-light, #f8fafc);
    border-radius: var(--radius-lg, 1rem);
    margin-top: 15px;
    border: 1px solid var(--color-border-subtle, #e2e8f0);
}

/* Custom Gender Radio Cards */
.gender-radio-card {
    border: 2px solid var(--color-border-subtle, #e2e8f0);
    background-color: var(--color-white, #ffffff);
    color: var(--color-text-slate, #475569);
    font-weight: 600;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-radius: var(--radius-md, 0.5rem);
}

.gender-radio-card:hover {
    border-color: var(--color-primary, #f37021);
    background-color: var(--color-primary-light, #fff7ed);
    color: var(--color-primary, #f37021);
}

.gender-radio-card:has(input[type="radio"]:checked) {
    background-color: var(--color-primary, #f37021);
    border-color: var(--color-primary, #f37021);
    color: var(--color-white, #ffffff);
}

/* Suggestion dropdown */
#referrer_suggestions {
    margin-top: 4px;
    border: 1px solid var(--color-border-subtle, #e2e8f0);
    border-radius: var(--radius-md, 0.5rem);
    background: white;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

#referrer_suggestions .list-group-item {
    cursor: pointer;
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid var(--color-border-subtle, #e2e8f0);
}

#referrer_suggestions .list-group-item:last-child {
    border-bottom: none;
}

#referrer_suggestions .list-group-item:hover {
    background-color: var(--bg-light, #f8fafc);
}

#referrer_suggestions .list-group-item:active,
#referrer_suggestions .list-group-item.active {
    background-color: var(--color-primary, #f37021);
    color: white;
}

#referrer_suggestions .text-muted {
    font-style: italic;
}

/* OTP Box Styles */
.otp-box-container {
    gap: 8px;
    padding: 0;
}
.otp-box {
    width: 45px;
    height: 50px;
    font-size: 20px;
    font-weight: 700;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid var(--color-border-subtle, #e2e8f0);
    padding: 0;
}
.otp-box:focus {
    border-color: var(--color-primary, #f37021);
    box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.15);
    outline: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .registration-card {
        padding: 1.25rem 1rem;
        width: 100%;
        border-radius: 1rem;
        box-shadow: var(--shadow-md);
        box-sizing: border-box;
    }
    
    /* Remove negative margins and column padding on mobile to prevent clipping */
    .registration-card .row {
        margin-left: 0;
        margin-right: 0;
    }
    .registration-card [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .file-drop-area {
        padding: 1.25rem 0.5rem;
    }

    .file-preview-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .file-preview-info {
        flex-direction: column;
        width: 100%;
        overflow: hidden;
    }

    .file-preview-name {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn-chat-lg, #submitBtn {
        width: 100% !important;
        min-height: 52px;
        font-size: 1.1rem;
    }
    
    .otp-box {
        width: calc(100% / 6 - 6px);
    }
}

/* Fix for Select2 width cutting on display:none steps */
.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-search__field {
    max-width: 100%;
}
