/* ClearMax Quotes Modal */

.clearmax-quotes-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.clearmax-quotes-modal.active {
    display: flex !important;
}

.clearmax-quotes-modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.clearmax-quotes-modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 20px;
}

.clearmax-quotes-modal-close:hover {
    color: #000;
}

.clearmax-quotes-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0c3c60;
    font-size: 24px;
    font-weight: bold;
}

.clearmax-quotes-modal p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* CF7 Form inside modal */
.clearmax-quotes-modal .wpcf7-form {
    margin: 20px 0;
}

.clearmax-quotes-modal .wpcf7-form p {
    margin-bottom: 18px;
}

/* Labels - inline layout: text left, input right */
.clearmax-quotes-modal .wpcf7-form label {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: black;
    font-size: 14px;
    align-items: stretch;
    font-weight: 600;
}

/* Hide <br> inside labels — not needed with flex */
.clearmax-quotes-modal .wpcf7-form label br {
    display: none;
}

/* Input wrap fills remaining space */
.clearmax-quotes-modal .wpcf7-form .wpcf7-form-control-wrap {
    flex: 1;
    min-width: 0;
}

/* Form required asterisk */
.clearmax-quotes-modal .wpcf7-form-required {
    color: #d32f2f;
    margin-left: 3px;
}

/* Input fields — all text-like types unified */
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="text"],
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="email"],
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="tel"],
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="number"],
.clearmax-quotes-modal .wpcf7-form-control-wrap select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    height: auto;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 0px;
    -webkit-appearance: none;
    appearance: none;
}

.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="text"]:focus,
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="email"]:focus,
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="tel"]:focus,
.clearmax-quotes-modal .wpcf7-form-control-wrap input[type="number"]:focus,
.clearmax-quotes-modal .wpcf7-form-control-wrap select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Select arrow */
.clearmax-quotes-modal .wpcf7-form-control-wrap[data-name="client-type"] {
    position: relative;
    display: block;
}

.clearmax-quotes-modal .wpcf7-form-control-wrap[data-name="client-type"]::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    pointer-events: none;
}

/* GDPR checkbox — CF7 list-item structure */
.clearmax-quotes-modal .wpcf7-form-control-wrap[data-name="gdpr-consent"] {
    flex: 1;
}

.clearmax-quotes-modal .wpcf7-checkbox .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.clearmax-quotes-modal .wpcf7-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0073aa;
}

.clearmax-quotes-modal .wpcf7-checkbox .wpcf7-list-item-label {
    font-size: 13px;
    font-weight: normal;
    color: #555;
    line-height: 1.4;
    cursor: pointer;
}

/* Small text under checkbox */
.clearmax-quotes-modal small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Submit button */
.clearmax-quotes-modal .wpcf7-submit {
    background-color: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
}

.clearmax-quotes-modal .wpcf7-submit:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.clearmax-quotes-modal .wpcf7-submit:active {
    transform: translateY(0);
}

/* Response messages */
.clearmax-quotes-modal .wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    color: black;
}

.clearmax-quotes-modal .wpcf7-mail-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.clearmax-quotes-modal .wpcf7-mail-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
