/* ===== OPCIÓN 1: CSS en archivo separado (RECOMENDADO) ===== */
/* Crear archivo: wwwroot/css/elegant-toast.css */

/* Toast Container */
.toast-container-elegant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1080;
    max-width: 400px;
    pointer-events: none;
}

/* Enhanced Toast Styling */
.toast-elegant {
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    min-width: 320px;
    margin-bottom: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast-elegant.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-elegant.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.toast-warning {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: #2d3436;
}

.toast-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

/* Toast Header */
.toast-header-custom {
    padding: 16px 20px 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 12px;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    flex-grow: 1;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.toast-warning .toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Toast Body */
.toast-body-custom {
    padding: 8px 20px 16px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

/* Authentic ECG Progress */
.toast-ecg-progress {
    height: 45px;
    background: rgba(0, 20, 0, 0.3);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-warning .toast-ecg-progress {
    background: rgba(20, 20, 0, 0.3);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* ECG Grid Background */
.ecg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 8px 4px;
    opacity: 0.3;
}

.toast-warning .ecg-grid {
    background-image: 
        linear-gradient(90deg, rgba(255, 140, 0, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(255, 140, 0, 0.15) 1px, transparent 1px);
}

.ecg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ecg-baseline {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 255, 0, 0.4);
    transform: translateY(-50%);
}

.toast-warning .ecg-baseline {
    background: rgba(255, 140, 0, 0.5);
}

.ecg-wave-pattern {
    position: absolute;
    top: 0;
    left: 100%;
    width: 150px;
    height: 100%;
    animation: ecg-flow linear infinite;
    animation-duration: 2s;
}

.ecg-wave-pattern svg {
    width: 100%;
    height: 100%;
}

.ecg-progress-mask {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: inherit;
    backdrop-filter: blur(2px);
    animation: ecg-progress-reveal linear forwards;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.toast-warning .ecg-progress-mask {
    border-left-color: rgba(0, 0, 0, 0.2);
}

@keyframes ecg-flow {
    from { left: 100%; }
    to { left: -150px; }
}

@keyframes ecg-progress-reveal {
    from { width: 0%; }
    to { width: 100%; }
}

/* Action Button */
.toast-action {
    margin-top: 12px;
}

.toast-action .btn {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    text-decoration: none;
}

.toast-action .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: inherit;
}

.toast-warning .toast-action .btn {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.toast-warning .toast-action .btn:hover {
    background: rgba(0, 0, 0, 0.15);
}