/* Front-end Form Styles */
.leadex-crm-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.leadex-crm-form {
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.leadex-crm-form .form-group {
    margin-bottom: 20px;
}

.leadex-crm-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.leadex-crm-form .required {
    color: #ff0000;
}

.leadex-crm-form input[type="text"],
.leadex-crm-form input[type="email"],
.leadex-crm-form input[type="tel"],
.leadex-crm-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.leadex-crm-form input[type="text"]:focus,
.leadex-crm-form input[type="email"]:focus,
.leadex-crm-form input[type="tel"]:focus,
.leadex-crm-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.leadex-crm-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

.leadex-crm-form button[type="submit"]:hover {
    opacity: 0.9;
}

.leadex-crm-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.response-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.response-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    display: block;
}

.response-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
    display: block;
}

/* Form validation styles */
.leadex-crm-form .error-field {
    border-color: #a94442;
}

.field-error-message {
    color: #a94442;
    font-size: 14px;
    margin-top: 5px;
}

/* Loading spinner */
.form-loading {
    position: relative;
}

.form-loading:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    z-index: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}