/**
 * Estilos Eventos Feeling Plugin - Tema Oscuro
 * Basado en el diseño de app.feelingmatch.com
 * Versión: 2.0.0
 */

/* ============================================
   VARIABLES CSS - PALETA FEELING (EXACTA)
   ============================================ */
:root {
    /* Colores de fondo - EXACTOS del proyecto original */
    --ef-bg-primary: #171717;
    --ef-bg-secondary: #202020;
    --ef-bg-tertiary: #2a2a2a;
    --ef-bg-overlay: rgba(32, 32, 32, 0.95);

    /* Colores de marca Feeling */
    --ef-rouse: #ff0062;
    --ef-rouse-hover: #e6005a;
    --ef-rouse-dark: #7d2d5a;
    --ef-spirit: #fcb87a;
    --ef-purple: #7d4eff;

    /* Colores de texto */
    --ef-text-primary: #ffffff;
    --ef-text-secondary: #a0a3bd;
    --ef-text-muted: #7d7f96;
    --ef-text-label: #9ca0bb;

    /* Colores contextuales de íconos */
    --ef-icon-calendar: #60a5fa;
    --ef-icon-location: #4ade80;
    --ef-icon-users: #a78bfa;
    --ef-icon-price: #ff0062;
    --ef-icon-warning: #fbbf24;
    --ef-icon-info: #38bdf8;

    /* Espaciado */
    --ef-spacing-xs: 8px;
    --ef-spacing-sm: 12px;
    --ef-spacing-md: 16px;
    --ef-spacing-lg: 24px;
    --ef-spacing-xl: 32px;

    /* Border radius */
    --ef-radius-sm: 6px;
    --ef-radius-md: 8px;
    --ef-radius-lg: 12px;
    --ef-radius-xl: 16px;

    /* Sombras */
    --ef-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --ef-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --ef-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Transiciones */
    --ef-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET Y BASE
   ============================================ */
.eventos-feeling-container * {
    box-sizing: border-box;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.eventos-feeling-container {
    width: 100%;
    margin: 0 auto;
    padding: var(--ef-spacing-lg);
    background: var(--ef-bg-primary);
    border-radius: var(--ef-radius-lg);
    min-height: 400px;
}

/* Título de sección */
.eventos-feeling-container > h2:first-of-type {
    color: var(--ef-text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--ef-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--ef-spacing-sm);
}

.eventos-feeling-container > p {
    color: var(--ef-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: var(--ef-spacing-xl);
}

/* ============================================
   ÍCONOS LUCIDE
   ============================================ */
.evento-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    stroke-width: 2;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-fallback {
    font-style: normal;
    font-size: 18px;
}

/* Tamaños específicos */
.evento-meta .evento-icon {
    width: 16px;
    height: 16px;
}

.pagination-btn .evento-icon {
    width: 16px;
    height: 16px;
}

/* Colores contextuales de íconos */
.evento-icon[data-lucide="calendar"],
.evento-icon[data-fallback="📅"] {
    color: var(--ef-icon-calendar);
    stroke: var(--ef-icon-calendar);
}

.evento-icon[data-lucide="map-pin"],
.evento-icon[data-fallback="📍"] {
    color: var(--ef-icon-location);
    stroke: var(--ef-icon-location);
}

.evento-icon[data-lucide="users"],
.evento-icon[data-fallback="🎟️"] {
    color: var(--ef-icon-users);
    stroke: var(--ef-icon-users);
}

.evento-icon[data-lucide="banknote"],
.evento-icon[data-lucide="ticket"],
.evento-icon[data-fallback="💰"] {
    color: var(--ef-icon-price);
    stroke: var(--ef-icon-price);
}

.evento-icon[data-lucide="clock"] {
    color: var(--ef-icon-info);
    stroke: var(--ef-icon-info);
}

/* ============================================
   FILTROS
   ============================================ */
.eventos-feeling-filters {
    background: #1f293766;
    padding: var(--ef-spacing-lg);
    margin-bottom: var(--ef-spacing-xl);
    border-radius: var(--ef-radius-lg);
    box-shadow: var(--ef-shadow-sm);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ef-spacing-md);
    align-items: flex-end;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--ef-spacing-xs);
    flex: 0 1 auto;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ef-text-label);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input[type="text"],
.filter-group input[type="date"],
.filter-group select {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    background: var(--ef-bg-tertiary);
    color: #ffffff !important;
    transition: var(--ef-transition);
}

.filter-group input[type="text"]:focus,
.filter-group input[type="date"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--ef-rouse);
    box-shadow: 0 0 0 3px rgba(255, 0, 98, 0.1);
    background: var(--ef-bg-secondary);
    color: #ffffff !important;
}

.filter-group input[type="text"]::placeholder {
    color: var(--ef-text-muted);
    opacity: 0.6;
}

/* Estilos para las opciones del select */
.filter-group select option {
    background: var(--ef-bg-tertiary);
    color: #ffffff;
    padding: 10px;
}

.filter-group select option:hover,
.filter-group select option:focus,
.filter-group select option:checked {
    background: var(--ef-bg-secondary);
    color: #ffffff;
}

.filter-group input[type="checkbox"] {
    margin-right: var(--ef-spacing-xs);
    accent-color: var(--ef-rouse);
}

/* Campo de búsqueda más ancho */
.filter-search {
    flex: 1 1 300px;
    min-width: 250px;
}

/* Campos individuales con ancho fijo */
.filter-category,
.filter-price,
.filter-per-page {
    flex: 0 1 180px;
}

/* Contenedor de fechas agrupa DESDE y HASTA horizontalmente */
.filter-dates {
    display: grid;
    grid-template-columns: auto auto;
    gap: var(--ef-spacing-sm);
    flex: 0 1 auto;
}

.filter-dates > div {
    display: flex;
    flex-direction: column;
    gap: var(--ef-spacing-xs);
}

.filter-dates input[type="date"] {
    width: 160px;
}

/* Checkbox de disponibilidad */
.filter-availability {
    align-self: flex-end;
}

/* Botones con ancho automático */
.filter-actions {
    display: flex;
    flex-direction: row;
    gap: var(--ef-spacing-sm);
    flex: 0 1 auto;
    align-items: center;
}

.btn-filter,
.btn-reset {
    padding: 10px 24px;
    border: none;
    border-radius: var(--ef-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--ef-transition);
    white-space: nowrap;
}

.btn-filter {
    background: var(--ef-rouse);
    color: white;
}

.btn-filter:hover {
    background: var(--ef-rouse-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 98, 0.3);
}

.btn-filter:active {
    transform: translateY(0);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ef-text-secondary);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ef-text-primary);
}

/* ============================================
   INFO DE RESULTADOS
   ============================================ */
.eventos-info {
    text-align: left;
    padding: var(--ef-spacing-md) 0;
    font-size: 14px;
    color: var(--ef-text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--ef-spacing-xs);
}

.eventos-info::before {
    content: "✨";
    font-size: 18px;
}

/* ============================================
   GRID DE EVENTOS
   ============================================ */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--ef-spacing-lg);
    margin-bottom: var(--ef-spacing-xl);
    background: #1f293766;
    padding: var(--ef-spacing-lg);
    border-radius: var(--ef-radius-lg);
}

.evento-card {
    background: #1f293766;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--ef-radius-lg);
    overflow: hidden;
    transition: var(--ef-transition);
    display: flex;
    flex-direction: column;
}

.evento-card:hover {
    box-shadow: var(--ef-shadow-lg);
    border-color: rgba(255, 0, 98, 0.3);
}

.evento-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--ef-bg-tertiary);
}

.evento-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evento-badge {
    position: absolute;
    top: var(--ef-spacing-sm);
    right: var(--ef-spacing-sm);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.evento-badge-full {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.evento-card-content {
    padding: var(--ef-spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.evento-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 98, 0.15);
    color: var(--ef-rouse);
    padding: 5px 12px;
    border-radius: var(--ef-radius-sm);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: var(--ef-spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.evento-category::before {
    content: "✨";
    font-size: 12px;
}

.evento-title {
    font-size: 20px;
    font-weight: 700;
    margin: var(--ef-spacing-sm) 0;
    color: var(--ef-text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.evento-meta {
    display: flex;
    flex-direction: column;
    gap: var(--ef-spacing-sm);
    margin: var(--ef-spacing-md) 0;
    font-size: 13px;
    color: var(--ef-text-secondary);
    flex: 1;
}

.evento-meta > div {
    display: flex;
    align-items: center;
    gap: var(--ef-spacing-sm);
}

.evento-meta span {
    color: var(--ef-text-secondary);
}

/* Footer de la card: precio + botón en la misma línea */
.evento-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ef-spacing-md);
    margin-top: auto;
    padding-top: var(--ef-spacing-md);
}

/* Estilos para precio */
.evento-price {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--ef-spacing-xs);
}

.evento-price span {
    color: #ff5a8a !important;
}

.btn-ver-mas {
    padding: 10px 20px;
    background: var(--ef-rouse-dark);
    color: white;
    border: none;
    border-radius: var(--ef-radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: var(--ef-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-ver-mas:hover {
    background: var(--ef-rouse);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 98, 0.4);
    color: white;
}

.btn-ver-mas:active {
    transform: translateY(0);
}

.btn-ver-mas:visited {
    color: white;
}


/* ============================================
   PAGINACIÓN
   ============================================ */
.eventos-pagination {
    margin: var(--ef-spacing-xl) 0;
    padding: var(--ef-spacing-lg) 0;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--ef-spacing-xs);
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--ef-bg-secondary);
    color: var(--ef-text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--ef-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    background: var(--ef-bg-tertiary);
    border-color: var(--ef-rouse);
    color: var(--ef-text-primary);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--ef-rouse);
    color: white;
    border-color: var(--ef-rouse);
    font-weight: 700;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pagination-dots {
    padding: 0 var(--ef-spacing-xs);
    color: var(--ef-text-muted);
    font-size: 14px;
}

/* ============================================
   ESTADOS
   ============================================ */
.eventos-loader {
    text-align: center;
    padding: var(--ef-spacing-xl) * 2;
    font-size: 18px;
    color: var(--ef-text-secondary);
}

.eventos-loader::before {
    content: "⏳";
    font-size: 32px;
    display: block;
    margin-bottom: var(--ef-spacing-md);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.eventos-no-results {
    text-align: center;
    padding: var(--ef-spacing-xl) * 2;
    font-size: 16px;
    color: var(--ef-text-muted);
    background: var(--ef-bg-secondary);
    border-radius: var(--ef-radius-lg);
}

.eventos-no-results::before {
    content: "🔍";
    font-size: 48px;
    display: block;
    margin-bottom: var(--ef-spacing-md);
    opacity: 0.5;
}

.eventos-feeling-error {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b6b;
    padding: var(--ef-spacing-md);
    border-radius: var(--ef-radius-sm);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.eventos-feeling-empty {
    text-align: center;
    padding: var(--ef-spacing-xl) * 2;
    font-size: 16px;
    color: var(--ef-text-muted);
    background: var(--ef-bg-secondary);
    border-radius: var(--ef-radius-lg);
}

.eventos-feeling-empty::before {
    content: "📭";
    font-size: 48px;
    display: block;
    margin-bottom: var(--ef-spacing-md);
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .eventos-feeling-container {
        padding: var(--ef-spacing-md);
    }

    .eventos-grid {
        grid-template-columns: 1fr;
        gap: var(--ef-spacing-md);
    }

    .eventos-feeling-filters {
        padding: var(--ef-spacing-md);
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-search,
    .filter-category,
    .filter-price,
    .filter-per-page,
    .filter-availability {
        flex: 1 1 100%;
        width: 100%;
    }

    .filter-dates {
        flex: 1 1 100%;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .filter-dates input[type="date"] {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-filter,
    .btn-reset {
        width: 100%;
    }

    .filter-group input[type="text"],
    .filter-group input[type="date"],
    .filter-group select {
        width: 100%;
    }

    .pagination-btn {
        min-width: 38px;
        height: 38px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .evento-card-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .eventos-feeling-container {
        padding: var(--ef-spacing-sm);
        border-radius: var(--ef-radius-sm);
    }

    .eventos-feeling-filters {
        padding: var(--ef-spacing-md);
    }

    .pagination-controls {
        gap: 4px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .evento-title {
        font-size: 18px;
    }
}

/* ============================================
   ANIMACIONES Y EFECTOS ESPECIALES
   ============================================ */

/* Efecto de brillo en hover */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.btn-filter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    border-radius: inherit;
}

.btn-filter,
.btn-reservar {
    position: relative;
    overflow: hidden;
}

/* Efecto de partículas en el fondo */
.eventos-feeling-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(255, 0, 98, 0.05) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 80% 80%,
        rgba(125, 78, 255, 0.05) 0%,
        transparent 50%
    );
    pointer-events: none;
    z-index: 0;
}

.eventos-feeling-container > * {
    position: relative;
    z-index: 1;
}
