/**
 * Events Block Styles
 * Frontend styles for the Upcoming Events block
 */

/* Block Container */
.pci-events-block {
    background: transparent;
    padding: 0;
    margin: 0;
}

.pci-events-block.alignfull {
    padding-left: var(--wp--preset--spacing--30);
    padding-right: var(--wp--preset--spacing--30);
}

/* Events Container */
.pci-events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pci-events-container {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (min-width: 1024px) {
    .pci-events-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Event Card */
.pci-event-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pci-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Event Image */
.pci-event-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #7A9AC0 0%, #9E5523 100%);
    overflow: hidden;
}

.pci-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.pci-event-card:hover .pci-event-image img {
    transform: scale(1.05);
}

/* Event Badge */
.pci-event-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pci-event-badge.pci-event-ongoing {
    background: #4CAF50;
    color: white;
}

.pci-event-badge.pci-event-recurring {
    background: #2196F3;
    color: white;
}

/* Event Content */
.pci-event-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Event Date */
.pci-event-date {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #9E5523;
    font-size: 0.875rem;
    font-weight: 500;
}

.pci-event-date-display {
    font-weight: 600;
}

.pci-event-time {
    color: #666;
    font-weight: 400;
}

.pci-event-time::before {
    content: "•";
    margin-right: 0.5rem;
    color: #ccc;
}

/* Event Title */
.pci-event-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #292B2A;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Location */
.pci-event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.875rem;
}

.pci-event-location .pci-icon {
    flex-shrink: 0;
    color: #7A9AC0;
}

/* Event Summary */
.pci-event-summary {
    margin: 0 0 1.5rem 0;
    color: #474948;
    font-size: 0.9375rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Event Action Button */
.pci-event-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #7A9AC0;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.pci-event-action:hover {
    background: #6888B0;
    transform: translateX(2px);
    color: white;
}

.pci-event-action .pci-icon {
    transition: transform 0.2s ease;
}

.pci-event-action:hover .pci-icon {
    transform: translateX(2px);
}

/* Empty State */
.pci-events-empty {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

.pci-events-empty p {
    margin: 0;
    font-size: 1.125rem;
}

/* Not Configured State */
.pci-not-configured {
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.pci-not-configured p {
    margin-bottom: 1rem;
    color: #856404;
}

.pci-not-configured .button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #7A9AC0;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

/* Error State */
.pci-error {
    padding: 1.5rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* Icons */
.pci-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

/* Frontend Styles */
.pci-events-grid {
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .pci-events-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pci-event-card {
        margin: 0 auto;
        max-width: 400px;
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .has-background .pci-event-card {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .has-background .pci-event-title {
        color: #ffffff;
    }
    
    .has-background .pci-event-summary {
        color: #b0b0b0;
    }
    
    .has-background .pci-event-location {
        color: #999;
    }
}