/**
 * CASC CRM Frontend Styles
 *
 * @package CASC_CRM
 */

/* Form Wrapper */
.casc-crm-contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.casc-crm-form-title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* Form Fields */
.casc-crm-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.casc-crm-form-field {
    margin-bottom: 15px;
}

.casc-crm-form-field.casc-crm-half {
    flex: 1;
    min-width: 200px;
}

.casc-crm-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.casc-crm-form-field .required {
    color: #dc3232;
}

.casc-crm-form-field input[type="text"],
.casc-crm-form-field input[type="email"],
.casc-crm-form-field input[type="tel"],
.casc-crm-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.casc-crm-form-field input:focus,
.casc-crm-form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Submit Button */
.casc-crm-submit-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.casc-crm-submit-btn:hover {
    background: #135e96;
}

.casc-crm-submit-btn:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

/* Form Messages */
.casc-crm-form-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

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

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

/* Loading State */
.casc-crm-form.loading .casc-crm-submit-btn {
    position: relative;
    color: transparent;
}

.casc-crm-form.loading .casc-crm-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: casc-crm-spin 0.8s linear infinite;
}

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

/* Responsive */
@media screen and (max-width: 480px) {
    .casc-crm-contact-form-wrapper {
        padding: 15px;
    }

    .casc-crm-form-row {
        flex-direction: column;
    }

    .casc-crm-form-field.casc-crm-half {
        min-width: auto;
    }
}
