/* JohnnyMsgBox — 9 temas: Win98, WinXP, Win7, Win10, Win11, MacBig, MacTahoe, Quick, Ubuntu */

.jmb-root {
    --jmb-primary: #EB455F;
    --jmb-primary-dark: #D63A54;
    --jmb-sidebar: #2B3467;
    --jmb-beige: #FCFFE7;
    --jmb-azul-claro: #BAD7E9;
    --jmb-danger: #ef4444;
    --jmb-danger-dark: #dc2626;
    --jmb-exito: #22C55E;
    --jmb-advertencia: #F59E0B;
    --jmb-info: #3B82F6;
    --jmb-font: Tahoma, "Segoe UI", system-ui, sans-serif;
}

/* ---- Base ---- */

.jmb-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    padding: 1rem;
}

.jmb-dialog {
    width: 100%;
    max-width: 440px;
    font-family: var(--jmb-font);
    font-size: 13px;
    color: #1a1a1a;
    animation: jmb-dialog-in 0.18s ease-out;
    overflow: hidden;
}

@keyframes jmb-dialog-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.jmb-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    user-select: none;
}

.jmb-titlebar-text {
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jmb-titlebar-close {
    flex-shrink: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jmb-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.jmb-dialog-title {
    display: none;
}

.jmb-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.jmb-icon svg {
    width: 48px;
    height: 48px;
    display: block;
}

.jmb-icon--exito { color: var(--jmb-exito); }
.jmb-icon--error { color: #ef4444; }
.jmb-icon--advertencia { color: var(--jmb-advertencia); }
.jmb-icon--info { color: var(--jmb-info); }
.jmb-icon--confirmar { color: var(--jmb-primary); }

.jmb-icon--cargando {
    display: flex;
    align-items: center;
    justify-content: center;
}

.jmb-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--jmb-azul-claro);
    border-top-color: var(--jmb-primary);
    border-radius: 50%;
    animation: jmb-spin 0.8s linear infinite;
}

@keyframes jmb-spin {
    to { transform: rotate(360deg); }
}

.jmb-content { flex: 1; min-width: 0; padding-top: 4px; }
.jmb-message { line-height: 1.45; word-break: break-word; margin: 0; }

.jmb-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.jmb-btn {
    min-width: 88px;
    padding: 4px 18px;
    font-family: var(--jmb-font);
    font-size: 13px;
    cursor: pointer;
}

/* ---- Toasts base ---- */

.jmb-toast-container {
    position: fixed;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: 1rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
}

.jmb-toast-container--top { top: 0; left: 50%; transform: translateX(-50%); }
.jmb-toast-container--top-start { top: 0; left: 0; }
.jmb-toast-container--top-end { top: 0; right: 0; }
.jmb-toast-container--bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.jmb-toast-container--bottom-start { bottom: 0; left: 0; }
.jmb-toast-container--bottom-end { bottom: 0; right: 0; }

.jmb-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    font-family: var(--jmb-font);
    font-size: .875rem;
    animation: jmb-toast-in 0.28s ease-out;
}

@keyframes jmb-toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.jmb-toast-icon { flex-shrink: 0; margin-top: 1px; }
.jmb-toast--exito .jmb-toast-icon { color: var(--jmb-exito); }
.jmb-toast--error .jmb-toast-icon { color: #ef4444; }
.jmb-toast--advertencia .jmb-toast-icon { color: var(--jmb-advertencia); }
.jmb-toast--info .jmb-toast-icon { color: var(--jmb-info); }

.jmb-toast-body { flex: 1; min-width: 0; }
.jmb-toast-title { font-weight: 700; margin-bottom: .15rem; }
.jmb-toast-message { line-height: 1.4; word-break: break-word; }

.jmb-toast-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #888;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* ========== Win98 ========== */

.jmb-theme--win98 .jmb-dialog {
    max-width: 400px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: 1px 1px 0 #000;
}

.jmb-theme--win98 .jmb-titlebar {
    padding: 2px 3px 2px 4px;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    font-size: 11px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
}

.jmb-theme--win98 .jmb-titlebar-close {
    width: 16px;
    height: 14px;
    border: 1px solid #fff;
    background: #c0c0c0;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    border-color: #fff #000 #000 #fff;
}

.jmb-theme--win98 .jmb-body {
    padding: 16px 12px 8px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 11px;
}

.jmb-theme--win98 .jmb-footer {
    padding: 8px 12px 12px;
}

.jmb-theme--win98 .jmb-btn {
    border: 2px solid;
    border-color: #fff #000 #000 #fff;
    background: #c0c0c0;
    color: #000;
    min-width: 75px;
    padding: 3px 12px;
}

.jmb-theme--win98 .jmb-btn:active {
    border-color: #000 #fff #fff #000;
}

.jmb-theme--win98.jmb-toast,
.jmb-toast.jmb-theme--win98 {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    border-radius: 0;
    box-shadow: none;
}

/* ========== WinXP (default) ========== */

.jmb-theme--winxp .jmb-dialog {
    border: 2px solid;
    border-color: #0054e3 #003c9e #003c9e #0054e3;
    border-radius: 8px 8px 0 0;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.45);
    background: #ece9d8;
}

.jmb-theme--winxp .jmb-titlebar {
    padding: 4px 6px 4px 8px;
    background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003eff 96%, #002dad 98%, #001088 100%);
    color: #fff;
    font-size: 13px;
    font-family: Tahoma, "Segoe UI", sans-serif;
    border-radius: 6px 6px 0 0;
}

.jmb-theme--winxp .jmb-titlebar-close {
    width: 18px;
    height: 18px;
    border: 1px solid #fff;
    background: linear-gradient(180deg, #e88a8a 0%, #c42d2d 45%, #9a1f1f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 2px;
}

.jmb-theme--winxp .jmb-titlebar-close:hover {
    background: linear-gradient(180deg, #f0a0a0 0%, #d63a3a 45%, #b02525 100%);
}

.jmb-theme--winxp .jmb-body {
    padding: 18px 16px 12px;
    background: #ece9d8;
    font-family: Tahoma, "Segoe UI", sans-serif;
}

.jmb-theme--winxp .jmb-footer {
    padding: 8px 16px 16px;
    background: #ece9d8;
}

.jmb-theme--winxp .jmb-btn {
    min-width: 75px;
    padding: 3px 16px;
    font-family: Tahoma, "Segoe UI", sans-serif;
    font-size: 11px;
    color: #000;
    border: 1px solid;
    border-color: #fff #808080 #808080 #fff;
    border-radius: 3px;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 55%, #d6d3c4 100%);
    box-shadow: 1px 1px 0 rgba(255,255,255,.6) inset;
}

.jmb-theme--winxp .jmb-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #f0ede5 55%, #e0ddd4 100%);
}

.jmb-theme--winxp .jmb-btn:active {
    border-color: #808080 #fff #fff #808080;
    background: linear-gradient(180deg, #d6d3c4 0%, #ece9d8 100%);
    box-shadow: none;
}

.jmb-theme--winxp .jmb-btn--primario {
    color: #000;
    border-color: #003c9e;
    outline: 1px dotted #000;
    outline-offset: -4px;
}

.jmb-theme--winxp .jmb-btn--secundario {
    color: #000;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 55%, #d6d3c4 100%);
    border-color: #fff #808080 #808080 #fff;
    outline: none;
}

.jmb-theme--winxp.jmb-toast,
.jmb-toast.jmb-theme--winxp {
    border-radius: .5rem;
    border: 1px solid rgba(43, 52, 103, 0.12);
    background: #fff;
    box-shadow: 0 8px 24px rgba(43, 52, 103, 0.18);
}

.jmb-toast.jmb-theme--winxp.jmb-toast--exito { border-left: 4px solid var(--jmb-exito); }
.jmb-toast.jmb-theme--winxp.jmb-toast--error { border-left: 4px solid #ef4444; }
.jmb-toast.jmb-theme--winxp.jmb-toast--advertencia { border-left: 4px solid var(--jmb-advertencia); }
.jmb-toast.jmb-theme--winxp.jmb-toast--info { border-left: 4px solid var(--jmb-info); }

/* ========== Win7 — Aero, esquinas redondeadas, header con gradiente ========== */

.jmb-theme--win7 .jmb-backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.jmb-theme--win7 .jmb-dialog {
    position: relative;
    max-width: 460px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45) inset,
        0 0 18px rgba(0, 140, 200, 0.35),
        0 14px 42px rgba(0, 0, 0, 0.45);
    background: #fff;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.jmb-theme--win7 .jmb-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 14px;
    min-height: 36px;
    background: linear-gradient(180deg, #4eb4d4 0%, #2a8aad 35%, #1a6f8f 70%, #145f7a 100%);
    border-bottom: 1px solid #0e4f66;
    color: #fff;
}

.jmb-theme--win7 .jmb-titlebar-text {
    padding: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.jmb-theme--win7 .jmb-titlebar-close {
    position: static;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    opacity: 0.9;
}

.jmb-theme--win7 .jmb-titlebar-close:hover {
    opacity: 1;
}

.jmb-theme--win7 .jmb-body {
    padding: 18px 20px 14px;
    background: #fff;
}

.jmb-theme--win7 .jmb-footer {
    padding: 14px 20px 18px;
    background: linear-gradient(180deg, #f8f8f8 0%, #ececec 100%);
    border-top: 1px solid #c8c8c8;
    justify-content: flex-end;
    gap: 10px;
}

.jmb-theme--win7 .jmb-btn {
    border: 1px solid #8a8a8a;
    border-radius: 3px;
    background: linear-gradient(180deg, #fefefe 0%, #e8e8e8 55%, #d8d8d8 100%);
    color: #000;
    padding: 5px 26px;
    font-size: 12px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.jmb-theme--win7 .jmb-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #efefef 55%, #e0e0e0 100%);
}

.jmb-theme--win7 .jmb-btn--secundario {
    background: linear-gradient(180deg, #fefefe 0%, #e8e8e8 55%, #d8d8d8 100%);
    border-color: #8a8a8a;
    color: #000;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.jmb-theme--win7 .jmb-btn--primario {
    border-color: #3c7fb1;
    box-shadow: 0 0 0 1px rgba(60, 127, 177, 0.55), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
    background: linear-gradient(180deg, #fefefe 0%, #e8e8e8 55%, #d8d8d8 100%);
    color: #000;
}

.jmb-toast.jmb-theme--win7 {
    background: #fff;
    border: 1px solid #a0a0a0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* ========== Win10 — plano, esquinas rectas, barra sólida ========== */

.jmb-theme--win10 .jmb-dialog {
    max-width: 400px;
    background: #fff;
    border: 1px solid #737373;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.jmb-theme--win10 .jmb-titlebar {
    padding: 0 10px 0 12px;
    min-height: 32px;
    background: #0078d4;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    border-radius: 0;
}

.jmb-theme--win10 .jmb-titlebar-text {
    font-size: 12px;
    font-weight: 400;
}

.jmb-theme--win10 .jmb-titlebar-close {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
}

.jmb-theme--win10 .jmb-body {
    padding: 22px 16px 14px;
    background: #fff;
}

.jmb-theme--win10 .jmb-footer {
    padding: 12px 16px 14px;
    background: #f0f0f0;
    border-top: 1px solid #d9d9d9;
    justify-content: flex-end;
}

.jmb-theme--win10 .jmb-btn {
    border: 1px solid #adadad;
    border-radius: 0;
    background: #e1e1e1;
    color: #000;
    padding: 4px 22px;
    font-size: 11px;
    min-width: 80px;
}

.jmb-theme--win10 .jmb-btn:hover {
    background: #e5f1fb;
    border-color: #0078d7;
}

.jmb-theme--win10 .jmb-btn--secundario {
    background: #e1e1e1;
    border-color: #adadad;
    color: #000;
    outline: none;
}

.jmb-theme--win10 .jmb-btn--primario {
    border-color: #0078d7;
    background: #e1e1e1;
    color: #000;
    outline: 1px dotted #000;
    outline-offset: -4px;
}

.jmb-toast.jmb-theme--win10 {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* ========== Win11 ========== */

.jmb-theme--win11 .jmb-backdrop {
    background: rgba(0, 0, 0, 0.25);
}

.jmb-theme--win11 .jmb-dialog {
    max-width: 400px;
    background: #f9f9f9;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.jmb-theme--win11 .jmb-titlebar {
    padding: 12px 16px 0;
    background: transparent;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
}

.jmb-theme--win11 .jmb-titlebar-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 18px;
    border-radius: 4px;
}

.jmb-theme--win11 .jmb-titlebar-close:hover {
    background: rgba(0,0,0,.06);
}

.jmb-theme--win11 .jmb-body {
    padding: 8px 16px 4px;
    flex-direction: column;
}

.jmb-theme--win11 .jmb-icon { display: none; }

.jmb-theme--win11 .jmb-content { padding-top: 0; }

.jmb-theme--win11 .jmb-footer {
    padding: 12px 16px 16px;
    justify-content: flex-end;
    gap: 8px;
}

.jmb-theme--win11 .jmb-btn {
    border: 1px solid #8a8a8a;
    border-radius: 4px;
    background: #f3f3f3;
    color: #1a1a1a;
    padding: 6px 20px;
    min-width: auto;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.jmb-theme--win11 .jmb-btn:hover {
    background: #ebebeb;
}

.jmb-theme--win11 .jmb-btn--secundario {
    background: #f3f3f3;
    border-color: #8a8a8a;
    color: #1a1a1a;
}

.jmb-theme--win11 .jmb-btn--secundario:hover {
    background: #ebebeb;
    border-color: #707070;
}

/* Borde según tipo de diálogo; fondo siempre gris */
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--exito { border-color: #16a34a; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--error { border-color: #ef4444; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--advertencia { border-color: #d97706; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--info { border-color: #2563eb; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--confirmar { border-color: #2563eb; }

.jmb-theme--win11 .jmb-btn--primario.jmb-btn--exito:hover { border-color: #15803d; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--error:hover { border-color: #dc2626; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--advertencia:hover { border-color: #b45309; }
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--info:hover,
.jmb-theme--win11 .jmb-btn--primario.jmb-btn--confirmar:hover { border-color: #1d4ed8; }

.jmb-toast.jmb-theme--win11 {
    background: #f9f9f9;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* ========== MacBig ========== */

.jmb-theme--macbig .jmb-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.jmb-theme--macbig .jmb-dialog {
    max-width: 360px;
    background: rgba(236, 236, 236, 0.95);
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.jmb-theme--macbig .jmb-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 12px;
    gap: 10px;
}

.jmb-theme--macbig .jmb-dialog-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
}

.jmb-theme--macbig .jmb-icon {
    width: 56px;
    height: 56px;
}

.jmb-theme--macbig .jmb-icon svg {
    width: 56px;
    height: 56px;
}

.jmb-theme--macbig .jmb-content { padding-top: 0; }

.jmb-theme--macbig .jmb-message {
    font-size: 12px;
    color: #333;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
}

.jmb-theme--macbig .jmb-footer {
    padding: 12px 16px 16px;
    gap: 8px;
}

.jmb-theme--macbig .jmb-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 20px;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
    font-size: 13px;
    min-width: auto;
}

.jmb-theme--macbig .jmb-btn--secundario {
    background: rgba(0,0,0,.06);
    color: #1a1a1a;
}

.jmb-theme--macbig .jmb-btn--primario {
    background: #007aff;
    color: #fff;
}

.jmb-toast.jmb-theme--macbig {
    background: rgba(236,236,236,.95);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    font-family: -apple-system, system-ui, sans-serif;
}

/* ========== MacTahoe ========== */

.jmb-theme--mactahoe .jmb-backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.jmb-theme--mactahoe .jmb-dialog {
    max-width: 320px;
    background: rgba(58, 58, 60, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    color: #f5f5f7;
}

.jmb-theme--mactahoe .jmb-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 8px;
    gap: 12px;
}

.jmb-theme--mactahoe .jmb-dialog-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #f5f5f7;
    font-family: -apple-system, "SF Pro Display", system-ui, sans-serif;
}

.jmb-theme--mactahoe .jmb-icon {
    width: 64px;
    height: 64px;
}

.jmb-theme--mactahoe .jmb-icon svg {
    width: 64px;
    height: 64px;
}

.jmb-theme--mactahoe .jmb-icon--advertencia { color: #ffd60a; }

.jmb-theme--mactahoe .jmb-icon--error { color: #ef4444; }

.jmb-toast.jmb-theme--mactahoe.jmb-toast--error .jmb-toast-icon { color: #ef4444; }

.jmb-theme--mactahoe .jmb-content { padding-top: 0; }

.jmb-theme--mactahoe .jmb-message {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    font-family: -apple-system, system-ui, sans-serif;
}

.jmb-theme--mactahoe .jmb-footer {
    flex-direction: column;
    padding: 8px 12px 12px;
    gap: 4px;
}

.jmb-theme--mactahoe .jmb-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: -apple-system, system-ui, sans-serif;
    font-size: 14px;
    min-width: auto;
}

.jmb-theme--mactahoe .jmb-btn--secundario {
    background: rgba(255,255,255,.12);
    color: #f5f5f7;
}

.jmb-theme--mactahoe .jmb-btn--primario {
    background: rgba(255,255,255,.18);
    color: #f5f5f7;
    font-weight: 600;
}

.jmb-toast.jmb-theme--mactahoe {
    background: rgba(58,58,60,.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    color: #f5f5f7;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.jmb-toast.jmb-theme--mactahoe .jmb-toast-message { color: rgba(255,255,255,.8); }
.jmb-toast.jmb-theme--mactahoe .jmb-toast-close { color: rgba(255,255,255,.5); }

/* ========== Quick (custom_quick_alert style) ========== */

.jmb-theme--quick .jmb-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.jmb-theme--quick .jmb-dialog {
    max-width: 340px;
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    text-align: center;
}

.jmb-theme--quick .jmb-body {
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 8px;
    gap: 12px;
}

.jmb-theme--quick .jmb-dialog-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.jmb-theme--quick .jmb-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jmb-theme--quick .jmb-icon svg {
    width: 40px;
    height: 40px;
}

.jmb-theme--quick .jmb-icon--exito {
    background: rgba(34, 197, 94, .12);
    color: var(--jmb-exito);
}

.jmb-theme--quick .jmb-icon--error {
    background: rgba(239, 68, 68, .14);
    color: #ef4444;
}

.jmb-theme--quick .jmb-icon--advertencia {
    background: rgba(245, 158, 11, .12);
    color: var(--jmb-advertencia);
}

.jmb-theme--quick .jmb-icon--info,
.jmb-theme--quick .jmb-icon--confirmar {
    background: rgba(59, 130, 246, .12);
    color: var(--jmb-info);
}

.jmb-theme--quick .jmb-content { padding-top: 0; }

.jmb-theme--quick .jmb-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.jmb-theme--quick .jmb-footer {
    flex-direction: column;
    padding: 8px 24px 24px;
    gap: 8px;
}

.jmb-theme--quick .jmb-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    min-width: auto;
    color: #fff;
}

.jmb-theme--quick .jmb-btn--secundario {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.jmb-theme--quick .jmb-btn--primario.jmb-btn--exito { background: var(--jmb-exito); }
.jmb-theme--quick .jmb-btn--primario.jmb-btn--error { background: #ef4444; }
.jmb-theme--quick .jmb-btn--primario.jmb-btn--error:hover { background: #dc2626; }
.jmb-theme--quick .jmb-btn--primario.jmb-btn--advertencia { background: var(--jmb-advertencia); }
.jmb-theme--quick .jmb-btn--primario.jmb-btn--info,
.jmb-theme--quick .jmb-btn--primario.jmb-btn--confirmar { background: var(--jmb-info); }
.jmb-theme--quick .jmb-btn--primario { background: var(--jmb-primary); }

.jmb-toast.jmb-theme--quick {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
    padding: 1rem 1.1rem;
}

.jmb-toast.jmb-theme--quick .jmb-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jmb-toast.jmb-theme--quick.jmb-toast--exito .jmb-toast-icon { background: rgba(34,197,94,.12); }
.jmb-toast.jmb-theme--quick.jmb-toast--error .jmb-toast-icon { background: rgba(239, 68, 68, .14); color: #ef4444; }
.jmb-toast.jmb-theme--quick.jmb-toast--advertencia .jmb-toast-icon { background: rgba(245,158,11,.12); }
.jmb-toast.jmb-theme--quick.jmb-toast--info .jmb-toast-icon { background: rgba(59,130,246,.12); }

.jmb-toast.jmb-theme--quick .jmb-toast-title { color: #1a1a1a; }

/* ========== Ubuntu — Ambiance (cierre naranja a la izquierda) ========== */

.jmb-theme--ubuntu .jmb-dialog {
    border: 1px solid #2e2e2c;
    border-radius: 6px 6px 4px 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    background: #f2f1f0;
    font-family: Ubuntu, Cantarell, "Segoe UI", sans-serif;
}

.jmb-theme--ubuntu .jmb-titlebar {
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #4a4945 0%, #3c3b37 40%, #3c3b37 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: Ubuntu, Cantarell, "Segoe UI", sans-serif;
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid #2a2926;
}

.jmb-theme--ubuntu .jmb-titlebar-close {
    order: -1;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f07746 0%, #e95420 45%, #df421e 100%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.jmb-theme--ubuntu .jmb-titlebar-close:hover {
    background: radial-gradient(circle at 35% 30%, #f58a5e 0%, #f05a28 45%, #e95420 100%);
}

.jmb-theme--ubuntu .jmb-body {
    padding: 16px 16px 10px;
    background: #f2f1f0;
    font-family: Ubuntu, Cantarell, "Segoe UI", sans-serif;
    color: #333;
}

.jmb-theme--ubuntu .jmb-message {
    color: #333;
    font-size: 13px;
}

.jmb-theme--ubuntu .jmb-footer {
    padding: 8px 16px 14px;
    background: #f2f1f0;
    gap: 8px;
}

.jmb-theme--ubuntu .jmb-btn {
    min-width: 90px;
    padding: 5px 14px;
    font-family: Ubuntu, Cantarell, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #333;
    border: 1px solid #a8a6a1;
    border-radius: 4px;
    background: linear-gradient(180deg, #f5f4f2 0%, #d6d5d1 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.jmb-theme--ubuntu .jmb-btn:hover {
    background: linear-gradient(180deg, #faf9f7 0%, #e0dfdb 100%);
}

.jmb-theme--ubuntu .jmb-btn:active {
    background: linear-gradient(180deg, #cfcfcb 0%, #d6d5d1 100%);
    box-shadow: none;
}

.jmb-theme--ubuntu .jmb-btn--primario {
    color: #1a1a1a;
    border-color: #c45a2e;
    background: linear-gradient(180deg, #f07746 0%, #e35d33 55%, #df421e 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.jmb-theme--ubuntu .jmb-btn--primario:hover {
    background: linear-gradient(180deg, #f58a5e 0%, #e95420 55%, #e35d33 100%);
}

.jmb-theme--ubuntu .jmb-btn--secundario {
    color: #333;
    border-color: #a8a6a1;
    background: linear-gradient(180deg, #f5f4f2 0%, #d6d5d1 100%);
}

.jmb-theme--ubuntu.jmb-toast,
.jmb-toast.jmb-theme--ubuntu {
    border-radius: 4px;
    border: 1px solid #c8c6c2;
    background: #f2f1f0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    font-family: Ubuntu, Cantarell, "Segoe UI", sans-serif;
}

.jmb-toast.jmb-theme--ubuntu.jmb-toast--exito { border-left: 4px solid var(--jmb-exito); }
.jmb-toast.jmb-theme--ubuntu.jmb-toast--error { border-left: 4px solid #ef4444; }
.jmb-toast.jmb-theme--ubuntu.jmb-toast--advertencia { border-left: 4px solid var(--jmb-advertencia); }
.jmb-toast.jmb-theme--ubuntu.jmb-toast--info { border-left: 4px solid var(--jmb-info); }

/* ---- Responsive ---- */

@media (max-width: 575.98px) {
    .jmb-dialog { max-width: 100%; }

    .jmb-toast-container {
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        max-width: 100%;
    }
}
