/* ============================================================
   mtickets - Complete Styles
   ============================================================ */

/* ── Base styles ────────────────────────────────────────────── */
:root {
    --mt-green: rgb(53, 168, 57);
    --mt-green-dark: #2a7a2e;
    --mt-navy: oklch(0.35 0.08 240.87);
    --mt-soft-bg: #f8faf8;
    --mt-card-bg: #ffffff;
}

/* ── Custom animations for cards ────────────────────────────── */
.event-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover .event-img {
    transform: scale(1.02);
    transition: transform 0.5s ease;
}

/* ── Loading states ──────────────────────────────────────────── */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ── Booking states ──────────────────────────────────────────── */
.booking-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.booking-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.booking-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
}

/* ── Custom scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--mt-green);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mt-green-dark);
}

/* ============================================================
   EVENT FILTER BAR
   ============================================================ */

.filter-bar-enhanced {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #eef3ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-search .filter-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0b8a0;
    font-size: 0.9rem;
}

.filter-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 2px solid #eef3ea;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8faf8;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--mt-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(53, 168, 57, 0.1);
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid #eef3ea;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #f8faf8;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e8b6e' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--mt-green);
    background-color: white;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-filter-apply {
    background: var(--mt-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-filter-apply:hover {
    background: var(--mt-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 168, 57, 0.3);
}

.btn-filter-reset {
    background: transparent;
    color: #6e8b6e;
    border: 2px solid #eef3ea;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-filter-reset:hover {
    background: #f0f5ee;
    border-color: #dce8da;
}

/* ============================================================
   RESULTS META
   ============================================================ */

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.results-count {
    color: #6e8b6e;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f0f5ee;
    border-radius: 8px;
    padding: 3px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #6e8b6e;
    transition: all 0.2s;
}

.view-btn.active {
    background: white;
    color: var(--mt-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.view-btn:hover:not(.active) {
    color: #1a2c1a;
}

/* ============================================================
   EVENT GRID
   ============================================================ */

.event-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.event-grid-enhanced.list-view {
    grid-template-columns: 1fr;
}

.event-grid-enhanced.list-view .event-card-enhanced {
    display: flex;
    flex-direction: row;
    max-height: 220px;
}

.event-grid-enhanced.list-view .card-image-wrapper {
    flex: 0 0 280px;
}

.event-grid-enhanced.list-view .event-img {
    height: 100%;
    aspect-ratio: auto;
}

.event-grid-enhanced.list-view .event-info-enhanced {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-grid-enhanced.list-view .event-details {
    flex-wrap: nowrap;
}

/* ============================================================
   EVENT CARD
   ============================================================ */

.event-card-enhanced {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #eef3ea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
}

.event-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
    border-color: var(--mt-green);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f0f5ee;
    width: 100%;
    aspect-ratio: 3/4;  /* Taller portrait ratio - covers more vertical space */
}

/* ── Date Badge on Card Image ─────────────────────────────── */
.card-date-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    text-align: center;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 48px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-date-badge .date-day {
    font-size: 1.1rem;
    font-weight: 800;
    display: block;
    color: #fff;
}

.card-date-badge .date-month {
    font-size: 0.55rem;
    text-transform: uppercase;
    opacity: 0.85;
    display: block;
    letter-spacing: 0.5px;
    color: #a0d8a0;
}

/* Adjust wishlist button to not overlap with date badge */
.card-wishlist {
    position: absolute;
    top: 16px;
    right: 76px; /* Move left to make room for date badge */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e8b6e;
    z-index: 2;
}

.event-card-enhanced .event-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.event-card-enhanced:hover .event-img {
    transform: scale(1.03);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 2;
}

.card-wishlist {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e8b6e;
    z-index: 2;
}

.card-wishlist:hover {
    background: white;
    transform: scale(1.1);
    color: #e74c3c;
}

.card-wishlist.active {
    color: #e74c3c;
}

.card-wishlist.active i {
    animation: heartPop 0.3s ease;
}

/* ============================================================
   EVENT INFO
   ============================================================ */

.event-info-enhanced {
    padding: 20px 22px 22px;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.event-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e2a1e;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
}

.event-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e2a1e;
    white-space: nowrap;
}

.event-rating .review-count {
    color: #a0b8a0;
    font-weight: 400;
    font-size: 0.75rem;
}

/* ============================================================
   EVENT DETAILS
   ============================================================ */

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 14px;
    padding: 10px 0;
    border-top: 1px solid #f0f5ee;
    border-bottom: 1px solid #f0f5ee;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #5e7a5e;
}

.event-meta-item i {
    color: var(--mt-green);
    font-size: 0.8rem;
    width: 16px;
}

/* ============================================================
   EVENT FOOTER
   ============================================================ */

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.event-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.7rem;
    color: #a0b8a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.event-price .price {
    font-weight: 800;
    color: var(--mt-green);
    font-size: 1.4rem;
}

.btn-book-enhanced {
    background: var(--mt-navy);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-book-enhanced:hover:not(:disabled) {
    background: var(--mt-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(53, 168, 57, 0.3);
}

.btn-book-enhanced:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-book-enhanced i {
    transition: transform 0.2s;
}

.btn-book-enhanced:hover:not(:disabled) i {
    transform: translateX(4px);
}

/* ============================================================
   EVENT AVAILABILITY
   ============================================================ */

.event-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #6e8b6e;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.availability-dot.available {
    background: var(--mt-green);
}

.availability-dot.limited {
    background: #f5a623;
}

.availability-dot.sold-out {
    background: #e74c3c;
}

/* ============================================================
   TICKET NAMES (bottom of card)
   ============================================================ */

.event-ticket-names {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #a0b8a0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding-top: 8px;
    border-top: 1px solid #f5f8f5;
}

.event-ticket-names .ticket-tag {
    background: #f0f5ee;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #5e7a5e;
}

/* ============================================================
   LOAD MORE
   ============================================================ */

.load-more-container {
    text-align: center;
    margin-bottom: 20px;
}

.btn-load-more {
    background: transparent;
    border: 2px solid #eef3ea;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #5e7a5e;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-load-more:hover {
    border-color: var(--mt-green);
    color: var(--mt-green);
    background: #f0f5ee;
}

.btn-load-more i {
    margin-right: 8px;
}

/* ============================================================
   VIEW ALL LINK
   ============================================================ */

.view-all-link {
    color: var(--mt-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.view-all-link:hover {
    color: var(--mt-green-dark);
    transform: translateX(4px);
}

/* ============================================================
   SPINNER
   ============================================================ */

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--mt-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .filter-bar-enhanced {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .event-grid-enhanced {
        grid-template-columns: 1fr;
    }

    .event-grid-enhanced.list-view .event-card-enhanced {
        flex-direction: column;
        max-height: none;
    }

    .event-grid-enhanced.list-view .card-image-wrapper {
        flex: 0 0 auto;
    }

    .event-header {
        flex-direction: column;
    }

    .event-details {
        flex-direction: column;
        gap: 6px;
    }

    .event-footer {
        flex-wrap: wrap;
        gap: 12px;
    }

    .results-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .filter-bar-enhanced {
        padding: 12px;
        gap: 10px;
    }

    .filter-bar-enhanced input,
    .filter-bar-enhanced select {
        width: 100%;
        font-size: 0.9rem;
    }

    .category-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }
    .category-header h2 {
        font-size: 1.2rem;
    }

    .event-card-enhanced .event-title {
        font-size: 0.95rem;
    }

    .results-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-load-more {
        width: 100%;
        justify-content: center;
    }
}
