/**
 * HGEA Membership Plugin Form Styles
 * Styling for login, registration, and password reset forms
 */

/* Form container styling */
.hgea-login-form,
.hgea-register-form,
.hgea-password-reset-form {
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tribe-events-content .hgea-login-form a {
    border-bottom: none;
    text-decoration: none;
}

/* Form group styling */
.hgea-form-group {
    margin-bottom: 1.5rem;
}

.hgea-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hgea-form-half {
    flex: 1;
    margin-bottom: 0;
}

/* Label styling */
.hgea-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.required {
    color: #d63638;
}

/* Input styling */
.hgea-form-group input[type="text"],
.hgea-form-group input[type="email"],
.hgea-form-group input[type="password"],
.hgea-form-group input[type="number"],
.hgea-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out;
}

.hgea-form-group input:focus,
.hgea-form-group select:focus {
    outline: none;
    border-color: var(--hgea-color-dark-green);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Email field note styling */
.hgea-form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
}

/* Button styling */
.hgea-form-group .button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--hgea-color-dark-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.hgea-form-group .button:hover {
    background-color: var(--hgea-color-mid-green);
}

.hgea-form-group .button-primary {
    background-color: var(--hgea-color-dark-green);
}

.hgea-form-group .button-primary:hover {
    background-color: var(--hgea-color-mid-green);
}

/* Message styling */
.hgea-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.hgea-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.hgea-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

/* Link styling within forms */
.hgea-form-group a {
    color: var(--hgea-color-dark-green);
    text-decoration: none;
}

.hgea-form-group a:hover {
    color: var(--hgea-color-mid-green);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .hgea-login-form,
    .hgea-register-form,
    .hgea-password-reset-form {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .hgea-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .hgea-form-half {
        margin-bottom: 1.5rem;
    }
}

/* Form title styling */
.hgea-register-form h3,
.hgea-login-form h3,
.hgea-password-reset-form h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.5rem;
}

.hgea-register-form p,
.hgea-login-form p,
.hgea-password-reset-form p {
    margin-bottom: 0;
    color: #666;
    line-height: 1.5;
}

/* Select dropdown styling */
.hgea-form-group select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.65rem auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Validation styling */
.hgea-form-group input:invalid {
    border-color: #d63638;
}

.hgea-form-group input:valid {
    border-color: #00a32a;
}

/* Loading state */
.hgea-form-group .button:disabled {
    background-color: #ddd;
    color: #666;
    cursor: not-allowed;
}

/* Focus management */
.hgea-form-group input:focus-visible,
.hgea-form-group select:focus-visible {
    outline: 2px solid var(--hgea-color-dark-green);
    outline-offset: 2px;
} 