/* =========================================================
   Essential Lanka - Pill Alert & Confirmation System
   Ultra-modern floating glassmorphism pill dialogs & toasts
   ========================================================= */

:root {
    --elp-pill-bg: rgba(15, 23, 42, 0.94);
    --elp-pill-border: rgba(255, 255, 255, 0.12);
    --elp-pill-text: #f8fafc;
    --elp-pill-subtext: #94a3b8;
    --elp-success: #10b981;
    --elp-danger: #ef4444;
    --elp-warning: #f59e0b;
    --elp-info: #3b82f6;
}

/* Toast Container */
#elp-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

/* Pill Toast */
.elp-toast-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px 10px 14px;
    background: var(--elp-pill-bg);
    border: 1px solid var(--elp-pill-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 9999px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: var(--elp-pill-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    transform: translateY(-20px) scale(0.92);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    user-select: none;
    max-width: 90vw;
}

.elp-toast-pill.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.elp-toast-pill.hide {
    transform: translateY(-15px) scale(0.92);
    opacity: 0;
}

.elp-toast-pill:hover {
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px) scale(1.01);
}

.elp-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.elp-toast-pill.success .elp-toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.elp-toast-pill.error .elp-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.elp-toast-pill.warning .elp-toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.elp-toast-pill.info .elp-toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

.elp-toast-msg {
    margin-right: 4px;
    letter-spacing: -0.01em;
}

.elp-toast-close {
    background: none;
    border: none;
    color: var(--elp-pill-subtext);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 2px 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    margin-left: 4px;
}

.elp-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================================
   Pill Confirmation Modal
   ========================================================= */
.elp-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 12, 22, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.elp-confirm-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.elp-confirm-pill {
    background: var(--elp-pill-bg);
    border: 1px solid var(--elp-pill-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 24px 30px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: var(--elp-pill-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: translateY(20px) scale(0.94);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.elp-confirm-backdrop.active .elp-confirm-pill {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.elp-confirm-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.elp-confirm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.elp-confirm-avatar.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.elp-confirm-avatar.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.elp-confirm-avatar.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.elp-confirm-avatar.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.elp-confirm-title-area {
    flex: 1;
}

.elp-confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 3px 0;
    letter-spacing: -0.01em;
}

.elp-confirm-subtitle {
    font-size: 0.85rem;
    color: var(--elp-pill-subtext);
    margin: 0;
}

.elp-confirm-body {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin-bottom: 22px;
    padding-left: 2px;
}

.elp-confirm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.elp-btn-pill {
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.elp-btn-pill-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.elp-btn-pill-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.elp-btn-pill-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.elp-btn-pill-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.elp-btn-pill-confirm.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.elp-btn-pill-confirm.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

@media (max-width: 480px) {
    .elp-confirm-pill {
        padding: 20px;
        border-radius: 26px;
    }
    .elp-confirm-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .elp-btn-pill {
        width: 100%;
        justify-content: center;
    }
}
