/* Crawley Appointment Form Styles - Matches Theme Compact Design */

.caf-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Alert Messages */
.caf-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.caf-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.caf-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Header */
.caf-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.caf-header h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.caf-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Form Container */
.caf-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Form Fields */
.caf-field {
    margin-bottom: 20px;
}

.caf-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.caf-field input,
.caf-field select,
.caf-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.caf-field input:focus,
.caf-field select:focus,
.caf-field textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.caf-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Section Title */
.caf-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e74c3c;
}

/* Service Checkboxes - Compact Grid */
.caf-services-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    align-items: stretch !important;
}

.caf-service-checkbox {
    display: flex !important;
    align-items: center !important;
    padding: 12px 15px !important;
    background: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    user-select: none;
}

.caf-service-checkbox:hover {
    background: #fff !important;
    border-color: #e74c3c !important;
    transform: translateY(-1px);
}

.caf-service-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 10px 0 0 !important;
    cursor: pointer !important;
    flex-shrink: 0;
}

.caf-service-checkbox span {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #555 !important;
    line-height: 1.3 !important;
}

/* Grid Layout */
.caf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Submit Area */
.caf-submit-area {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.caf-submit-area .g-recaptcha {
    display: inline-block;
    margin-bottom: 20px;
}

/* Submit Button */
.caf-submit-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 15px 60px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    position: relative;
    min-width: 200px;
}

.caf-submit-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.5);
}

.caf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.caf-btn-spinner {
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .caf-form {
        padding: 20px;
    }
    
    .caf-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .caf-services-grid {
        grid-template-columns: 1fr !important;
    }
    
    .caf-submit-btn {
        padding: 12px 40px;
        font-size: 14px;
        width: 100%;
    }
    
    .caf-header h2 {
        font-size: 22px;
    }
}

/* Success Modal Popup */
.caf-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.caf-success-modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 40px 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.caf-success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    font-size: 50px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.caf-success-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.caf-success-message {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.caf-success-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.caf-success-button:hover {
    background: #218838;
}

.caf-success-button:active {
    background: #1e7e34;
}

@media (max-width: 480px) {
    .caf-wrapper {
        padding: 0 10px;
    }
    
    .caf-form {
        padding: 15px;
    }
    
    .caf-field input,
    .caf-field select,
    .caf-field textarea {
        padding: 10px;
        font-size: 13px;
    }
    
    .caf-success-modal-content {
        margin: 0 20px;
        padding: 30px 20px;
    }
    
    .caf-success-checkmark {
        width: 60px;
        height: 60px;
        font-size: 35px;
    }
    
    .caf-success-title {
        font-size: 18px;
    }
}
