/**
 * Event Card Component Styles
 * Consistent card system for event listings (used by tickera-event-listing)
 * 
 * @package TicketSystemTango
 */

/* ==========================================================================
   Event Card - Base Component
   ========================================================================== */

.tc-single-event {
    background-color: var(--ts-surface-1);
    border-radius: var(--ts-radius);
    border: 1px solid var(--ts-border-color);
    overflow: hidden;
    transition: box-shadow var(--ts-transition-normal) var(--ts-ease-out),
        transform var(--ts-transition-normal) var(--ts-ease-out);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tc-single-event:hover {
    box-shadow: var(--ts-shadow-4);
    transform: translateY(-3px);
}

.tc-single-event:focus-within {
    box-shadow: 0 0 0 2px var(--ts-gold);
}

/* ==========================================================================
   Thumbnail / Image
   ========================================================================== */

/* Target actual plugin class: .tc-get-featured-image */
.tc-single-event .tc-get-featured-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: var(--ts-surface-2);
}

.tc-single-event .tc-get-featured-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.tc-single-event .tc-get-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ts-transition-slow) var(--ts-ease-out);
}

.tc-single-event:hover .tc-get-featured-image img {
    transform: scale(1.03);
}

/* Lazy loading placeholder */
.tc-single-event .tc-get-featured-image img[loading="lazy"] {
    background-color: var(--ts-surface-2);
}

/* ==========================================================================
   Content Wrapper
   ========================================================================== */

.tc-single-event .tc-event-content-wrap {
    padding: var(--ts-space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--ts-space-3);
}

/* ==========================================================================
   Title
   ========================================================================== */

.tc-single-event h4,
.tc-single-event .tc-event-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-family: var(--font-headings);
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.tc-single-event h4 a,
.tc-single-event .tc-event-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ts-transition-fast) var(--ts-ease-out);
}

.tc-single-event h4 a:hover,
.tc-single-event .tc-event-title a:hover {
    color: var(--ts-gold);
}

/* ==========================================================================
   Metadata (Date, Time, Location)
   ========================================================================== */

.tc-single-event .tc-event-metadata,
.tc-single-event .tc-dates-location,
.tc-single-event .tc-event-date-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--ts-space-1);
}

.tc-single-event .tc-meta-datetime,
.tc-single-event .tc-date-time,
.tc-single-event .tc-event-date {
    color: var(--ts-gold);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--ts-space-2);
}

.tc-single-event .tc-meta-location,
.tc-single-event .tc-event-location {
    color: var(--ts-mediumgrey-text);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--ts-space-2);
}

/* Category badges */
.tc-single-event .tc-event-categories {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ts-mediumgrey-text);
    margin-top: var(--ts-space-1);
}

/* ==========================================================================
   Excerpt
   ========================================================================== */

.tc-single-event .tc-event-excerpt,
.tc-single-event .tc-excerpt-wrap {
    color: var(--ts-lightgrey);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* ==========================================================================
   CTA / Link
   ========================================================================== */

.tc-single-event .tc-event-cta,
.tc-single-event .tc-view-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ts-space-2);
    margin-top: auto;
    padding: var(--ts-space-3) var(--ts-space-6);
    background: var(--ts-gold);
    color: var(--ts-black);
    border-radius: var(--ts-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background-color var(--ts-transition-fast) var(--ts-ease-out),
        transform var(--ts-transition-fast) var(--ts-ease-out);
}

.tc-single-event .tc-event-cta:hover,
.tc-single-event .tc-view-event:hover {
    background: #E8C37E;
    transform: translateY(-1px);
}

/* ==========================================================================
   Badges (Price, Status, etc.)
   ========================================================================== */

.tc-event-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--ts-space-1);
    padding: var(--ts-space-1) var(--ts-space-2);
    border-radius: var(--ts-radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tc-event-badge--featured {
    background: var(--ts-gold);
    color: var(--ts-black);
}

.tc-event-badge--free {
    background: var(--ts-success-soft);
    color: var(--ts-success);
}

.tc-event-badge--soldout {
    background: var(--ts-danger-soft);
    color: var(--ts-danger);
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.tc-display-filter-events {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: var(--ts-space-6);
    margin-top: var(--ts-space-6);
}

/* 2 columns (tablet) */
@media (min-width: 600px) {
    .tc-display-filter-events {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3 columns (desktop) */
@media (min-width: 1024px) {
    .tc-display-filter-events {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Override ALL plugin column classes - they use float/width/max-width which breaks grid */
.tc-single-event.tc-3-column,
.tc-single-event.tc-2-column,
.tc-single-event.tc-1-column,
.tc-single-event.tc-one-fourth,
.tc-single-event[class*="tc-column"] {
    width: 100% !important;
    max-width: 100% !important;
    /* Critical: override plugin's 31% max-width */
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

/* ==========================================================================
   No Results State
   ========================================================================== */

.tc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--ts-space-12) var(--ts-space-6);
    background: var(--ts-surface-1);
    border-radius: var(--ts-radius);
    border: 1px dashed var(--ts-border-color);
    color: var(--ts-mediumgrey-text);
}

.tc-no-results strong {
    display: block;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: var(--ts-space-2);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.tc-display-filter-events.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.tc-display-filter-events.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--ts-border-color);
    border-top-color: var(--ts-gold);
    border-radius: 50%;
    animation: tc-spin 0.8s linear infinite;
}

@keyframes tc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 480px) {
    .tc-single-event .tc-event-content-wrap {
        padding: var(--ts-space-4);
    }

    .tc-single-event h4,
    .tc-single-event .tc-event-title {
        font-size: 1.1rem;
    }
}