/* Unified app modals (confirm / alert). Overlay without dimming — panel uses shadow. */
/* Подтверждения удаления (эталон «тост» справа): см. .app-toast-confirm — static/css/app_toasts.css + appShowDeleteConfirmToast в app_toasts.js */

.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
    backdrop-filter: none;
    box-sizing: border-box;
}

.app-modal-overlay[hidden],
.app-modal-overlay.is-hidden {
    display: none !important;
}

.app-modal-panel {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #000;
    border-left: 6px solid #e63946;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: left;
    font-family: "Inter", sans-serif;
    box-sizing: border-box;
}

.app-modal-panel--info {
    border-left-color: #228be6;
}

.app-modal__title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.app-modal__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-word;
}

.app-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.app-modal__actions .btn-main,
.app-modal__actions button {
    font-size: 13px;
    padding: 8px 16px;
}

@media (max-width: 640px) {
    .app-modal-overlay {
        padding: 14px;
    }
}

/* ------------------------------------------------------------------------- */
/* Etalon: modal with lede + label + textarea (cabinet_table_booking_detail) */
/* ------------------------------------------------------------------------- */

.is-hidden {
    display: none !important;
}

/* Карточка без prompt-эталона (напр. смена телефона в кабинете) */
.card.custom-modal-content:not(.app-modal-surface--prompt) {
    width: 90%;
    max-width: 450px;
    background: var(--white, #fff);
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* Used on booking detail + guest dashboard (legacy class name) */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
    backdrop-filter: none;
    box-sizing: border-box;
}

.custom-modal-overlay.custom-modal-overlay-hidden {
    display: none;
}

/* Inner “card” for prompt modals: white panel, border, soft shadow (no left accent bar) */
.card.app-modal-surface--prompt,
.app-modal-surface--prompt {
    width: 90%;
    max-width: 450px;
    margin: 0;
    background: var(--white, #fff);
    padding: 25px;
    box-sizing: border-box;
    border: 1px solid var(--black, #000);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.08);
    animation: app-modal-pop-in 0.3s ease forwards;
    text-align: left;
    font-family: "Inter", sans-serif;
}

.app-modal__title--prompt {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black, #000);
    line-height: 1.25;
}

.app-modal__lede,
.booking-confirm-message {
    margin: 0 0 25px 0;
    font-size: 1.1rem;
    color: var(--black, #000);
    line-height: 1.4;
}

.app-modal__field-label,
.booking-modal-comment-label {
    display: block;
    margin: 0 0 8px 0;
    font-weight: 700;
    color: var(--black, #000);
}

.app-modal__textarea,
.booking-modal-comment-textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 10px 0;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.35;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    resize: vertical;
    min-height: 88px;
}

.app-modal__error,
.booking-modal-confirm-error {
    display: block;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #b00020;
}

.app-modal__actions--prompt,
.booking-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 0;
    align-items: center;
}

.app-modal__actions--prompt .btn-main,
.booking-confirm-actions .btn-main {
    font-size: 13px;
    padding: 8px 16px;
}

@keyframes app-modal-pop-in {
    0% {
        transform: scale(0.96);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .card.app-modal-surface--prompt,
    .app-modal-surface--prompt {
        width: 100%;
        max-width: none;
    }

    .custom-modal-overlay {
        padding: 14px;
    }
}
