/**
 * Toast Notification System
 * Graf & Asociados - Cap Rate Calculator
 */

/* Toast container - positioned at top right */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

/* Individual toast */
.toast {
    background: var(--graf-white, #ffffff);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    pointer-events: auto;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast slide-in animation */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Toast slide-out animation */
.toast.hide {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
}

/* Toast icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-icon .material-symbols-outlined {
    font-size: 20px;
}

/* Toast content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: var(--graf-body-color, #1a1a1a);
}

.toast-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--graf-text-secondary, #666666);
}

/* Toast close button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--graf-text-secondary, #666666);
    transition: color 0.2s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: var(--graf-body-color, #1a1a1a);
}

.toast-close .material-symbols-outlined {
    font-size: 18px;
}

/* Toast variants */

/* Success toast */
.toast.toast-success {
    border-left: 4px solid var(--graf-success, #28a745);
}

.toast.toast-success .toast-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--graf-success, #28a745);
}

/* Error toast */
.toast.toast-error {
    border-left: 4px solid var(--graf-danger, #dc3545);
}

.toast.toast-error .toast-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--graf-danger, #dc3545);
}

/* Warning toast */
.toast.toast-warning {
    border-left: 4px solid var(--graf-warning, #ffc107);
}

.toast.toast-warning .toast-icon {
    background: rgba(255, 193, 7, 0.1);
    color: var(--graf-warning, #ffc107);
}

/* Info toast */
.toast.toast-info {
    border-left: 4px solid var(--graf-info, #17a2b8);
}

.toast.toast-info .toast-icon {
    background: rgba(23, 162, 184, 0.1);
    color: var(--graf-info, #17a2b8);
}

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

    .toast {
        min-width: unset;
        width: 100%;
    }
}
