/* Header CTA — free consultation modal (light form; phone picker matches contact page) */
.consultation-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.consultation-modal[hidden] {
    display: none !important;
}

.consultation-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.consultation-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 640px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    padding: 28px 24px 24px;
    box-sizing: border-box;
}

.consultation-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultation-modal-close:hover {
    background: #e5e7eb;
}

.consultation-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #101828;
    margin: 0 40px 8px 0;
    line-height: 1.25;
}

.consultation-modal-lead {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.5;
}

.consultation-modal-form .consultation-field {
    margin-bottom: 16px;
}

.consultation-modal-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.consultation-req {
    color: #e85d2a;
}

.consultation-opt {
    font-weight: 400;
    color: #9ca3af;
}

.consultation-modal-form input[type="text"],
.consultation-modal-form input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
}

.consultation-modal-form input:focus,
.consultation-modal-form textarea:focus {
    border-color: #e85d2a;
    background: #fff;
}

.consultation-modal-form input.invalid {
    border-color: #dc2626;
}

.consultation-modal-form textarea.consultation-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.consultation-field-error {
    display: block;
    font-size: 13px;
    color: #dc2626;
    margin-top: 4px;
    min-height: 0;
}

.consultation-field-error:empty {
    display: none;
}

.consultation-form-error {
    font-size: 14px;
    color: #dc2626;
    margin: 0 0 12px;
}

.consultation-form-error[hidden] {
    display: none !important;
}

.consultation-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Phone row — mirror contact form (scoped) */
.consultation-modal .phone-input {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    overflow: visible;
    position: relative;
}

.consultation-modal .phone-input:focus-within {
    border-color: #e85d2a;
    background: #fff;
}

.consultation-modal .phone-input:has(input.invalid) {
    border-color: #dc2626;
}

.consultation-modal .country-select {
    position: relative;
}

.consultation-modal .country-select-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 12px;
    background: #f0f0f0;
    border: none;
    border-right: 1px solid #e5e7eb;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    min-height: 44px;
}

.consultation-modal .country-select-trigger:hover {
    background: #e8e8e8;
}

.consultation-modal .country-select-flag {
    font-size: 18px;
    line-height: 1;
}

.consultation-modal .country-select-dial {
    font-weight: 500;
}

.consultation-modal .country-select-chevron {
    font-size: 10px;
    color: #666;
}

.consultation-modal .country-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 260px;
    max-width: min(320px, 85vw);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 120;
    overflow: hidden;
}

.consultation-modal .country-select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.consultation-modal .country-select-list {
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.consultation-modal .country-select-item {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.consultation-modal .country-select-item:hover,
.consultation-modal .country-select-item.country-select-item--active {
    background: #fff5f0;
    color: #e85d2a;
}

.consultation-modal .phone-input input[type="tel"] {
    border: none;
    background: transparent;
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 14px;
}

.consultation-modal .phone-input input[type="tel"]:focus {
    outline: none;
}

.consultation-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #e85d2a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.consultation-submit:hover {
    background: #d14d1f;
}

.consultation-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.consultation-modal-success .consultation-submit {
    margin-top: 16px;
}

.consultation-modal-success {
    text-align: center;
    padding: 8px 0 0;
}

.consultation-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consultation-success-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #101828;
    margin: 0 0 8px;
}

.consultation-success-msg {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.55;
    margin: 0 0 8px;
}

@media (max-width: 480px) {
    .consultation-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .consultation-modal-panel {
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }
}
