/* WooCommerce Events Manager - Frontend Styles */

/* Booking Form */
.wem-booking-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wem-booking-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.wem-booking-field {
    margin-bottom: 15px;
}

.wem-booking-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wem-booking-field .required {
    color: #e74c3c;
}

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

.wem-booking-field textarea {
    resize: vertical;
}

.wem-loading-times {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Booking Modal Styles */
.wem-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.wem-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.wem-modal-content {
    position: relative;
    background: #fff;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.wem-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wem-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.wem-modal-close {
    background: none;
    border: none;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: #999;
}

.wem-modal-close:hover {
    color: #333;
}

.wem-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.wem-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.wem-modal-open {
    overflow: hidden;
}

/* Progress Indicator */
.wem-booking-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.wem-booking-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.wem-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.wem-progress-step .step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.wem-progress-step .step-label {
    display: block;
    font-size: 0.85em;
    color: #999;
}

.wem-progress-step.active .step-number {
    background: #0073aa;
}

.wem-progress-step.active .step-label {
    color: #0073aa;
    font-weight: 600;
}

.wem-progress-step.completed .step-number {
    background: #46b450;
}

.wem-progress-step.completed .step-label {
    color: #46b450;
}

/* Form Styles */
.wem-booking-step {
    min-height: 300px;
}

.wem-booking-step h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.wem-form-group {
    margin-bottom: 20px;
}

.wem-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.wem-form-group .required {
    color: #dc3232;
}

.wem-select,
.wem-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wem-select:focus,
.wem-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.wem-availability-info {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9em;
    color: #666;
}

/* Seat Picker */
.wem-seat-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.wem-seat {
    padding: 10px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.wem-seat.available:hover {
    border-color: #0073aa;
    background: #f0f9ff;
}

.wem-seat.selected {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.wem-seat.unavailable {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* Menu Choices */
.wem-guest-menu {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.wem-guest-menu h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0073aa;
}

/* Review Section */
.wem-booking-review {
    max-width: 600px;
}

.wem-review-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.wem-review-section:last-child {
    border-bottom: none;
}

.wem-review-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0073aa;
}

.wem-review-section p {
    margin: 8px 0;
    color: #333;
}

.wem-review-total {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.wem-total-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #0073aa;
}

.wem-guest-menu-review {
    margin-bottom: 10px;
}

/* Buttons */
.wem-btn-primary,
.wem-btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.wem-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.wem-btn-secondary:hover {
    background: #ddd;
}

/* Loading Spinner */
.wem-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.wem-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .wem-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .wem-modal-header,
    .wem-modal-body,
    .wem-modal-footer {
        padding: 15px 20px;
    }
    
    .wem-booking-progress {
        flex-wrap: wrap;
    }
    
    .wem-progress-step {
        flex-basis: 20%;
        margin-bottom: 10px;
    }
    
    .wem-progress-step .step-label {
        font-size: 0.7em;
    }
    
    .wem-seat-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
}

/* Carousel */
.wem-bookings-carousel-wrapper {
    margin: 20px 0;
    position: relative;
}

.swiper {
    padding: 10px 0;
}

.swiper-button-next,
.swiper-button-prev {
    color: #333;
}

.swiper-pagination-bullet-active {
    background: #333;
}

/* Arrow Positioning - Top Right */
.wem-arrows-top-right .swiper-button-next,
.wem-arrows-top-right .swiper-button-prev {
    top: -50px;
    bottom: auto;
}

.wem-arrows-top-right .swiper-button-prev {
    right: 60px;
    left: auto;
}

.wem-arrows-top-right .swiper-button-next {
    right: 10px;
    left: auto;
}

/* Booking Card */
.wem-booking-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wem-booking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.wem-booking-image {
    overflow: hidden;
    position: relative;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
}

.wem-booking-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wem-booking-card:hover .wem-booking-image img {
    transform: scale(1.05);
}

.wem-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 3em;
}

/* Match Height Feature */
.wem-match-height .swiper-wrapper {
    align-items: stretch;
}

.wem-match-height .swiper-slide {
    height: auto;
    display: flex;
}

.wem-match-height .wem-booking-card {
    width: 100%;
}

.wem-booking-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wem-booking-title {
    margin: 0 0 10px;
    font-size: 1.2em;
    line-height: 1.3;
}

.wem-booking-title a {
    color: #333;
    text-decoration: none;
}

.wem-booking-title a:hover {
    color: #007bff;
}

.wem-booking-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.wem-booking-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.wem-booking-excerpt {
    color: #666;
    margin-bottom: 15px;
    flex: 1;
}

.wem-booking-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 15px;
}

.wem-booking-actions {
    margin-top: auto;
}

.wem-book-now {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    text-align: center;
}

.wem-book-now:hover {
    background: #0056b3;
}

/* Full Width Button */
.wem-button-full .wem-book-now {
    display: block;
    width: 100%;
}

/* Grid Layout */
.wem-bookings-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.wem-columns-1 { grid-template-columns: 1fr; }
.wem-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wem-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wem-columns-4 { grid-template-columns: repeat(4, 1fr); }
.wem-columns-5 { grid-template-columns: repeat(5, 1fr); }
.wem-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
    .wem-columns-4,
    .wem-columns-5,
    .wem-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wem-columns-3,
    .wem-columns-4,
    .wem-columns-5,
    .wem-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wem-bookings-grid {
        grid-template-columns: 1fr;
    }
}

/* List Layout */
.wem-bookings-list {
    margin: 20px 0;
}

.wem-list-item {
    margin-bottom: 20px;
}

.wem-layout-list {
    display: flex;
    gap: 20px;
}

.wem-layout-list .wem-booking-image {
    flex: 0 0 200px;
    padding-bottom: 0;
    height: 150px;
}

.wem-layout-list .wem-booking-content {
    flex: 1;
}

/* Single Booking Template */
.wem-single-booking-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin: 40px 0;
}

.wem-booking-image-gallery img {
    width: 100%;
    border-radius: 8px;
}

.wem-booking-title {
    font-size: 2em;
    margin-bottom: 20px;
}

.wem-booking-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.wem-meta-label {
    font-weight: 600;
    color: #666;
}

.wem-booking-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
    margin: 20px 0;
}

.wem-booking-features {
    margin: 30px 0;
}

.wem-booking-features h3 {
    margin-bottom: 15px;
}

.wem-booking-features ul {
    list-style: none;
    padding: 0;
}

.wem-booking-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.wem-booking-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.wem-booking-form-container,
.wem-cancellation-policy,
.wem-need-help {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wem-booking-form-container h3 {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .wem-single-booking-container {
        grid-template-columns: 1fr;
    }
    
    .wem-booking-sidebar {
        position: static;
    }
}

/* Booking Info in Orders */
.wem-booking-info {
    margin: 10px 0;
    padding: 10px;
    background: #f0f8ff;
    border-left: 3px solid #007bff;
}

/* Responsive */
@media (max-width: 768px) {
    .wem-booking-form {
        padding: 15px;
    }
    
    .wem-layout-list {
        flex-direction: column;
    }
    
    .wem-layout-list .wem-booking-image {
        flex: 0 0 auto;
        padding-bottom: 66.67%;
        height: auto;
    }
}

/* Single Event Display */
.wem-single-event-display {
    max-width: 1200px;
    margin: 0 auto;
}

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

.wem-event-image img {
    width: 100%;
    height: auto;
}

.wem-event-title {
    font-size: 2.5em;
    margin: 0 0 20px;
    line-height: 1.2;
}

.wem-event-meta-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.wem-event-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
}

.wem-event-meta .wem-icon {
    font-size: 1.2em;
}

.wem-event-price {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
    margin: 20px 0;
}

.wem-event-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.wem-event-booking-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .wem-event-title {
        font-size: 1.8em;
    }
    
    .wem-event-meta-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .wem-event-price {
        font-size: 1.5em;
    }
    
    .wem-event-booking-form {
        padding: 20px;
    }
}

/* Individual Event Widgets */
.wem-event-location-widget,
.wem-event-date-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wem-event-price-widget {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.wem-event-price-widget .prefix {
    font-size: 0.7em;
    opacity: 0.8;
}

.wem-event-image-widget {
    display: block;
}

.wem-event-image-widget img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.wem-event-description-widget {
    line-height: 1.6;
}

.wem-event-book-button-widget .wem-book-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.wem-event-book-button-widget .wem-book-button.full-width {
    width: 100%;
    display: flex;
    justify-content: center;
}

.wem-event-book-button-widget .wem-book-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}
