/**
 * BDD Contact Form - Frontend Styles
 * Matches WP Business Dash branding
 */

.bdd-contact-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.bdd-form-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.bdd-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bdd-form-row {
    display: flex;
    gap: 1rem;
}

.bdd-form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bdd-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9375rem;
}

.bdd-form-field label .required {
    color: #ef4444;
}

.bdd-form-field input[type="text"],
.bdd-form-field input[type="email"],
.bdd-form-field input[type="url"],
.bdd-form-field select,
.bdd-form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1e293b;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: inherit;
}

.bdd-form-field input:focus,
.bdd-form-field select:focus,
.bdd-form-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bdd-form-field input.bdd-error,
.bdd-form-field select.bdd-error,
.bdd-form-field textarea.bdd-error {
    border-color: #ef4444;
}

.bdd-form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.bdd-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit Button */
.bdd-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 4px 14px rgba(37, 99, 235, 0.25);
}

.bdd-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -1px rgba(0,0,0,0.1), 0 6px 20px rgba(37, 99, 235, 0.35);
}

.bdd-submit-button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bdd-button-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Spinner */
.bdd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bdd-spin 0.8s linear infinite;
}

@keyframes bdd-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.bdd-form-messages {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
}

.bdd-form-messages.bdd-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.bdd-form-messages.bdd-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Field validation */
.bdd-field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 600px) {
    .bdd-form-row {
        flex-direction: column;
    }
    
    .bdd-submit-button {
        width: 100%;
    }
}
