/*
 * Contact Form Module - Reusable Contact Form
 * Isolated and conflict-free
 * 
 * Usage:
 * 1. Include this CSS file
 * 2. Include contact-form-module.js
 * 3. Copy HTML from contact-form-module.html
 * 
 * Prefix: .cfm- (Contact Form Module)
 */

/* ==================== Form Container ==================== */

.cfm-form-container {
    position: relative;
    z-index: 10;
}

.cfm-form-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 50px;
    transition: all 0.3s ease;
}

body.light .cfm-form-glass {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==================== Form Elements ==================== */

.cfm-form-group {
    margin-bottom: 20px;
}

.cfm-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #fff;
}

body.light .cfm-form-label {
    color: #111012;
}

.cfm-required-star {
    color: #ff4444;
    margin-left: 3px;
}

.cfm-form-control {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.cfm-form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.cfm-form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(221, 241, 96, 0.5);
    box-shadow: 0 0 0 3px rgba(221, 241, 96, 0.1);
}

body.light .cfm-form-control {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111012;
}

body.light .cfm-form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light .cfm-form-control:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(159, 139, 231, 0.5);
    box-shadow: 0 0 0 3px rgba(159, 139, 231, 0.1);
}

textarea.cfm-form-control {
    min-height: 120px;
    resize: vertical;
}

/* ==================== Services Checkboxes ==================== */

.cfm-services-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.cfm-checkbox-item {
    position: relative;
}

.cfm-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.cfm-checkbox-item label {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #fff;
    margin: 0;
    user-select: none;
}

body.light .cfm-checkbox-item label {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111012;
}

.cfm-checkbox-item label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(221, 241, 96, 0.3);
}

body.light .cfm-checkbox-item label:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(159, 139, 231, 0.3);
}

.cfm-checkbox-item input[type="checkbox"]:checked + label {
    background: rgba(221, 241, 96, 0.15);
    border-color: #DDF160;
    color: #DDF160;
    font-weight: 500;
}

body.light .cfm-checkbox-item input[type="checkbox"]:checked + label {
    background: rgba(159, 139, 231, 0.15);
    border-color: #9F8BE7;
    color: #9F8BE7;
}

.cfm-checkbox-item label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

body.light .cfm-checkbox-item label::before {
    border-color: rgba(0, 0, 0, 0.3);
}

.cfm-checkbox-item input[type="checkbox"]:checked + label::before {
    background: #DDF160;
    border-color: #DDF160;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111012' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

body.light .cfm-checkbox-item input[type="checkbox"]:checked + label::before {
    background: #9F8BE7;
    border-color: #9F8BE7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ==================== Newsletter Checkbox ==================== */

.cfm-newsletter-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light .cfm-newsletter-checkbox {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.cfm-newsletter-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(221, 241, 96, 0.3);
}

body.light .cfm-newsletter-checkbox:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(159, 139, 231, 0.3);
}

.cfm-newsletter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.cfm-newsletter-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    margin: 0;
    user-select: none;
}

body.light .cfm-newsletter-checkbox label {
    color: #111012;
}

.cfm-newsletter-checkbox label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-right: 12px;
    margin-top: 2px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

body.light .cfm-newsletter-checkbox label::before {
    border-color: rgba(0, 0, 0, 0.3);
}

.cfm-newsletter-checkbox input[type="checkbox"]:checked + label {
    color: #DDF160;
}

body.light .cfm-newsletter-checkbox input[type="checkbox"]:checked + label {
    color: #9F8BE7;
}

.cfm-newsletter-checkbox input[type="checkbox"]:checked + label::before {
    background: #DDF160;
    border-color: #DDF160;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111012' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

body.light .cfm-newsletter-checkbox input[type="checkbox"]:checked + label::before {
    background: #9F8BE7;
    border-color: #9F8BE7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ==================== Submit Button ==================== */

.cfm-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: #DDF160;
    color: #111012;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cfm-submit-btn:hover {
    background: #c9dc50;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(221, 241, 96, 0.3);
}

.cfm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

body.light .cfm-submit-btn {
    background: #333253;
    color: #fff;
}

body.light .cfm-submit-btn:hover {
    background: #252440;
    box-shadow: 0 10px 30px rgba(51, 50, 83, 0.3);
}

/* ==================== Messages ==================== */

.cfm-messages {
    margin-bottom: 20px;
}

.cfm-alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 14px;
}

.cfm-alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.cfm-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ==================== Responsive ==================== */

@media (max-width: 767px) {
    .cfm-form-glass {
        padding: 30px 20px;
    }

    .cfm-services-checkboxes {
        grid-template-columns: 1fr;
    }

    .cfm-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

