/* Support Tickets Custom CSS */

/* Force toast notifications to stay in bottom-end */
.swal2-container .support-ticket-alert,
.swal2-container .support-ticket-notification {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: 350px !important;
    width: 350px !important;
    z-index: 999999 !important;
}

/* Ensure toast style */
.support-ticket-alert.swal2-popup,
.support-ticket-notification.swal2-popup {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Timer progress bar */
.support-ticket-alert .swal2-timer-progress-bar,
.support-ticket-notification .swal2-timer-progress-bar {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Close button styling */
.support-ticket-alert .swal2-close,
.support-ticket-notification .swal2-close {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    font-size: 16px !important;
    color: #999 !important;
    background: none !important;
    border: none !important;
}

.support-ticket-alert .swal2-close:hover,
.support-ticket-notification .swal2-close:hover {
    color: #666 !important;
}

/* Icon styling */
.support-ticket-alert .swal2-icon,
.support-ticket-notification .swal2-icon {
    margin: 8px auto 0 !important;
    width: 30px !important;
    height: 30px !important;
}

/* Text styling */
.support-ticket-alert .swal2-html-container,
.support-ticket-notification .swal2-html-container {
    font-size: 14px !important;
    margin: 8px 0 !important;
    padding: 0 !important;
}

/* Title styling */
.support-ticket-alert .swal2-title,
.support-ticket-notification .swal2-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 8px 0 4px !important;
    padding: 0 !important;
}

/* Remove backdrop for toast notifications */
.swal2-backdrop-show {
    background: transparent !important;
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Form submitting styles */
.form-submitting {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.form-submitting::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    border-radius: inherit;
}

.btn-loading {
    position: relative;
    overflow: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btn-loading-animation 1.5s infinite;
}

@keyframes btn-loading-animation {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Force toast position for any SweetAlert with our classes */
.swal2-toast.support-ticket-alert,
.swal2-toast.support-ticket-notification {
    position: fixed !important;
    top: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 350px !important;
    transform: none !important;
}

/* Animation for toast notifications */
.support-ticket-alert.swal2-show,
.support-ticket-notification.swal2-show {
    animation: toastSlideInRight 0.3s ease-out !important;
}

.support-ticket-alert.swal2-hide,
.support-ticket-notification.swal2-hide {
    animation: toastSlideOutRight 0.3s ease-in !important;
}

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

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