/* Toast Notification Styles - Validation Error style, top-right
   Using .app-toast to avoid Bootstrap .toast styles (which can force fixed height) */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    max-width: 380px;
    pointer-events: none;
    gap: 12px;
}

.toast-container > * {
    pointer-events: auto;
}

.app-toast {
    display: block !important;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: slideInRight 0.35s ease-out;
    min-width: 280px;
    max-width: 380px;
    box-sizing: border-box;
    /* Height follows content only */
    height: auto !important;
    min-height: 0 !important;
}

.app-toast .toast-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    flex-shrink: 0;
}

.toast-header .toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.app-toast .toast-header .toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-header .toast-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.app-toast .toast-header .toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
    flex-shrink: 0;
    line-height: 1;
    font-size: 18px;
}

.toast-header .toast-close:hover {
    opacity: 1;
}

.app-toast .toast-body {
    padding: 10px 14px 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #333;
    background: #fff;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 0;
}

/* Type variants - header colors */
.toast-success .toast-header {
    background: #2e7d32; /* Green - success */
}

.toast-error .toast-header {
    background: #c62828; /* Red - error */
}

.toast-info .toast-header {
    background: #1565c0; /* Blue - info */
}

.toast-warning .toast-header {
    background: #f9a825; /* Yellow/amber - warning */
}

/* Warning icon (exclamation in triangle) for errors/validation */
.toast-icon-warning {
    color: white;
}

.app-toast .toast-icon-warning svg {
    fill: currentColor;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Responsive */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .app-toast {
        min-width: auto;
        max-width: none;
    }
}
