/* LP3 modal theme — canonical modal look, styled after
   Components/Pages/Underwriting/Components/EnvironmentalReviewModal.razor(.css):
   white header, dark title, 16px radius, light footer strip, blurred backdrop.
   Per-component scoped CSS still wins (LecaApp.styles.css loads last) — pages
   should only override for mode accents (icon tile color, submit button color). */

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.modal-header {
    background: #fff;
    border-bottom: 1px solid #EEF2F6;
    padding: 1.25rem 1.5rem 1rem;
    gap: 0.9rem;
}

.modal-header .btn-close {
    border-radius: 8px;
}

.modal-header .btn-close:hover {
    background-color: #F1F5F9;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
}

.modal-body {
    padding: 1.15rem 1.5rem;
}

.modal-footer {
    background: #FAFBFC;
    border-top: 1px solid #EEF2F6;
    padding: 1rem 1.5rem;
    gap: 0.6rem;
    justify-content: flex-end;
}

/* Footer buttons — ghost secondary, semantic-colored primary (per the reference). */
.modal-footer .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 1.15rem;
}

.modal-footer .btn-secondary,
.modal-footer .btn-outline-secondary {
    background: transparent;
    border: 1px solid #E2E8F0;
    color: #64748B;
}

.modal-footer .btn-secondary:hover,
.modal-footer .btn-outline-secondary:hover {
    background: #F1F5F9;
    border-color: #E2E8F0;
    color: #0F172A;
}

.modal-footer .btn-primary {
    background: var(--brand-600, #004980);
    border-color: var(--brand-600, #004980);
}

.modal-footer .btn-primary:hover:not(:disabled) {
    background: var(--brand-700, #003760);
    border-color: var(--brand-700, #003760);
}

.modal-footer .btn-success {
    background: var(--success-600, #059669);
    border-color: var(--success-600, #059669);
}

.modal-footer .btn-success:hover:not(:disabled) {
    background: var(--success-700, #047857);
    border-color: var(--success-700, #047857);
}

.modal-footer .btn-danger {
    background: var(--error-600, #DC2626);
    border-color: var(--error-600, #DC2626);
}

.modal-footer .btn-danger:hover:not(:disabled) {
    background: var(--error-700, #B91C1C);
    border-color: var(--error-700, #B91C1C);
}

.modal-backdrop.show {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    opacity: 1;
}

/* Header icon tile — pastel square with the mode color, 42px, radius 12.
   Usage: <div class="modal-icon-tile modal-icon-{brand|success|danger|warning|neutral}"><i class="bi ..."></i></div> */
.modal-icon-tile {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.modal-icon-brand { background: var(--brand-50, #E6F2F8); color: var(--brand-600, #004980); }
.modal-icon-success { background: var(--success-50, #ECFDF5); color: var(--success-600, #059669); }
.modal-icon-danger { background: var(--error-50, #FEF2F2); color: var(--error-600, #DC2626); }
.modal-icon-warning { background: var(--accent-50, #FFFBEB); color: #B45309; }
.modal-icon-neutral { background: #F1F5F9; color: #475569; }

/* ── Swal-style confirmation dialog ──────────────────────────────────────
   For pure yes/no confirmations (delete, revoke, withdraw…): centered hero
   icon, centered title/text, centered actions — no header row, no footer strip.
   Usage:
   <div class="confirm-modal">
       <div class="confirm-icon modal-icon-danger"><i class="bi bi-trash3"></i></div>
       <h3 class="confirm-title">…</h3>
       <p class="confirm-text">…</p>
       <div class="confirm-actions">
           <button class="btn btn-cancel">Cancel</button>
           <button class="btn btn-danger">Delete</button>
       </div>
   </div>
   Modals with form inputs keep the header-row layout instead. */

.confirm-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    animation: confirmPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.confirm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 12px;
}

.confirm-text {
    font-size: 0.85rem;
    color: #64748B;
    line-height: 1.5;
    margin: 0 0 24px;
}

.confirm-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.confirm-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
}

.confirm-actions .btn-cancel,
.confirm-actions .btn-secondary,
.confirm-actions .btn-outline-secondary {
    background: transparent;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

.confirm-actions .btn-cancel:hover:not(:disabled),
.confirm-actions .btn-secondary:hover:not(:disabled),
.confirm-actions .btn-outline-secondary:hover:not(:disabled) {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #E2E8F0;
}

.confirm-actions .btn-primary { background: var(--brand-600, #004980); border-color: var(--brand-600, #004980); color: #fff; }
.confirm-actions .btn-primary:hover:not(:disabled) { background: var(--brand-700, #003760); border-color: var(--brand-700, #003760); }
.confirm-actions .btn-success { background: var(--success-600, #059669); border-color: var(--success-600, #059669); color: #fff; }
.confirm-actions .btn-success:hover:not(:disabled) { background: var(--success-700, #047857); border-color: var(--success-700, #047857); }
.confirm-actions .btn-danger { background: var(--error-600, #DC2626); border-color: var(--error-600, #DC2626); color: #fff; }
.confirm-actions .btn-danger:hover:not(:disabled) { background: var(--error-700, #B91C1C); border-color: var(--error-700, #B91C1C); }
.confirm-actions .btn-warning { background: #D97706; border-color: #D97706; color: #fff; }
.confirm-actions .btn-warning:hover:not(:disabled) { background: #B45309; border-color: #B45309; }

/* Reading measure for confirmation-dialog body content. A confirmation reads as ONE column:
   the message, any summary card the caller passes in, and the typed-confirmation inputs all
   sit on the same measure (26rem — the .confirm-modal canon above, 400px, rounded up to the
   type scale) instead of one of them running full-bleed across a wide dialog.
   Global rather than component-scoped because callers hand their own markup to the dialog as
   a RenderFragment, and a component's scoped CSS cannot reach markup it did not author.
   Used by Components/Shared/DeleteConfirmationModal. */
.confirm-measure {
    max-width: 26rem;
    margin-inline: auto;
}

@keyframes confirmPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
