/* Register page specific styles */

/* Base layout */
body {
    background-color: #f8fafc;
}

.register-container {
    display: flex;
    min-height: calc(100vh - 64px);
    margin-top: 64px; /* Header height */
    background-color: var(--white);
}

.register-content {
    flex: 1;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Form header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* User type selector */
.user-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: #f3f4f6;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.user-type-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.user-type-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.user-type-btn.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form styles */
.registration-form {
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
    background-color: #fff5f5;
}

/* Password field styles */
.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
}

.toggle-password:hover {
    color: var(--text-dark);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-meter {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.strength-meter::before {
    content: '';
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

.strength-meter.weak::before {
    width: 33.33%;
    background-color: #ef4444;
}

.strength-meter.medium::before {
    width: 66.66%;
    background-color: #f59e0b;
}

.strength-meter.strong::before {
    width: 100%;
    background-color: #10b981;
}

.strength-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Checkbox styles */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}

.checkbox-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

/* Error message styles */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

/* Submit button */
.submit-btn {
    width: 100%;
    position: relative;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Social login section */
.social-login {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.social-login p {
    color: var(--text-light);
    margin-bottom: 1rem;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background-color: #e2e8f0;
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.social-btn img {
    width: 1.5rem;
    height: 1.5rem;
}

/* Side banner */
.register-banner {
    display: none;
    flex-basis: 40%;
    background: linear-gradient(rgba(5, 150, 105, 0.9), rgba(5, 150, 105, 0.9)),
                url('../images/trees-bg.jpg') center/cover;
    color: var(--white);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.banner-content {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.banner-content h2 {
    font-size: 1.875rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.feature-list svg {
    flex-shrink: 0;
    stroke: var(--white);
}

/* Official fields specific styles */
.official-fields {
    border-top: 1px solid #e2e8f0;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive styles */
@media (min-width: 1024px) {
    .register-banner {
        display: block;
    }
    
    .register-container {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 1024px) {
    .register-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .register-content {
        padding: 2rem 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .social-buttons {
        flex-direction: column;
        align-items: center;
    }

    .social-btn {
        width: 100%;
    }

    .form-header h1 {
        font-size: 1.75rem;
    }

    .form-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .user-type-selector {
        flex-direction: column;
    }

    .social-login p::before,
    .social-login p::after {
        width: 20%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
}