/* Frontend Styles for Uprooted Forms */

.uprooted-form-container {
    max-width: 600px;
    margin: 20px 0;
}

.uprooted-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.uprooted-field-wrapper {
    margin-bottom: 20px;
}

.uprooted-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.uprooted-field-label .required {
    color: #d63638;
    margin-left: 3px;
}

.uprooted-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.uprooted-field:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

textarea.uprooted-field {
    resize: vertical;
    min-height: 100px;
}

select.uprooted-field {
    cursor: pointer;
}

/* Radio and Checkbox Groups */
.uprooted-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uprooted-radio-label,
.uprooted-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.uprooted-radio-label input[type="radio"],
.uprooted-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Field Description */
.uprooted-field-description,
.uprooted-field-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Submit Button */
.uprooted-submit-wrapper {
    margin-top: 25px;
}

.uprooted-submit-btn {
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.uprooted-submit-btn:hover {
    background: #005a87;
}

.uprooted-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.uprooted-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.uprooted-form-message.success {
    background: #d5f4e6;
    border: 1px solid #00a32a;
    color: #00661c;
}

.uprooted-form-message.error {
    background: #fce8e8;
    border: 1px solid #d63638;
    color: #991b1b;
}

/* Loading State */
.uprooted-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.uprooted-form.loading .uprooted-submit-btn::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Validation */
.uprooted-field.error {
    border-color: #d63638;
}

.uprooted-field.error:focus {
    box-shadow: 0 0 0 1px #d63638;
}

/* Responsive */
@media (max-width: 600px) {
    .uprooted-form {
        padding: 20px;
    }
    
    .uprooted-submit-btn {
        width: 100%;
    }
}
