:root {
    --trisha-modal-text: #0f172a;
    --trisha-modal-text-muted: rgba(15, 23, 42, 0.82);
}

body.dark {
    --trisha-modal-text: #e2e8f0;
    --trisha-modal-text-muted: rgba(226, 232, 240, 0.82);
}

/* ================= SWEETALERT (ULTRA PREMIUM) ================= */
.swal-overlay {
    background-color: rgba(15, 23, 42, 0.38) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark .swal-overlay {
    background-color: rgba(2, 6, 23, 0.72) !important;
}

.swal-modal {
    position: relative;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 34px 110px rgba(2, 6, 23, 0.28) !important;
    overflow: visible;
    padding: 20px 18px 18px !important;
}

body.dark .swal-modal {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.9)) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 34px 130px rgba(0, 0, 0, 0.75) !important;
}

.swal-modal::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    border-radius: 22px 22px 0 0;
    pointer-events: none;
    background: linear-gradient(90deg, #6366f1, #ec4899, #06b6d4);
}

.swal-modal.trisha-swal--success::before {
    background: linear-gradient(90deg, #22c55e, #06b6d4, #6366f1);
}

.swal-modal.trisha-swal--error::before {
    background: linear-gradient(90deg, #ef4444, #f97316, #ec4899);
}

.swal-title {
    font-family: inherit !important;
    color: var(--trisha-modal-text) !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
}

.swal-text {
    font-family: inherit !important;
    color: var(--trisha-modal-text-muted) !important;
    line-height: 1.55 !important;
    margin-top: 10px !important;
}

.swal-icon {
    margin: 14px auto 8px !important;
}

/* Fix SweetAlert success icon "white circle" artifacts */
.swal-icon--success:before,
.swal-icon--success:after,
.swal-icon--success__hide-corners {
    background: transparent !important;
}

.swal-footer {
    text-align: center !important;
    margin-top: 14px !important;
}

.trisha-swal-field {
    margin-top: 12px;
    text-align: left;
}

.trisha-swal-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--trisha-modal-text-muted);
    margin: 0 0 8px;
}

.trisha-swal-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.75);
    color: var(--trisha-modal-text);
    outline: none;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.10);
}

body.dark .trisha-swal-field input {
    background: rgba(2, 6, 23, 0.35);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.trisha-swal-field input:focus {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22), 0 12px 30px rgba(99, 102, 241, 0.14);
}

.trisha-swal-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--trisha-modal-text-muted);
}

.swal-button {
    border-radius: 12px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.22) !important;
    background: linear-gradient(135deg, #6366f1, #ec4899) !important;
}

.swal-button:focus { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important; }

.swal-button.trisha-swal-btn--success {
    background: linear-gradient(135deg, #22c55e, #06b6d4) !important;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.2) !important;
}

.swal-button.trisha-swal-btn--error {
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.2) !important;
}

.swal-button:hover { filter: brightness(1.02); transform: translateY(-1px); }
.swal-button:active { transform: translateY(0); }

/* ================= FALLBACK MODAL (NO SWEETALERT) ================= */
.trisha-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.35);
}

.trisha-modal.is-hidden {
    display: none;
}

body.dark .trisha-modal {
    background: rgba(2, 6, 23, 0.7);
}

.trisha-modal__panel {
    width: 420px;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.22);
    padding: 0 16px 16px;
}

body.dark .trisha-modal__panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.75);
}

.trisha-modal__bar {
    height: 5px;
    margin: 0 -16px 14px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #06b6d4);
}

.trisha-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 6px auto 10px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.25), transparent 60%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    display: grid;
    place-items: center;
    color: var(--trisha-modal-text);
    font-size: 20px;
}

.trisha-modal__title {
    margin: 0;
    text-align: center;
    font-size: 18px;
    color: var(--trisha-modal-text);
}

.trisha-modal__text {
    margin: 10px 0 0;
    padding: 0 6px;
    color: var(--trisha-modal-text-muted);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    text-align: left;
    font-family: inherit;
}

.trisha-modal__btn {
    margin: 14px auto 0;
    display: block;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
}

.trisha-modal__btn:hover {
    background: linear-gradient(135deg, #4f46e5, #db2777);
    transform: translateY(-1px);
}

.trisha-modal__btn:active {
    transform: translateY(0);
}

.trisha-modal--success .trisha-modal__bar {
    background: linear-gradient(90deg, #22c55e, #06b6d4, #6366f1);
}

.trisha-modal--success .trisha-modal__btn {
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.2);
}

.trisha-modal--success .trisha-modal__btn:hover {
    background: linear-gradient(135deg, #16a34a, #0891b2);
}

.trisha-modal--error .trisha-modal__bar {
    background: linear-gradient(90deg, #ef4444, #f97316, #ec4899);
}

.trisha-modal--error .trisha-modal__btn {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.18);
}

.trisha-modal--error .trisha-modal__btn:hover {
    background: linear-gradient(135deg, #dc2626, #ea580c);
}
