/**
 * Ticket Tailor - Frontend Styles
 */

/* Event Listing Styles */
.tt-event-listing {
    margin: 2rem 0;
}

.tt-event-listing.tt-layout-grid {
    display: grid;
    gap: 2rem;
}

.tt-event-listing.tt-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.tt-event-listing.tt-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.tt-event-listing.tt-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.tt-event-listing.tt-layout-list .tt-event-card {
    margin-bottom: 2rem;
}

/* Event Card */
.tt-event-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tt-event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tt-event-image {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

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

.tt-event-content {
    padding: 1.5rem;
}

.tt-event-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
}

.tt-event-date,
.tt-event-venue {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.tt-event-date .dashicons,
.tt-event-venue .dashicons {
    margin-right: 0.5rem;
    color: #2271b1;
}

.tt-event-excerpt {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

.tt-event-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2271b1;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.tt-event-button:hover {
    background: #135e96;
}

/* Single Event Styles */
.tt-single-event {
    margin: 2rem 0;
}

.tt-event-header-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.tt-event-header-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tt-event-details {
    max-width: 800px;
}

.tt-event-details .tt-event-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.tt-event-meta {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.tt-meta-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tt-meta-item:last-child {
    margin-bottom: 0;
}

.tt-meta-item .dashicons {
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    color: #2271b1;
}

.tt-meta-item strong {
    margin-right: 0.5rem;
}

.tt-event-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #333;
}

.tt-event-description p {
    margin-bottom: 1rem;
}

.tt-event-cta {
    margin-top: 2rem;
}

.tt-button {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tt-button-primary {
    background: #2271b1;
    color: #fff !important;
}

.tt-button-primary:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* Status Badges */
.tt-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tt-status[class*="live"] {
    background: #d1f4e0;
    color: #0f5132;
}

.tt-status[class*="draft"] {
    background: #f8d7da;
    color: #721c24;
}

/* Error & Empty States */
.tt-error,
.tt-no-events {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

.tt-error {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #721c24;
}

.tt-widget-error {
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    color: #721c24;
}

/* Widget Container */
.tt-widget-container {
    margin: 2rem 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tt-event-listing.tt-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .tt-event-details .tt-event-title {
        font-size: 1.5rem;
    }
    
    .tt-button {
        display: block;
        text-align: center;
    }
}

/* Loading State */
.tt-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.tt-loading::after {
    content: "⏳";
    margin-left: 0.5rem;
}

/* Accessibility */
.tt-event-button:focus,
.tt-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .tt-event-button,
    .tt-button {
        display: none;
    }
}
