/**
 * Agrosphere Farmer Registration - Styles
 * Follows Agrosphere design system: --agro-dark (#1b4332), --agro-primary (#2d6a4f), --agro-accent (#6a9739), --agro-bg (#f8f6f3)
 */

:root {
    --agro-dark: #1b4332;
    --agro-primary: #2d6a4f;
    --agro-accent: #6a9739;
    --agro-light: #f8f6f3;
    --agro-bg: #f8f6f3;
    --agro-error: #dc3545;
    --agro-success: #28a745;
    --agro-info: #17a2b8;
}

/* Container */
.asfr-registration-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.asfr-form-title {
    color: var(--agro-dark);
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'Merriweather', Georgia, serif;
}

/* Form Steps */
.asfr-form-step h3 {
    color: var(--agro-primary);
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--agro-accent);
}

/* Form Layout */
.asfr-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.asfr-form-row:last-child {
    margin-bottom: 0;
}

.asfr-form-field {
    flex: 1;
    margin-bottom: 20px;
}

.asfr-form-field.asfr-half {
    flex: 0 0 calc(50% - 10px);
}

.asfr-form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--agro-dark);
    font-weight: 600;
    font-size: 14px;
}

/* Form Inputs */
.asfr-form-field input[type="text"],
.asfr-form-field input[type="email"],
.asfr-form-field input[type="tel"],
.asfr-form-field input[type="date"],
.asfr-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Open Sans', Arial, sans-serif;
}

.asfr-form-field input:focus,
.asfr-form-field select:focus {
    outline: none;
    border-color: var(--agro-accent);
    box-shadow: 0 0 0 3px rgba(106, 151, 57, 0.1);
}

.asfr-form-field input:disabled,
.asfr-form-field select:disabled {
    background-color: var(--agro-light);
    cursor: not-allowed;
}

/* Field States */
.asfr-form-field input.asfr-field-valid {
    border-color: var(--agro-success);
}

.asfr-form-field input.asfr-field-invalid {
    border-color: var(--agro-error);
}

/* Field Help & Error Messages */
.asfr-field-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.asfr-field-error {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--agro-error);
    font-weight: 500;
}

/* Messages */
.asfr-messages {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
}

.asfr-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.asfr-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.asfr-message-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.asfr-messages p {
    margin: 0;
}

/* Buttons */
.asfr-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.asfr-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.asfr-btn-primary {
    background-color: var(--agro-accent);
    color: white;
}

.asfr-btn-primary:hover:not(:disabled) {
    background-color: var(--agro-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.asfr-btn-secondary {
    background-color: var(--agro-light);
    color: var(--agro-dark);
    border: 2px solid var(--agro-primary);
}

.asfr-btn-secondary:hover:not(:disabled) {
    background-color: var(--agro-primary);
    color: white;
}

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

.asfr-btn-loading::after {
    content: " ⏳";
}

/* Footer */
.asfr-form-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.asfr-form-footer p {
    margin: 0;
    color: #666;
}

.asfr-form-footer a {
    color: var(--agro-accent);
    text-decoration: none;
    font-weight: 600;
}

.asfr-form-footer a:hover {
    color: var(--agro-primary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .asfr-registration-container {
        padding: 20px;
        margin: 20px;
    }

    .asfr-form-row {
        flex-direction: column;
        gap: 0;
    }

    .asfr-form-field.asfr-half {
        flex: 1;
    }

    .asfr-form-actions {
        flex-direction: column;
    }

    .asfr-btn {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.asfr-form-step {
    animation: fadeIn 0.3s ease;
}
