/**
 * Events Manager Plugin Styles
 */

/* Container */
.events-archive-wrapper .container,
.single-event .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5em;
    margin: 0;
    color: #333;
}

/* Event Filters */
.event-filters {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 200px;
        margin-bottom: 10px;
}

.filter-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.filter-item select,
.filter-item input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-filter {
    padding: 14px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-filter:hover {
    background: #005a87;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* ========== Event Card Styles (Image with Overlay) ========== */

.event-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.event-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.event-card-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Placeholder image for events without featured image */
.event-placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-placeholder-image .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.8);
}

/* Overlay */
.event-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: 30px 20px 20px 20px;
    transition: all 0.4s ease;
}

.event-card:hover .event-card-overlay {
    background: rgba(0, 0, 0, 0.85);
    padding: 40px 20px 20px 20px;
}

.event-card-content {
    position: relative;
    z-index: 2;
}

.event-card-title {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.4em;
    line-height: 1.3;
    transition: all 0.3s ease;
    font-weight: 600;
}

.event-card:hover .event-card-title {
    margin-bottom: 20px;
}

/* Hidden details that appear on hover */
.event-card-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    color: #fff;
}

.event-card:hover .event-card-details {
    max-height: 300px;
    opacity: 1;
}

.event-card-date,
.event-card-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #f0f0f0;
}

.event-card-date .dashicons,
.event-card-type .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #4fc3f7;
}

.event-card-excerpt {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.6;
    color: #e0e0e0;
    font-size: 0.9em;
}

/* No Events Message */
.no-events {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #999;
    grid-column: 1 / -1;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #999;
    grid-column: 1 / -1;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a,
.pagination .current {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover,
.pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ========== Single Event Styles ========== */

/* Remove constraints from single event page */
.single-event {
    padding: 0 !important;
    margin: 0 !important;
}

/* Full width banner that breaks out of everything */
.event-full-width-banner {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 80px !important;
    margin-bottom: 40px !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.event-full-width-banner img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure container below banner has proper styling */
.single-event .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.single-event .event-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.single-event .event-title {
    font-size: 2.5em;
    margin: 0;
    color: #333;
}

/* Title at top left of content */
.event-content-title {
    font-size: 2.5em;
    color: #333;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

/* Two Column Layout */
.event-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 40px;
}

/* Main Content (Left Column) */
.event-main-content {
    background: #fff;
}

.event-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

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

.event-description {
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

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

.event-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.event-actions .btn {
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.event-actions .btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
}

.btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.btn-secondary:hover {
    background: #0073aa;
    color: #fff;
}

/* Sidebar (Right Column) */
.event-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.event-info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-box-title {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.info-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.info-label .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: #0073aa;
}

.info-value {
    display: block;
    font-size: 1.1em;
    color: #333;
    margin-left: 28px;
}

/* ========== Date Block Styling ========== */

.info-date-block {
    background: #f0f6fc;
    padding: 15px !important;
    border-radius: 6px;
    border: 1px solid #d4e4f7 !important;
}

.info-date-block .info-label {
    font-size: 0.9em;
    color: #0073aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-date-block .info-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 5px;
}

.info-note {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 10px;
    margin-left: 0 !important;
    padding-top: 10px;
    border-top: 1px solid #d4e4f7;
    font-style: italic;
    line-height: 1.5;
}

.info-price-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    font-style: italic;
    border-top: none;
    padding-top: 0;
}

/* Adjust spacing for date blocks */
.info-date-block + .info-date-block {
    margin-top: 15px;
}

/* Date Range Styling */
.info-date-range .info-value {
    line-height: 1.6;
}

.info-date-range .date-separator {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
    display: inline;
}

/* Location icon styling */
.info-item .dashicons-location {
    color: #dc3545;
}

/* ========== Shortcode Specific Styles ========== */

.events-shortcode-wrapper {
    margin: 20px 0;
}

.events-container {
    width: 100%;
}

/* Column variations for shortcode */
.events-grid-2-columns {
    grid-template-columns: repeat(2, 1fr) !important;
}

.events-grid-3-columns {
    grid-template-columns: repeat(3, 1fr) !important;
}

.events-grid-4-columns {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* ========== Events List View Styles ========== */

.events-list-wrapper {
    margin: 20px 0;
}

.events-list-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table Header */
.events-list-header {
    display: grid;
    grid-template-columns: 150px 1fr 180px 150px;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #333;
}

.events-list-header .events-list-col {
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Body */
.events-list-body {
    background: #fff;
}

.events-list-row {
    display: grid;
    grid-template-columns: 150px 1fr 180px 150px;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
    align-items: center;
}

.events-list-row:last-child {
    border-bottom: none;
}

.events-list-row:hover {
    background: #f8f9fa;
}

/* Image Column */
.col-image a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.col-image a:hover {
    transform: scale(1.05);
}

.col-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.event-list-placeholder {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.event-list-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.8);
}

/* Details Column */
.col-details {
    padding-right: 15px;
}

.event-list-title {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    line-height: 1.3;
}

.event-list-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-list-title a:hover {
    color: #0073aa;
}

.event-list-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.event-list-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #e3f2fd;
    color: #0073aa;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.event-list-category .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Date Column */
.col-date {
    text-align: center;
}

.event-list-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.event-list-date .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: #0073aa;
}

.event-list-date span {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* Price Column */
.col-price {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-list-price {
    font-size: 1.3em;
    font-weight: 700;
    color: #28a745;
    padding: 10px 15px;
    background: #e8f5e9;
    border-radius: 6px;
    display: inline-block;
}

.event-list-no-data {
    color: #999;
    font-size: 1.5em;
}

/* ========== Price Sort Arrows Styling ========== */

.price-sort-arrows {
    display: inline-flex;
    flex-direction: column;
    margin-left: 10px;
    gap: 2px;
}

.sort-arrow {
    cursor: pointer;
    font-size: 12px;
    color: #999;
    transition: color 0.3s ease, transform 0.2s ease;
    user-select: none;
    line-height: 1;
}

.sort-arrow:hover {
    color: #0073aa;
    transform: scale(1.2);
}

.sort-arrow.active {
    color: #0073aa;
    font-weight: bold;
}

/* ========== Responsive Design ========== */

/* Tablet */
@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .events-grid-4-columns {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .event-layout {
        grid-template-columns: 65% 35%;
        gap: 30px;
    }
    
    .event-card {
        height: 350px;
    }
    
    .events-list-header,
    .events-list-row {
        grid-template-columns: 120px 1fr 150px 120px;
        gap: 15px;
        padding: 15px;
    }
    
    .col-image img,
    .event-list-placeholder {
        height: 80px;
    }
    
    .event-list-title {
        font-size: 1.1em;
    }
    
    .event-list-price {
        font-size: 1.1em;
        padding: 8px 12px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-title {
        font-size: 2em;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .events-grid-3-columns,
    .events-grid-4-columns {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .event-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .event-sidebar {
        position: static;
    }
    
    .event-actions {
        flex-direction: column;
    }
    
    .event-actions .btn {
        width: 100%;
    }
    
    .single-event .event-title {
        font-size: 1.8em;
    }
    
    .info-date-block {
        padding: 12px !important;
    }
    
    .info-date-block .info-value {
        font-size: 1.1em;
    }
    
    .event-card {
        height: 300px;
    }
    
    .event-card-title {
        font-size: 1.2em;
    }
    
    .events-list-header {
        display: none;
    }
    
    .events-list-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .col-image {
        text-align: center;
    }
    
    .col-image img,
    .event-list-placeholder {
        width: 100%;
        max-width: 300px;
        height: 180px;
        margin: 0 auto;
    }
    
    .col-details {
        padding-right: 0;
        text-align: center;
    }
    
    .event-list-category {
        display: inline-flex;
    }
    
    .col-date,
    .col-price {
        text-align: center;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 6px;
    }
    
    .event-list-date {
        flex-direction: row;
        justify-content: center;
    }
    
    .event-list-price {
        font-size: 1.5em;
    }
    
    .event-full-width-banner {
        margin-top: 60px !important;
        margin-bottom: 30px !important;
    }
    
    .event-full-width-banner img {
        max-height: 400px;
    }
    
    .event-content-title {
        font-size: 1.8em;
    }
    
    .price-sort-arrows {
        margin-left: 5px;
    }
    
    .sort-arrow {
        font-size: 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .event-info-box {
        padding: 20px;
    }
    
    .events-grid-2-columns,
    .events-grid-3-columns,
    .events-grid-4-columns {
        grid-template-columns: 1fr !important;
    }
    
    .event-card {
        height: 280px;
    }
    
    .event-card-title {
        font-size: 1.1em;
    }
    
    .events-list-row {
        padding: 15px;
    }
    
    .event-list-title {
        font-size: 1.2em;
    }
    
    .col-image img,
    .event-list-placeholder {
        height: 150px;
    }
    
    .event-full-width-banner {
        margin-top: 40px !important;
        margin-bottom: 20px !important;
    }
    
    .event-full-width-banner img {
        max-height: 300px;
    }
    
    .event-content-title {
        font-size: 1.5em;
    }
}