/*============================================================
Auth Forms Styling
Version: 1.0.0 
=========================================================*/

/* Authentication Container & Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Roboto', sans-serif;
    position: relative;
    /* Circles pattern background with brand colors */
    background-color: #e8f5e8;
    opacity: 0.8;
    background-image: 
        radial-gradient(circle at center center, var(--green, #a3b18a), #000000), 
        repeating-radial-gradient(circle at center center, var(--green, #a3b18a), var(--green, #a3b18a), 50px, transparent 100px, transparent 50px);
    background-blend-mode: multiply;
}


.auth-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(163, 177, 138, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 10;
    transform: translateZ(0);
}

.auth-header {
    padding: 40px 40px 20px;
    text-align: center;
    background: var(--plain-white);
}

.auth-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 8px;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--grey);
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}

/* Form Wrapper */
.auth-form-wrapper {
    padding: 20px 40px 40px;
}

.auth-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.auth-form legend {
    display: none;
}

/* Form Elements */
.auth-form-row {
    margin-bottom: 20px;
}

.auth-form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-form-column {
    display: flex;
    flex-direction: column;
}

.auth-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 6px;
    font-family: 'Roboto', sans-serif;
}

.auth-input,
.auth-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    color: var(--black);
    background: var(--plain-white);
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-input:focus,
.auth-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(163, 177, 138, 0.1);
}

.auth-input::placeholder {
    color: var(--grey);
    font-size: 14px;
}

.auth-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.auth-file-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: var(--black);
    background: var(--plain-white);
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.auth-file-input:hover {
    border-color: var(--green);
    background-color: rgba(163, 177, 138, 0.05);
}

/* reCAPTCHA */
.auth-recaptcha {
    display: flex;
    justify-content: center;
}

/* Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.auth-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-success {
    background-color: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

/* Actions */
.auth-actions {
    margin-top: 32px;
}

.btn-style,
.btn-style a {
    width: 100%;
    background-color: var(--black);
    color: var(--plain-white);
    border: 2px solid var(--black);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-style:hover,
.btn-style a:hover {
    background-color: var(--green);
    border-color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 177, 138, 0.4);
}

.btn-style:active,
.btn-style a:active {
    transform: translateY(0);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}

.auth-link {
    color: var(--black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link:hover {
    color: var(--green);
    text-decoration: none;
}

.auth-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--green);
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

/* Divider */
.auth-divider {
    height: 1px;
    background-color: #e5e7eb;
    border: none;
    margin: 24px 0;
}

/* Footer */
.auth-footer {
    text-align: center;
}

/* Help Text */
.auth-form .help-text {
    font-size: 12px;
    color: var(--grey);
    margin-top: 4px;
    line-height: 1.3;
}

/* Error States */
.auth-input.error,
.auth-select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}


/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 16px;
    }
    
    .auth-card {
        max-width: 100%;
    }
    
    .auth-header {
        padding: 32px 24px 16px;
    }
    
    .auth-header h1 {
        font-size: 28px;
    }
    
    .auth-form-wrapper {
        padding: 16px 24px 32px;
    }
    
    .auth-form-row-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .auth-links {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .auth-input,
    .auth-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Flash Message Integration */
.message.success {
    background-color: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Form Validation */
.required::after {
    content: ' *';
    color: #ef4444;
}

/* Loading States */
.btn-style:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-style:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Account Type Selection Buttons */
.auth-account-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.account-type-option {
    position: relative;
}

.account-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.account-type-button {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    background: var(--plain-white);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.account-type-button:hover {
    border-color: var(--green);
    background-color: rgba(163, 177, 138, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(163, 177, 138, 0.25);
}

.account-type-option input[type="radio"]:checked + .account-type-button {
    border-color: var(--green);
    background-color: var(--green);
    color: var(--plain-white);
    box-shadow: 0 6px 25px rgba(163, 177, 138, 0.4);
    transform: translateY(-2px);
}

.account-type-option input[type="radio"]:checked + .account-type-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--green) 0%, rgba(163, 177, 138, 0.9) 100%);
    z-index: -1;
}

.account-type-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(163, 177, 138, 0.2);
    color: #6b7e5c;
    border: 2px solid rgba(163, 177, 138, 0.4);
    transition: all 0.3s ease;
}

.account-type-icon i {
    font-size: 28px;
    font-weight: 900;
    color: inherit;
}

.account-type-content {
    flex-grow: 1;
    text-align: left;
}

.account-type-content h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 6px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.account-type-content p {
    font-size: 14px;
    color: var(--grey);
    margin: 0;
    line-height: 1.4;
    transition: all 0.3s ease;
}

/* Checkmark styling */
.account-type-checkmark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--plain-white);
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.account-type-checkmark i {
    font-size: 16px;
    color: var(--green);
    font-weight: 900;
}

/* Selected state styling */
.account-type-option input[type="radio"]:checked + .account-type-button .account-type-icon {
    background: #ffffff;
    color: #a3b18a;
    border-color: #a3b18a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.account-type-option input[type="radio"]:checked + .account-type-button .account-type-content h4 {
    color: var(--plain-white);
    font-weight: 700;
}

.account-type-option input[type="radio"]:checked + .account-type-button .account-type-content p {
    color: rgba(255, 255, 255, 0.9);
}

.account-type-option input[type="radio"]:checked + .account-type-button .account-type-checkmark {
    opacity: 1;
    transform: scale(1);
    background: var(--plain-white);
    border-color: var(--plain-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for account types */
@media (max-width: 768px) {
    .auth-account-types {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .account-type-button {
        padding: 18px;
        gap: 14px;
    }
    
    .account-type-icon {
        width: 48px;
        height: 48px;
    }
    
    .account-type-icon i {
        font-size: 24px;
    }
    
    .account-type-content h4 {
        font-size: 20px;
    }
    
    .account-type-content p {
        font-size: 13px;
    }
    
    .account-type-checkmark {
        width: 28px;
        height: 28px;
    }
    
    .account-type-checkmark i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .account-type-button {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
        gap: 16px;
    }
    
    .account-type-content {
        text-align: center;
    }
    
    .account-type-checkmark {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 24px;
        height: 24px;
    }
    
    .account-type-checkmark i {
        font-size: 12px;
    }
}