/**
 * Registration Page Styles
 * Multi-step stepper form styling
 */

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header */
.register-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3c72;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-logo i {
    color: #667eea;
}

/* Stepper */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.stepper-item {
    position: relative;
    flex: 1;
    text-align: center;
    z-index: 1;
}

.stepper-counter {
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    color: #6c757d;
    font-weight: 600;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.stepper-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    transition: color 0.3s ease;
}

.stepper-item.active .stepper-counter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
}

.stepper-item.active .stepper-label {
    color: #667eea;
    font-weight: 600;
}

.stepper-item.completed .stepper-counter {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.stepper-item.completed .stepper-counter::after {
    content: '\f26b';
    font-family: 'bootstrap-icons';
}

.stepper-item.completed .stepper-label {
    color: #28a745;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #e0e0e0;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-content p {
    font-weight: 500;
    color: #333;
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.preview-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.preview-filename {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
    word-break: break-all;
}

.remove-file {
    margin-top: 0.5rem;
}

/* Review Section */
.review-section h6 {
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.review-section p {
    margin-bottom: 0.5rem;
}

.review-section strong {
    color: #333;
    font-weight: 600;
}

/* Password Strength */
.password-strength .progress {
    background: #e0e0e0;
}

.password-strength .progress-bar {
    transition: all 0.3s ease;
}

.password-strength .progress-bar.weak {
    width: 33%;
    background-color: #dc3545;
}

.password-strength .progress-bar.medium {
    width: 66%;
    background-color: #ffc107;
}

.password-strength .progress-bar.strong {
    width: 100%;
    background-color: #28a745;
}

.strength-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.strength-text.weak {
    color: #dc3545;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #28a745;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

/* Toggle Password */
.toggle-password {
    cursor: pointer;
}

.toggle-password:hover {
    background: #f8f9fa;
}

/* Form Validation */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

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

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-content {
    animation: slideInRight 0.4s ease-out;
}

.step-content.slide-left {
    animation: slideInLeft 0.4s ease-out;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Pincode Auto-fill Styles */
.pincode-loader {
    z-index: 10;
}

/* Readonly fields styling */
#city[readonly], #state[readonly], #country[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    border-color: #dee2e6;
}

/* Allow manual override on focus */
#city:focus, #state:focus {
    background-color: white;
    cursor: text;
    border-color: #667eea;
}

#country:focus {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 767px) {
    .stepper-label {
        font-size: 0.75rem;
    }

    .stepper-counter {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 0.875rem;
    }

    .stepper-wrapper::before {
        top: 20px;
    }

    .btn {
        padding: 0.6rem 1.5rem;
    }

    .upload-area {
        padding: 1.5rem;
        min-height: 150px;
    }

    .upload-content i {
        font-size: 2rem;
    }
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #28a745;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: #28a745;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }
    5% {
        transform: rotate(-45deg);
    }
    12% {
        transform: rotate(-405deg);
    }
    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}
