/* FORM CONTAINER (modal content) */
#contact-form {
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    max-height: 90vh;
    overflow-y: auto;
}

/* your existing styles */
#form {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.service-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* a bit more space between box and label */
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: Montserrat, sans-serif;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#submit {
    background-color: #000;
    color: white;
    padding: 1.5rem 0;
    width: 100%;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* COMPLETE CUSTOM CHECKBOX STYLING */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border: 2px solid #333;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    margin: 0;
    outline: none;
}

input[type="checkbox"]:checked {
    background-color: #000;
}

/* Add checkmark pseudo-element */
input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* MOBILE: Bigger checkboxes + uncheck fix */
@media (max-width: 768px) {
    input[type="checkbox"] {
        width: 32px !important;
        height: 32px !important;
        border-width: 3px;
    }
    
    input[type="checkbox"]:checked::after {
        font-size: 20px;
    }
    
    /* Ensure labels don't interfere with tapping */
    .checkbox-container {
        padding: 12px 0;  /* more touch area */
        position: relative;
        z-index: 1;
    }
    
    .checkbox-container label {
        pointer-events: none;  /* prevent label blocking checkbox */
        user-select: none;
        line-height: 1.3;
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    #contact-form {
        width: 95%;
        padding: 12px;
        max-height: 70vh;
        border-radius: 8px;
        /* wider margins from screen edges */
        margin-left: 2.5%;
        margin-right: 2.5%;
    }

    #form {
        padding: 8px;
        font-size: 14px;
    }


}

/* PRECISE HOVER OVERRIDE - PROTECTS CHECKBOXES */
#contact-form input[type="text"]:hover,
#contact-form input[type="email"]:hover,
#contact-form input[type="tel"]:hover,
#contact-form textarea:hover {
    background: none !important;
    background-color: inherit !important;
}

/* CHECKBOX HOVER - ALLOW NORMAL FUNCTION */
#contact-form input[type="checkbox"]:hover {
    background-color: white !important; /* unchecked hover */
}

#contact-form input[type="checkbox"]:checked:hover {
    background-color: #000 !important; /* checked hover stays black */
}

/* SUBMIT BUTTON HOVER - KEEP YOUR DESIGN */
#contact-form #submit:hover {
    background-color: #333 !important; /* subtle darken instead of contact.css behavior */
}

/* PLACEHOLDER - NORMAL BEHAVIOR */
#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: #999 !important;
}

/* BLACK BOLD TEXT CURSOR IN MODAL INPUTS */
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="tel"],
#contact-form textarea {
    color: #000 !important;
    font-weight: 600 !important; /* bold */
    -webkit-text-fill-color: #000 !important; /* webkit override */
}

/* Active cursor/focus state */
#contact-form input:focus,
#contact-form textarea:focus {
    color: #000 !important;
    font-weight: 600 !important;
}

/* Ensure caret (cursor) is visible */
#contact-form input::selection,
#contact-form textarea::selection {
    background: #b3d9ff;
    color: #000;
}

/* FIX CUT-OFF BOTTOM BORDERS */
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="tel"],
#contact-form textarea {
    border-bottom: 1px solid #ddd !important;
    border-bottom-style: solid !important;
}

/* Ensure full border on focus too */
#contact-form input:focus,
#contact-form textarea:focus {
    border: 2px solid #007bff !important; /* nice focus ring */
    border-bottom: 2px solid #007bff !important;
}

/* MOBILE SUCCESS STATE - FORCE GREEN BUTTON */
#contact-form #submit.success {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
}

/* MOBILE ERROR STATE */
#contact-form #submit.error {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Ensure disabled state works on mobile */
#contact-form #submit:disabled,
#contact-form #submit[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}