/**
 *------------------------------------------------------------------------+
 * {VHOST_ROOT}/public/css/public.css
 *
 * Copyright (c) 2002-2026 Elysian Labs
 * All rights reserved.
 *
 * Revision history at end of file.
 *------------------------------------------------------------------------+
 * Public-facing styles for the plugin
 *
 * @package    Elabs_Goodtown_Events
 * @subpackage Elabs_Goodtown_Events/public/css
 *------------------------------------------------------------------------+
 */

/* Events Wrapper */
.goodtown-events-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Search Bar */
.goodtown-events-search-bar {
    position: relative;
    margin: 0 auto 30px;
    max-width: 500px;
}

.goodtown-events-search-input {
    width: 100%;
    padding: 18px 60px 18px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 16px !important;
    background: #fff;
    transition: border-color 0.2s ease;
}

.goodtown-events-search-input:focus {
    outline: none;
    border-color: #ef4327;
}

.goodtown-events-search-bar .dashicons {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #666;
    pointer-events: none;
}

/* Events Grid Container */
.goodtown-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* Desktop: 3 columns */
@media (min-width: 768px) {
    .goodtown-events-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Event Card */
.goodtown-event-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.goodtown-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Card Header */
.goodtown-event-card-header {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f8f8;
    border-bottom: 2px solid #ddd;
}

/* Date Box */
.goodtown-event-date-box {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    padding: 10px;
    background: #ef4327;
    color: #fff;
    border-radius: 16px;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
    border: 2px solid #ef4327;
    transition: all 0.4s ease;
}

.goodtown-event-card:hover .goodtown-event-date-box {
    background: #000;
    border-color: #000;
}

.goodtown-event-date-day {
    display: block;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.goodtown-event-date-number {
    display: block;
    font-size: 32px;
    margin: 5px 0;
}

.goodtown-event-date-month {
    display: block;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Title Box */
.goodtown-event-title-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.goodtown-event-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
}

.goodtown-event-featured-badge {
    display: inline-block;
    background: #ffd700;
    color: #000;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
    text-transform: uppercase;
    border: 1px solid #ffd700;
}

.goodtown-event-soldout-badge {
    display: inline-block;
    background: #dc3232;
    color: #fff;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #dc3232;
}

/* Image Wrapper - 16:9 ratio */
.goodtown-event-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.goodtown-event-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goodtown-event-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
}

.goodtown-event-image-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #999;
}

/* Card Body */
.goodtown-event-card-body {
    padding: 20px;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.goodtown-event-datetime {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goodtown-event-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.goodtown-event-date .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.goodtown-event-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 700;
}

.goodtown-event-time .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.goodtown-event-price {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #ef4327;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.goodtown-event-price .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.goodtown-event-location {
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.goodtown-event-location .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #666;
}

/* Button */
.goodtown-event-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #ef4327;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 16px;
    border: 2px solid #ef4327;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
}

.goodtown-event-card:hover .goodtown-event-button {
    background: #000;
    border-color: #000;
}

/* No Results */
.goodtown-events-no-results,
.goodtown-events-search-no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
    grid-column: 1 / -1;
}

/*------------------------------------------------------------------------+
 * Revision History
 *------------------------------------------------------------------------+
 * 2026-02-02 • Darren Debono
 * Add search functionality for events.
 *------------------------------------------------------------------------+
 * 2026-01-27 • Darren Debono
 * Add card layout styles for event display.
 *------------------------------------------------------------------------+
 * 2026-01-19 • Darren Debono
 * Created, initial revision.
 *------------------------------------------------------------------------+
 */
