/* ── Trigger Button ───────────────────────────────────────────────────────── */

.te-callback-trigger {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    background: transparent;
    border: 2px solid #333;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1.4;
}

.te-callback-trigger:hover,
.te-callback-trigger:focus {
    background: #f7f7f7;
    outline: none;
}

/* ── Body lock when modal is open ────────────────────────────────────────── */

body.te-callback-modal-open {
    overflow: hidden;
}

/* ── Modal Wrapper ────────────────────────────────────────────────────────── */

#te-callback-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

#te-callback-modal.is-open {
    display: block;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */

.te-callback-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

/* ── Modal Box ────────────────────────────────────────────────────────────── */

.te-callback-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    padding: 36px 32px;
    width: 90%;
    max-width: 420px;
    z-index: 1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.te-callback-box h3 {
    margin: 0 0 8px;
    font-size: 1.3em;
    line-height: 1.3;
}

.te-callback-intro {
    margin: 0 0 20px;
    color: #555;
    font-size: 0.95em;
}

/* ── Phone Input ──────────────────────────────────────────────────────────── */

.te-callback-field {
    margin-bottom: 8px;
}

.te-callback-field .iti {
    width: 100%;
}

.te-callback-field input[type="tel"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.te-callback-field input[type="tel"]:focus {
    border-color: #666;
    outline: none;
}

/* ── Error Message ────────────────────────────────────────────────────────── */

.te-callback-error {
    color: #c0392b;
    font-size: 0.88em;
    margin: 4px 0 12px;
    min-height: 1.2em;
    line-height: 1.4;
}

/* ── Action Buttons ───────────────────────────────────────────────────────── */

.te-callback-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.te-callback-actions #te-callback-submit {
    flex: 1;
    padding: 10px 16px;
    font-size: 1em;
    cursor: pointer;
}

.te-callback-actions #te-callback-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.te-callback-cancel {
    padding: 10px 16px;
    font-size: 1em;
    cursor: pointer;
}

/* ── Success State ────────────────────────────────────────────────────────── */

.te-callback-success {
    text-align: center;
    padding: 20px 10px;
}

.te-callback-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 1.6em;
    margin: 0 auto 16px;
}

.te-callback-success p {
    font-size: 1.05em;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {
    .te-callback-box {
        padding: 24px 20px;
    }

    .te-callback-actions {
        flex-direction: column;
    }
}
