/* ==========================================================================
   Lafinda Modern Modal & Dialog System (2026 SaaS / Mobile-First Architecture)
   Applies to all Confirmation Dialogs and Standard Modals across Lafinda
   ========================================================================== */

/* ── Modern Blurred Backdrop ── */
.modal-backdrop.show {
    opacity: 1 !important;
    background-color: rgba(11, 27, 60, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Modern Modal Content Shell ── */
.modal .modal-content {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 60px -12px rgba(11, 27, 60, 0.22), 0 12px 28px -8px rgba(11, 27, 60, 0.08);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Modern Header ── */
.modal .modal-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal .modal-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: #0b1b3c;
    letter-spacing: -0.015em;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal .modal-header .btn-close,
.modal .modal-header .btn-close-white {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background-color: #f1f5f9;
    filter: none;
    opacity: 0.8;
    background-size: 10px 10px;
    transition: all 0.15s ease;
}

.modal .modal-header .btn-close:hover,
.modal .modal-header .btn-close-white:hover {
    background-color: #e2e8f0;
    opacity: 1;
    transform: scale(1.05);
}

/* ── Modern Body ── */
.modal .modal-body {
    padding: 1.5rem;
    color: #334155;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.modal .modal-body h6,
.modal .modal-body h5 {
    color: #0b1b3c;
    font-weight: 750;
    margin-top: 1.15rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.modal .modal-body h6:first-child,
.modal .modal-body h5:first-child {
    margin-top: 0;
}

.modal .modal-body p {
    margin-bottom: 0.75rem;
    color: #475569;
}

.modal .modal-body ul,
.modal .modal-body ol {
    padding-left: 1.25rem;
    margin-bottom: 0.85rem;
    color: #475569;
}

.modal .modal-body li {
    margin-bottom: 0.35rem;
}

/* ── Modern Footer ── */
.modal .modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem 1.25rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.modal .modal-footer .btn {
    border-radius: 12px;
    font-weight: 650;
    font-size: 0.875rem;
    padding: 0.55rem 1.25rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.modal .modal-footer .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.modal .modal-footer .btn-secondary:hover {
    background: #e2e8f0;
    color: #0b1b3c;
}

.modal .modal-footer .btn-primary,
.modal .modal-footer .btn-lafinda-brand {
    background: #0b1b3c;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(11, 27, 60, 0.18);
}

.modal .modal-footer .btn-primary:hover,
.modal .modal-footer .btn-lafinda-brand:hover {
    background: #1a2b4a;
    color: #ffffff;
    transform: translateY(-1px);
}

.modal .modal-footer .btn-danger {
    background: #ef4444;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.modal .modal-footer .btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ── Dedicated Lafinda Confirm Dialog Card ── */
.lafinda-confirm-modal .modal-dialog {
    max-width: 400px;
    margin: 1.25rem auto;
    padding: 0 1rem;
}

.lafinda-confirm-modal .modal-content.lafinda-confirm-modal__card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 20px 48px -8px rgba(11, 27, 60, 0.2), 0 10px 24px -6px rgba(11, 27, 60, 0.08);
    overflow: hidden;
    position: relative;
    padding: 1.65rem 1.35rem 1.35rem;
}

.lafinda-confirm-modal__close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    z-index: 10;
}

.lafinda-confirm-modal__close-btn:hover {
    background: #e2e8f0;
    color: #0b1b3c;
}

.lafinda-confirm-modal__body {
    text-align: center;
    padding: 0.25rem 0.25rem 1.15rem;
}

.lafinda-confirm-modal__icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem auto;
    font-size: 1.45rem;
    transition: all 0.2s ease;
}

.lafinda-confirm-modal__icon-wrap--danger {
    background: #fef2f2;
    color: #ef4444;
}

.lafinda-confirm-modal__icon-wrap--warning {
    background: #fffbeb;
    color: #f59e0b;
}

.lafinda-confirm-modal__icon-wrap--primary {
    background: #eff6ff;
    color: #2563eb;
}

.lafinda-confirm-modal__title {
    font-size: 1.15rem;
    font-weight: 750;
    color: #0b1b3c;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.lafinda-confirm-modal__message {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.5;
}

.lafinda-confirm-modal__message-detail {
    margin-bottom: 0.35rem;
    color: #334155;
    font-weight: 500;
}

.lafinda-confirm-modal__message-title {
    font-weight: 700;
    color: #0b1b3c;
    margin: 0.35rem 0;
    word-break: break-word;
}

.lafinda-confirm-modal__message-muted {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

.lafinda-confirm-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding-top: 0.35rem;
}

.lafinda-confirm-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 42px;
}

.lafinda-confirm-modal__btn--cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.lafinda-confirm-modal__btn--cancel:hover {
    background: #e2e8f0;
    color: #0b1b3c;
}

.lafinda-confirm-modal__btn--danger {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}

.lafinda-confirm-modal__btn--danger:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.lafinda-confirm-modal__btn--primary {
    background: #0b1b3c;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(11, 27, 60, 0.2);
}

.lafinda-confirm-modal__btn--primary:hover {
    background: #1a2b4a;
    color: #ffffff;
    transform: translateY(-1px);
}

.lafinda-confirm-modal__btn--warning {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.lafinda-confirm-modal__btn--warning:hover {
    background: #d97706;
    color: #ffffff;
}
