/**
 * Zoho Backstage Events - Estilos
 * 
 * Plugin: Zoho Backstage Events
 * Version: 1.0.0
 */

/* Container principal */
.zbe-events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Grid de eventos */
.zbe-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Tarjeta de evento */
.zbe-event-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

/* Imagen del evento */
.zbe-event-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.zbe-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zbe-event-card:hover .zbe-event-image img {
    transform: scale(1.05);
}

/* Badge de estado */
.zbe-event-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estados específicos */
.zbe-status-live .zbe-event-status {
    background: #22c55e;
}

.zbe-status-published .zbe-event-status {
    background: #3b82f6;
}

.zbe-status-completed .zbe-event-status {
    background: #6b7280;
}

.zbe-status-canceled .zbe-event-status {
    background: #ef4444;
}

.zbe-status-draft .zbe-event-status,
.zbe-status-unpublished .zbe-event-status {
    background: #f59e0b;
}

/* Contenido de la tarjeta */
.zbe-event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Título del evento */
.zbe-event-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
}

.zbe-event-card a {
    text-decoration: none;
}

/* Metadatos del evento */
.zbe-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.zbe-event-date,
.zbe-event-venue {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6b7280;
}

.zbe-event-date svg,
.zbe-event-venue svg {
    flex-shrink: 0;
    color: #9ca3af;
}

/* Venue */
.zbe-event-venue {
    margin-bottom: 10px;
}

/* Badges de tipo y categoría */
.zbe-event-type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.zbe-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
}

.zbe-badge-type {
    background: #ede9fe;
    color: #7c3aed;
}

.zbe-badge-category {
    background: #fef3c7;
    color: #d97706;
}

/* Resumen del evento */
.zbe-event-summary {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    flex-grow: 1;
}

/* Acciones */
.zbe-event-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* Botones */
.zbe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.zbe-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.zbe-btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #ffffff;
    transform: translateX(2px);
}

.zbe-btn svg {
    transition: transform 0.2s ease;
}

.zbe-btn:hover svg {
    transform: translateX(4px);
}

/* Mensajes de error y vacío */
.zbe-error,
.zbe-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
    font-size: 16px;
}

.zbe-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .zbe-events-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .zbe-event-image {
        height: 160px;
    }
    
    .zbe-event-content {
        padding: 16px;
    }
    
    .zbe-event-title {
        font-size: 16px;
    }
}

/* Modo oscuro (si el tema lo soporta) */
@media (prefers-color-scheme: dark) {
    .zbe-event-card {
        background: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .zbe-event-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    
    .zbe-event-title {
        color: #f9fafb;
    }
    
    .zbe-event-date,
    .zbe-event-venue,
    .zbe-event-summary {
        color: #9ca3af;
    }
    
    .zbe-event-actions {
        border-top-color: #374151;
    }
    
    .zbe-error,
    .zbe-no-events {
        background: #374151;
        color: #9ca3af;
    }
    
    .zbe-error {
        background: #450a0a;
        border-color: #991b1b;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zbe-event-card {
    animation: fadeIn 0.3s ease forwards;
}

.zbe-events-grid .zbe-event-card:nth-child(1) { animation-delay: 0.05s; }
.zbe-events-grid .zbe-event-card:nth-child(2) { animation-delay: 0.1s; }
.zbe-events-grid .zbe-event-card:nth-child(3) { animation-delay: 0.15s; }
.zbe-events-grid .zbe-event-card:nth-child(4) { animation-delay: 0.2s; }
.zbe-events-grid .zbe-event-card:nth-child(5) { animation-delay: 0.25s; }
.zbe-events-grid .zbe-event-card:nth-child(6) { animation-delay: 0.3s; }
