/* API Integration Styles */
/* Notification system */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

.notification-info {
    background-color: #3b82f6;
    color: white;
}

.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-warning {
    background-color: #f59e0b;
    color: white;
}

.notification-error {
    background-color: #ef4444;
    color: white;
}

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

/* Event cards for API integration */
#upcoming-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.event-type {
    background: var(--theme-primary, #6f42c1);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.event-registration {
    background: #fbbf24;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.event-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1f2937;
    line-height: 1.3;
}

.event-description {
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-details {
    margin-bottom: 20px;
}

.event-details > div {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-button {
    background: var(--theme-primary, #6f42c1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.event-button:hover {
    background: var(--theme-primary-dark, #5a3c9d);
}

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--theme-primary, #6f42c1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* API connection status */
.api-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 999;
}

.api-status.connected {
    background: #10b981;
    color: white;
}

.api-status.disconnected {
    background: #ef4444;
    color: white;
}

/* Form integration styles */
.form-api-loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-api-loading .btn {
    position: relative;
}

.form-api-loading .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    #upcoming-events {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .event-card {
        padding: 16px;
    }
    
    .api-status {
        bottom: 10px;
        left: 10px;
    }
}

/* Theme integration */
:root {
    --theme-primary: #6f42c1;
    --theme-primary-dark: #5a3c9d;
    --theme-secondary: #198754;
    --theme-accent: #ffd700;
    --theme-neon-pink: #ff1493;
    --theme-neon-cyan: #00ffff;
    --theme-neon-green: #39ff14;
}

/* Override theme colors when loaded from API */
.theme-loaded {
    --theme-primary: var(--theme-primary);
    --theme-secondary: var(--theme-secondary);
    --theme-accent: var(--theme-accent);
}