/**
 * WP Events Manager - Frontend Styles
 * Version: 1.0.0
 */

 .text-right {
    text-align: right;
}

/* ==========================================================================
   Carousel de Eventos
   ========================================================================== */
.wpem-carousel-wrapper {
    margin: 30px 0;
    position: relative;
}

.wpem-events-carousel {
    margin: 0 -15px;
}

.wpem-event-card {
    background: #fff;
    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;
}

.wpem-events-carousel .wpem-event-card {
    margin-inline: 15px;
}

.wpem-event-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.wpem-event-image, .wpem-event-image img {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.wpem-event-image img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wpem-event-image .wpem-event-date {
    background-color: #000;
    color: #fff;
    display: inline-block;
    left: 0;
    margin-bottom: 0!important;
    padding-block: 10px 6px!important;
    position: absolute;
    text-align: center;
    text-transform: uppercase;
    top: 0;
    width: 75px;
}

.wpem-event-image .wpem-event-date .day {
    display: inline-block;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1;
    width: 100%;
}

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

.wpem-event-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
}

.wpem-status-cancelled {
    background: #e74c3c;
}

.wpem-status-postponed {
    background: #f39c12;
}

.wpem-status-sold_out {
    background: #95a5a6;
}

.wpem-event-content {
    padding: 20px;
    text-align: left;
}

.wpem-event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

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

.wpem-event-time {
    margin-left: 5px;
    font-weight: 600;
}

.wpem-event-title {
    margin: 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

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

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

.wpem-time-price {
    align-items: center;
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    margin-bottom: 10px;
}

.wpem-event-location,
.wpem-event-price,
.wpem-event-date-time {
    align-items: center;
    display: flex;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wpem-event-price {
    justify-content: flex-end;
}

.wpem-event-location .dashicons,
.wpem-event-price .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wpem-event-excerpt {
    margin-block: 15px;
}

.wpem-event-excerpt p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
}

.wpem-event-link {
    background: #0073aa;
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 10px 20px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.wpem-event-link:hover {
    background: #005a87;
    color: #fff;
}

/* Slick Carousel Customization */
.wpem-carousel-wrapper .slick-prev,
.wpem-carousel-wrapper .slick-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
}

.wpem-carousel-wrapper .slick-prev:hover,
.wpem-carousel-wrapper .slick-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.wpem-carousel-wrapper .slick-prev {
    left: -20px;
}

.wpem-carousel-wrapper .slick-next {
    right: -20px;
}

.wpem-carousel-wrapper .slick-dots {
    bottom: -35px;
}

.wpem-carousel-wrapper .slick-dots li button:before {
    font-size: 10px;
}

/* ==========================================================================
   Calendario de Eventos
   ========================================================================== */

.wpem-calendar-wrapper {
    margin: 30px 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpem-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.wpem-calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-transform: capitalize;
}

.wpem-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wpem-calendar-nav:hover {
    background: #0073aa;
    color: #fff;
    transform: scale(1.1);
}

.wpem-calendar-nav:active {
    transform: scale(0.95);
}

.wpem-calendar-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wpem-calendar-nav .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.wpem-calendar {
    margin-bottom: 30px;
}

.wpem-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.wpem-weekday {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 10px 0;
    font-size: 14px;
    text-transform: uppercase;
}

.wpem-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.wpem-calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
    position: relative;
    background: #fff;
    transition: all 0.3s ease;
    overflow: visible;
}

.wpem-calendar-day.wpem-empty {
    background: #f9f9f9;
    border-color: transparent;
}

.wpem-calendar-day.wpem-today {
    background: #e3f2fd;
    border-color: #0073aa;
}

.wpem-calendar-day.wpem-has-events {
    background: #f0f8ff;
    cursor: pointer;
}

.wpem-calendar-day.wpem-has-events:hover {
    background: #e1f0ff;
    border-color: #0073aa;
    transform: scale(1.02);
    z-index: 10;
}

.wpem-day-number {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.wpem-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpem-day-event {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    padding: 4px;
    border-radius: 3px;
    background: rgba(0, 115, 170, 0.1);
    transition: all 0.2s ease;
    font-size: 11px;
    line-height: 1.3;
}

.wpem-day-event:hover {
    background: rgba(0, 115, 170, 0.2);
    transform: translateX(2px);
}

.wpem-event-indicator {
    display: block;
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #0073aa;
    margin-top: 3px;
}

.wpem-event-name {
    flex: 1;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wpem-event-time {
    display: block;
    color: #0073aa;
    font-weight: 600;
    font-size: 10px;
    margin-bottom: 2px;
}

.wpem-day-event.wpem-event-hover {
    position: relative;
    z-index: 100;
}

.wpem-day-event.wpem-event-hover .wpem-event-name {
    white-space: normal;
    -webkit-line-clamp: unset;
}

/* Loading spinner */
.wpem-calendar-loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1000;
    border-radius: 8px;
}

.wpem-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: wpem-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes wpem-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpem-calendar-content {
    transition: opacity 0.3s ease;
    position: relative;
}

.wpem-calendar-events-list {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.wpem-calendar-events-list > h4 {
    margin-bottom: 15px;
}

.wpem-events-list, .wpem-events-list > li { 
    list-style: none; 
    margin-left: 0; 
    padding-left: 0;
}

.wpem-events-list { 
    display: grid; 
    gap: 20px;
    grid-template-columns: repeat(3, 1fr); 
    margin-top: 30px; 
}

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

.wpem-single-event {
    margin: 30px 0;
}

.wpem-event-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 16px;
    text-align: center;
}

.wpem-event-alert.wpem-status-cancelled {
    background: #fee;
    border: 2px solid #e74c3c;
    color: #c0392b;
}

.wpem-event-alert.wpem-status-postponed {
    background: #fef8e7;
    border: 2px solid #f39c12;
    color: #d68910;
}

.wpem-event-alert.wpem-status-sold_out {
    background: #ecf0f1;
    border: 2px solid #95a5a6;
    color: #7f8c8d;
}

.wpem-event-details {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpem-event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.wpem-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wpem-meta-icon {
    color: #0073aa;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.wpem-meta-content {
    flex: 1;
}

.wpem-meta-content strong {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpem-meta-content span,
.wpem-meta-content a {
    font-size: 16px;
    color: #333;
}

.wpem-meta-content a {
    color: #0073aa;
    text-decoration: none;
}

.wpem-meta-content a:hover {
    text-decoration: underline;
}

.wpem-event-description {
    margin-bottom: 30px;
    line-height: 1.8;
    font-size: 16px;
}

.wpem-event-gallery {
    margin: 30px 0;
}

.wpem-event-gallery h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.wpem-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.wpem-gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wpem-gallery-item:hover {
    transform: scale(1.05);
}

.wpem-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wpem-event-categories {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    font-size: 14px;
}

.wpem-event-categories strong {
    margin-right: 10px;
}

.wpem-event-categories a {
    color: #0073aa;
    text-decoration: none;
}

.wpem-event-categories a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Archive & Filters
   ========================================================================== */

.wpem-filters {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.wpem-filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

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

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

.wpem-filter-item select:focus,
.wpem-filter-item input[type="date"]:focus {
    outline: none;
    border-color: #0073aa;
}

.wpem-filter-buttons {
    display: flex;
    gap: 10px;
}

.wpem-filter-submit {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

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

.wpem-filter-reset {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.wpem-filter-reset:hover {
    background: #e0e0e0;
}

.wpem-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}

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

@media (max-width: 768px) {
    .wpem-event-meta {
        grid-template-columns: 1fr;
    }
    
    .wpem-filters-form {
        grid-template-columns: 1fr;
    }
    
    .wpem-calendar-weekdays,
    .wpem-calendar-days {
        gap: 5px;
    }
    
    .wpem-weekday {
        font-size: 12px;
        padding: 5px 0;
    }
    
    .wpem-calendar-day {
        padding: 5px;
    }
    
    .wpem-day-number {
        font-size: 12px;
    }
    
    .wpem-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}


/* ==========================================================================
   Event Details Page
   ========================================================================== */
.wpem-single-wrapper {
    padding: 40px 0;
}

.wpem-single-article {
    background: #fff;
}

.wpem-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.wpem-single-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0073aa;
}

.wpem-single-title {
    font-size: 38px;
    line-height: 1.3;
    margin: 0;
    color: #333;
}

.wpem-single-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.wpem-event-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.wpem-nav-previous,
.wpem-nav-next {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.wpem-nav-previous:hover,
.wpem-nav-next:hover {
    background: #f0f0f0;
}

.wpem-nav-next {
    text-align: right;
}

.wpem-nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.wpem-nav-previous a,
.wpem-nav-next a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.wpem-nav-previous a:hover,
.wpem-nav-next a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .wpem-single-title {
        font-size: 28px;
    }
    
    .wpem-event-navigation {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wpem-nav-next {
        text-align: left;
    }
}
