/**
 * ACF Event Calendar - Frontend Styles
 * Version: 2.0.0
 */

.event-calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.event-calendar-table thead {
    background: linear-gradient(135deg, #612694 0%, #b84f00 100%);
    color: white;
}

.event-calendar-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white !important;
}

.event-calendar-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.event-calendar-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.event-calendar-table tbody tr:hover {
    background-color: #fff3e6;
    transform: translateY(-1px);
}

.event-calendar-table td {
    padding: 15px 12px;
    vertical-align: middle;
}

.event-date-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2px solid #612694;
    border-radius: 8px;
    padding: 8px;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-date-day {
    font-size: 24px;
    font-weight: bold;
    color: #612694;
    line-height: 1;
}

.event-date-month {
    font-size: 12px;
    font-weight: 600;
    color: #b84f00;
    text-transform: uppercase;
    margin: 2px 0;
}

.event-date-year {
    font-size: 11px;
    color: #666;
}

.event-name-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 4px;
}

.event-name-link:hover {
    color: #612694;
    text-decoration: underline;
}

.event-time-display {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.event-location {
    color: #666;
    font-size: 14px;
}

.event-view-btn {
    background: linear-gradient(135deg, #612694 0%, #b84f00 100%);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
}

.event-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 96, 0, 0.4);
    color: white;
    text-decoration: none;
}

.event-rsvp-btn {
    background: #fff;
    color: #612694 !important;
    padding: 6px 12px;
    border: 2px solid #612694;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.event-rsvp-btn:hover {
    background: #612694;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 96, 0, 0.4);
    text-decoration: none;
}

.event-directions-btn {
    background: #28a745;
    color: white !important;
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-left: 4px;
}

.event-directions-btn:hover {
    background: #218838;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    text-decoration: none;
}

.event-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* Single Event Page Styles */
.single-event-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.event-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.event-detail-item {
    display: flex;
    flex-direction: column;
}

.event-detail-label {
    font-weight: 600;
    color: #612694;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.event-detail-value {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.event-description-full {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* City and State Filter Styles */
.event-filter-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #612694;
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.event-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.event-filter-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.event-calendar-wrapper .event-filter-select,
.event-filter-select.event-city-filter,
.event-filter-select.event-state-filter {
    padding: 8px 30px 8px 12px !important;
    border: 2px solid #612694 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: white !important;
    color: #333 !important;
    width: 200px !important;
    max-width: 200px !important;
    min-width: 180px !important;
    height: auto !important;
    line-height: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23612694' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 16px !important;
    box-shadow: none !important;
    text-transform: none !important;
    font-family: inherit !important;
}

.event-calendar-wrapper .event-filter-select:focus,
.event-filter-select.event-city-filter:focus,
.event-filter-select.event-state-filter:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(221, 96, 0, 0.2) !important;
    border-color: #612694 !important;
}

.event-calendar-wrapper .event-filter-select option,
.event-filter-select.event-city-filter option,
.event-filter-select.event-state-filter option {
    background: white !important;
    color: #333 !important;
    padding: 8px !important;
}

/* Override any theme select styling */
.event-filter-container select[class*="event-filter-select"] {
    background-color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-calendar-table {
        font-size: 14px;
    }
    
    .event-calendar-table th,
    .event-calendar-table td {
        padding: 10px 8px;
    }
    
    .event-date-display {
        min-width: 60px;
        padding: 6px;
    }
    
    .event-date-day {
        font-size: 18px;
    }
    
    .event-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .event-filter-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .event-filter-group {
        min-width: 100%;
    }
    
    .event-calendar-wrapper .event-filter-select,
    .event-filter-select.event-city-filter,
    .event-filter-select.event-state-filter {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 640px) {
    /* Stack table layout for mobile */
    .event-calendar-table,
    .event-calendar-table thead,
    .event-calendar-table tbody,
    .event-calendar-table th,
    .event-calendar-table td,
    .event-calendar-table tr {
        display: block;
    }
    
    .event-calendar-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .event-calendar-table tr {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .event-calendar-table tr:nth-child(even) {
        background: #fff;
    }
    
    .event-calendar-table tr:hover {
        background: #fff3e6;
        transform: none;
    }
    
    .event-calendar-table td {
        border: none;
        position: relative;
        padding: 8px 0;
        display: flex;
        align-items: flex-start;
        gap: 15px;
    }
    
    .event-calendar-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #612694;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 80px;
        flex-shrink: 0;
    }
    
    .event-calendar-table td:first-child {
        justify-content: center;
        padding-bottom: 15px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 10px;
    }
    
    .event-calendar-table td:first-child:before {
        display: none;
    }
    
    .event-date-display {
        margin: 0 auto;
    }
    
    .event-calendar-table td:last-child {
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
        justify-content: center;
    }
    
    /* Mobile button adjustments */
    .event-action-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    .event-view-btn,
    .event-rsvp-btn {
        font-size: 10px;
        padding: 6px 10px;
        margin: 0;
    }
    
    /* Mobile event details */
    .event-calendar-table td:nth-child(2) {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-name-link {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .event-time-display {
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .event-calendar-wrapper {
        margin: 0 -10px;
    }
    
    .event-filter-container {
        margin: 10px;
        padding: 12px;
    }
    
    .event-calendar-table tr {
        margin: 0 10px 15px 10px;
        padding: 12px;
    }
    
    .event-action-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .event-view-btn,
    .event-rsvp-btn {
        width: 100%;
        text-align: center;
        font-size: 11px;
        padding: 8px 16px;
    }
}