/* TCO Appointment Form Overlay */
.tco-appointment-overlay {
    position: fixed;
    inset: 0;
    /* Höher als der TCO-Calculator-Overlay (999999 !important), damit es
       darüber liegt wenn vom Calculator aus geöffnet wird. */
    z-index: 1000001 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.tco-appointment-overlay.is-open {
    display: flex;
}
.tco-appointment-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}
.tco-appointment-overlay-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding: 2rem 2rem 1.5rem;
}
.tco-appointment-overlay-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: transparent;
    border: 0;
    padding: 0.35rem;
    cursor: pointer;
    color: #555;
    line-height: 0;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}
.tco-appointment-overlay-close:hover,
.tco-appointment-overlay-close:focus-visible {
    background: #f0f0f0;
    color: #000;
    outline: none;
}
.tco-appointment-overlay-header {
    margin-bottom: 1.25rem;
    padding-right: 1.5rem;
}
.tco-appointment-overlay-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}
.tco-appointment-overlay-header p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.45;
}

/* WPForms-Anpassungen, damit das Formular mit dem Modal-Look harmoniert */
.tco-appointment-overlay-body .wpforms-container {
    margin: 0;
}
.tco-appointment-overlay-body .wpforms-form .wpforms-field {
    padding: 0 0 0.85rem;
}
.tco-appointment-overlay-body .wpforms-form .wpforms-field-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.35rem;
}
.tco-appointment-overlay-body .wpforms-form input[type="text"],
.tco-appointment-overlay-body .wpforms-form input[type="email"],
.tco-appointment-overlay-body .wpforms-form input[type="tel"],
.tco-appointment-overlay-body .wpforms-form textarea {
    width: 100%;
    background: #f5f5f5;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    color: #222;
}
.tco-appointment-overlay-body .wpforms-form input[type="text"]:focus,
.tco-appointment-overlay-body .wpforms-form input[type="email"]:focus,
.tco-appointment-overlay-body .wpforms-form input[type="tel"]:focus,
.tco-appointment-overlay-body .wpforms-form textarea:focus {
    background: #fff;
    border-color: #999;
    outline: none;
}
.tco-appointment-overlay-body .wpforms-form textarea {
    min-height: 90px;
    resize: vertical;
}
.tco-appointment-overlay-body .wpforms-form .wpforms-submit-container {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}
.tco-appointment-overlay-body .wpforms-form button.wpforms-submit {
    background: #e60012;
    color: #fff;
    border: 0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.tco-appointment-overlay-body .wpforms-form button.wpforms-submit:hover {
    background: #b8000e;
}
.tco-appointment-overlay-body .wpforms-form button.wpforms-submit:focus-visible {
    outline: 2px solid #b8000e;
    outline-offset: 2px;
}

/* Confirmation-Message */
.tco-appointment-overlay-body .wpforms-confirmation-container-full {
    margin: 0;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

@media (max-width: 480px) {
    .tco-appointment-overlay {
        padding: 0.75rem;
    }
    .tco-appointment-overlay-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .tco-appointment-overlay-header h2 {
        font-size: 1.25rem;
    }
}
