.captcha-control {
    margin-bottom: 20px;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--espartyox-primary, #D4A574);
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 10px;
}

.captcha-question {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--espartyox-black, #1E1E1E);
    font-family: var(--espartyox-font, "DM Sans", sans-serif);
    background: white;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 140px;
    justify-content: center;
}

.captcha-operator {
    color: var(--espartyox-primary, #D4A574);
    font-weight: 800;
}

.captcha-equals {
    color: var(--espartyox-primary, #D4A574);
    font-weight: 800;
    margin-left: 5px;
}

.captcha-wrapper input#captcha {
    width: 80px !important;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    color: var(--espartyox-black, #1E1E1E);
    transition: all 0.3s ease;
}

.captcha-wrapper input#captcha:focus {
    border-color: var(--espartyox-primary, #D4A574);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.captcha-wrapper input#captcha::placeholder {
    color: #aaa;
    font-weight: 400;
}

.captcha-refresh {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--espartyox-primary, #D4A574);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: var(--espartyox-black, #1E1E1E);
    transform: rotate(180deg);
}

.captcha-refresh i {
    font-size: 16px;
}

.captcha-error {
    display: block;
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

.captcha-success {
    color: #28a745 !important;
}

/* ===== Form Validation Styles ===== */

/* Invalid state for inputs (HTML5 validation) */
.form-one input:invalid:not(:placeholder-shown),
.form-one textarea:invalid:not(:placeholder-shown),
.form-one select:invalid:not(:placeholder-shown) {
    border-color: #dc3545 !important;
}

/* Valid state for inputs (HTML5 validation) */
.form-one input:valid:not(:placeholder-shown),
.form-one textarea:valid:not(:placeholder-shown),
.form-one select:valid:not(:placeholder-shown) {
    border-color: #28a745 !important;
}

/* Hide number input spinners */
.captcha-wrapper input[type="number"]::-webkit-outer-spin-button,
.captcha-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.captcha-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

@media (max-width: 576px) {
    .captcha-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 12px 15px;
    }

    .captcha-question {
        font-size: 20px;
        min-width: 120px;
        padding: 8px 15px;
    }

    .captcha-wrapper input#captcha {
        width: 70px !important;
        height: 45px;
        font-size: 18px;
    }

    .captcha-refresh {
        width: 40px;
        height: 40px;
    }
}

/* ===== Privacy Consent Checkbox ===== */
.privacy-field {
    margin-top: 10px;
}

.privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.privacy-label input[type="checkbox"] {
    all: revert;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--agenzia-primary, #ad4d4d);
}

.privacy-label span {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    flex: 1;
}

.privacy-label a {
    color: var(--agenzia-primary, #ad4d4d);
    font-weight: 600;
    text-decoration: underline;
}

.privacy-label a:hover {
    color: var(--agenzia-primary-dark, #8b3a3a);
}


/* ===== Google Maps Consent Placeholder ===== */
.map-consent-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #ccc;
    border-radius: 10px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.map-consent-placeholder__content {
    max-width: 450px;
}

.map-consent-placeholder__icon {
    font-size: 60px;
    color: var(--agenzia-primary, #ad4d4d);
    margin-bottom: 20px;
    display: block;
}

.map-consent-placeholder__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--agenzia-secondary, #2c1f1f);
    margin-bottom: 15px;
}

.map-consent-placeholder__text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.map-consent-placeholder__address {
    font-size: 14px;
    color: #888;
    margin-top: 20px;
}

.map-consent-placeholder__address strong {
    color: var(--agenzia-secondary, #2c1f1f);
}

@media (max-width: 576px) {
    .map-consent-placeholder {
        height: 400px;
        padding: 30px 15px;
    }

    .map-consent-placeholder__icon {
        font-size: 45px;
    }

    .map-consent-placeholder__title {
        font-size: 20px;
    }

    .map-consent-placeholder__text {
        font-size: 14px;
    }
}
