/* ============================================
   FGB Studio Utility Components CSS
   Toast notifications, confirm modal, loading overlay
   ============================================ */

/* ============================================
   Toast Notifications
   ============================================ */
.fgb-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--fgb-bg-primary);
    border: 1px solid var(--fgb-border-color);
    border-radius: 8px;
    box-shadow: var(--fgb-shadow-lg);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .fgb-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .fgb-toast i {
        font-size: 1.25rem;
    }

    .fgb-toast span {
        font-size: 0.9rem;
        color: var(--fgb-text-primary);
    }

.fgb-toast-success {
    border-left: 4px solid var(--fgb-accent-green);
}

    .fgb-toast-success i {
        color: var(--fgb-accent-green);
    }

.fgb-toast-error {
    border-left: 4px solid var(--fgb-accent-red);
}

    .fgb-toast-error i {
        color: var(--fgb-accent-red);
    }

.fgb-toast-warning {
    border-left: 4px solid var(--fgb-accent-yellow);
}

    .fgb-toast-warning i {
        color: var(--fgb-accent-yellow);
    }

.fgb-toast-info {
    border-left: 4px solid var(--fgb-accent-blue);
}

    .fgb-toast-info i {
        color: var(--fgb-accent-blue);
    }

/* ============================================
   Confirm Modal
   ============================================ */
.fgb-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fgb-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.2s ease;
}

    .fgb-confirm-modal.show {
        opacity: 1;
    }

.fgb-confirm-content {
    background: var(--fgb-bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--fgb-shadow-lg);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.fgb-confirm-modal.show .fgb-confirm-content {
    transform: scale(1);
}

.fgb-confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fgb-confirm-title {
    color: var(--fgb-text-primary);
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.fgb-confirm-message {
    color: var(--fgb-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.fgb-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

    .fgb-confirm-actions .btn {
        min-width: 100px;
    }

/* ============================================
   Loading Overlay
   ============================================ */
.fgb-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fgb-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

.fgb-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--fgb-bg-primary);
    border-radius: 12px;
    box-shadow: var(--fgb-shadow-lg);
}

.fgb-loading-text {
    color: var(--fgb-text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Event Tab Close Button Styling
   ============================================ */
.event-tab .event-tab-close {
    margin-left: 0.5rem;
    opacity: 0.6;
    font-size: 0.7rem;
    padding: 0.125rem;
    border-radius: 3px;
    transition: background 0.15s ease, opacity 0.15s ease;
}

    .event-tab .event-tab-close:hover {
        opacity: 1;
        background: var(--fgb-bg-tertiary);
    }

.event-tab:hover .event-tab-close {
    opacity: 0.8;
}

/* ============================================
   Spin Animation (for refresh buttons)
   ============================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-animation {
    animation: spin 1s linear infinite;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .fgb-toast {
        left: 20px;
        right: 20px;
        bottom: 10px;
    }

    .fgb-confirm-content {
        padding: 1.25rem;
    }

    .fgb-confirm-actions {
        flex-direction: column;
    }

        .fgb-confirm-actions .btn {
            width: 100%;
        }
}
