.form-panel {
    padding: 60px 40px;
    background: #fff;
}

.contact-form {
    margin: 0 auto;
}

.form-group .form-control-wrap input,.form-control {
    border: 2px solid #E1DBF4;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control::placeholder {
    color: #adb5bd;
}

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

.phone-input-group {
    display: flex;
    gap: 10px;
}

.phone-country-select {
    flex: 0 0 140px;
}

.phone-number-input {
    flex: 1;
}

/*.form-check {
    margin-bottom: 30px;
}
*/
.form-check-input {
    margin-top: 0.3rem;
}

.form-check-label {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    padding-left: 10px;
    margin-top: 5px;
}

.btn-legacy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-legacy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-legacy:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.5);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-check-input.is-invalid {
    border-color: #dc3545;
}

.form-check-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-container--default .select2-selection--single {
    height: 56px !important;
    border: 2px solid #E1DBF4 !important;
    border-radius: 8px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #64728f !important;
    line-height: 56px !important;
    padding-left: 16px !important;
    padding-right: 20px !important;
    font-size: 16px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 56px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--open .select2-selection--single {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

.select2-dropdown {
    border: 2px solid #667eea !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}

.select2-container--default .select2-results__option {
    padding: 12px 16px !important;
    font-size: 16px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #667eea !important;
    color: #fff !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e9ecef !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
}

.phone-input-group .select2-container {
    flex: 0 0 140px;
}

.captcha-container {
    margin: 20px 0;
    width: 100%;
}

.captcha-error {
    margin-top: 10px;
    text-align: center;
}

/* Cloudflare Turnstile: keep Success widget inside the form without stretching internals */
.cf-turnstile-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.cf-turnstile {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.cf-turnstile > div {
    max-width: 100% !important;
}

.cf-turnstile iframe {
    max-width: 100% !important;
}

@media (max-width: 420px) {
    .cf-turnstile iframe {
        transform: scale(0.92);
        transform-origin: left center;
    }
}

.captcha-invalid {
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
    padding: 5px;
}

@media (max-width: 991px) {
    .form-panel {
        padding: 40px 30px;
    }
}

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

    .phone-input-group {
        flex-direction: column;
        gap: 15px;
    }

    .phone-country-select {
        flex: 1;
    }

    .phone-input-group .select2-container {
        flex: 1;
        width: 100% !important;
    }

    .select2-container--default .select2-selection--single {
        height: 44px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 44px !important;
        font-size: 16px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px !important;
    }
}
