/* EventON Elementor Manager - Frontend Styles */

/* Loading Spinner */
.evem-loading {
    text-align: center;
    padding: 40px 20px;
}

.evem-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: evem-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes evem-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .evem-event-manager-widget,
    .evem-event-list-widget,
    .evem-rsvp-manager-widget {
        padding: 15px;
    }
    
    .evem-widget-title {
        font-size: 24px !important;
    }
    
    .evem-section-title {
        font-size: 18px !important;
    }
}

/* Print styles for RSVP lists */
@media print {
    .evem-download-btn,
    .evem-event-actions,
    .evem-list-controls,
    .evem-event-selector {
        display: none !important;
    }
    
    .evem-event-card,
    .evem-rsvp-summary {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .evem-guest-table {
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
.evem-input:focus,
.evem-textarea:focus,
.evem-toggle-input:focus,
.evem-event-select:focus,
.evem-search-input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.evem-btn:focus,
.evem-action-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Screen reader only text */
.evem-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for tables */
.evem-guest-table::-webkit-scrollbar {
    height: 8px;
}

.evem-guest-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.evem-guest-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.evem-guest-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltip styles */
.evem-tooltip {
    position: relative;
    display: inline-block;
}

.evem-tooltip .evem-tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
}

.evem-tooltip:hover .evem-tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Badge styles */
.evem-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evem-badge-success {
    background: #d4edda;
    color: #155724;
}

.evem-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.evem-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.evem-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Empty state styles */
.evem-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.evem-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.evem-empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.evem-empty-state-text {
    color: #7f8c8d;
    font-size: 15px;
}

/* Animation classes */
.evem-fade-in {
    animation: evem-fadeIn 0.3s ease-in;
}

@keyframes evem-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.evem-slide-in {
    animation: evem-slideIn 0.3s ease-out;
}

@keyframes evem-slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status indicators */
.evem-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.evem-status-dot.active {
    background: #27ae60;
}

.evem-status-dot.inactive {
    background: #e74c3c;
}

.evem-status-dot.pending {
    background: #f39c12;
}

/* Card hover effects */
.evem-card-hover {
    transition: all 0.3s ease;
}

.evem-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Button loading state */
.evem-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.evem-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: evem-spin 0.6s linear infinite;
}

/* Form validation states */
.evem-input.error,
.evem-textarea.error {
    border-color: #e74c3c !important;
    background-color: #fff5f5;
}

.evem-input.success,
.evem-textarea.success {
    border-color: #27ae60 !important;
    background-color: #f0fff4;
}

.evem-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.evem-input.error + .evem-error-message {
    display: block;
}

/* Progress bar */
.evem-progress {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.evem-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
}

/* Modal overlay (if needed) */
.evem-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.evem-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.evem-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.evem-modal-overlay.active .evem-modal {
    transform: scale(1);
}

/* Notification toast */
.evem-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.evem-toast.show {
    transform: translateX(0);
}

.evem-toast.success {
    border-left: 4px solid #27ae60;
}

.evem-toast.error {
    border-left: 4px solid #e74c3c;
}

.evem-toast.info {
    border-left: 4px solid #3498db;
}

/* Skeleton loading */
.evem-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: evem-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes evem-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.evem-skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.evem-skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.evem-skeleton-card {
    height: 200px;
    margin-bottom: 20px;
}
