/**
 * HectareWise Unified Registration System Styles
 */

/* Modal Overlay */
.registration-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Container */
.registration-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.registration-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.registration-modal .modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Header */
.registration-header {
    text-align: center;
    padding: 40px 40px 30px;
    border-bottom: 1px solid #e5e7eb;
}

.registration-header .header-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.registration-header h2 {
    margin: 0 0 10px;
    font-size: 1.75rem;
    color: #111827;
    font-weight: 700;
}

.registration-header p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
}

/* Tabs */
.registration-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    padding: 0 40px;
}

.tab-btn {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #111827;
    background: #f9fafb;
}

.tab-btn.active {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

/* Content Area */
.registration-content {
    padding: 30px 40px 40px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Forms */
.auth-form {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.813rem;
}

/* Checkbox Group */
.checkbox-group {
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #16a34a;
}

.checkbox-label a {
    color: #16a34a;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-large {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 24px;
}

/* Form Divider */
.form-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Benefits List */
.benefits-list {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.benefits-list h4 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 0.938rem;
    font-weight: 600;
}

.benefits-list .benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.875rem;
}

.benefits-list .benefit-item i {
    color: #16a34a;
    font-size: 1.125rem;
}

/* Form Help Text */
.form-help-text {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-help-text i {
    font-size: 1.125rem;
}

/* Verification Message */
.verification-message {
    text-align: center;
    padding: 40px;
}

.verification-message .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.verification-message h2 {
    margin: 0 0 16px;
    font-size: 1.75rem;
    color: #111827;
    font-weight: 700;
}

.verification-message p {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 1rem;
}

.verification-message .email-display {
    font-weight: 600;
    color: #111827;
    font-size: 1.125rem;
    margin-bottom: 32px;
}

/* Verification Steps */
.verification-steps {
    margin: 32px 0;
    text-align: left;
}

.verification-steps .step {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.verification-steps .step-number {
    width: 32px;
    height: 32px;
    background: #16a34a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.verification-steps .step span:last-child {
    color: #374151;
    font-size: 0.938rem;
}

/* Help Text */
.help-text {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.help-text p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.help-text a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Form Error */
.form-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-error.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.form-error i {
    font-size: 1.125rem;
}

/* Welcome Toast */
.welcome-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.welcome-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-toast i {
    color: #16a34a;
    font-size: 24px;
}

.welcome-toast strong {
    display: block;
    color: #111827;
    font-size: 1rem;
    margin-bottom: 4px;
}

.welcome-toast p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .registration-modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .registration-header {
        padding: 30px 24px 20px;
    }

    .registration-tabs {
        padding: 0 24px;
    }

    .registration-content {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .verification-message {
        padding: 30px 24px;
    }

    .welcome-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
