/**
 * TAV Event Ticketing - Frontend Seat Map Styles
 */

.tav-seat-map-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.tav-seat-map-header {
    background-color: #f5f5f5;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.tav-seat-map-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.tav-seat-map-wrapper {
    position: relative;
    width: 100%;
    background-color: #fff;
    overflow: auto;
}

.tav-seat-map {
    position: relative;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
}

.tav-seat {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease;
}

.tav-seat:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.tav-seat.selected {
    box-shadow: 0 0 0 3px #3498db;
    z-index: 100;
}

.tav-seat.available {
    border: 2px solid #2ecc71;
}

.tav-seat.reserved {
    border: 2px solid #e67e22;
    cursor: not-allowed;
}

.tav-seat.sold {
    border: 2px solid #c0392b;
    cursor: not-allowed;
    opacity: 0.7;
}

.tav-seat.inactive {
    border: 2px solid #7f8c8d;
    cursor: not-allowed;
    opacity: 0.5;
}

.tav-seat-category-standard {
    background-color: #3498db;
}

.tav-seat-category-vip {
    background-color: #e74c3c;
}

.tav-seat-category-disabled {
    background-color: #f1c40f;
}

.tav-seat-map-footer {
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tav-seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tav-legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 8px;
}

.tav-legend-color {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    margin-right: 8px !important;
}

.tav-legend-label {
    font-family: inherit;
    font-size: 14px !important;
    color: #333 !important;
}

.tav-legend-price {
    color: #666 !important;
    font-size: 12px !important;
    margin-left: 4px !important;
}

.tav-seat-controls {
    display: flex;
    gap: 10px;
}

.tav-selected-seats {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
}

.tav-selected-seats h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.tav-selected-seats-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.tav-selected-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.tav-selected-seat-item:last-child {
    border-bottom: none;
}

.tav-category-header {
    background-color: #f5f5f5;
    padding: 8px 10px;
    margin-top: 5px;
    font-weight: normal;
    border-bottom: 1px solid #eee;
}

.tav-no-seats-selected {
    padding: 15px;
    text-align: center;
    color: #777;
    font-style: italic;
}

.tav-seat-label {
    font-weight: bold;
}

.tav-seat-cat-price {
    color: #666;
    margin-left: 5px;
}

.tav-remove-seat {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
}

.tav-remove-seat:hover {
    color: #e74c3c;
}

.tav-seat-map-zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.tav-zoom-btn {
    width: 30px;
    height: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.tav-zoom-btn:hover {
    background-color: #f5f5f5;
}

.tav-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 10px 0;
}

.tav-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    color: white;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.tav-message-success {
    background-color: #2ecc71;
}

.tav-message-error {
    background-color: #e74c3c;
}

.tav-message-info {
    background-color: #3498db;
}

/* Responsive styles */
@media (max-width: 768px) {
    .tav-seat-map-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .tav-seat-legend {
        justify-content: center;
    }
    
    .tav-seat-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .tav-seat-controls button {
        width: 100%;
    }
    
    .tav-legend-items {
        flex-direction: column !important;
    }
    
    .tav-legend-item {
        margin-right: 0 !important;
    }

    /* Responsive container for mobile */
    .tav-seat-map-container {
        max-width: 100vw;
        width: 100%;
        margin: 8px 0;
        border-radius: 3px;
    }
}


.tav-seat-label-text {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

/* Styles for fullscreen map functionality */

/* Styles for when the body has a fullscreen map active */
body.tav-map-fullscreen-body-active {
    overflow: hidden !important; /* Prevent scrolling of the page */
}

/* Styles for the map container when in fullscreen mode */
.tav-seat-map-container.tav-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;  /* Use viewport width */
    height: 100vh !important; /* Use viewport height */
    z-index: 1000 !important; /* Ensure it's on top of other content, adjust if needed */
    background-color: #ffffff !important; /* A default background, can be adjusted by your theme */
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* Hide shopping cart bar in fullscreen mode */
.tav-seat-map-container.tav-fullscreen-active .tav-selection-info {
    display: none !important;
}

/* Ensure the wrapper inside the fullscreen container also expands */
.tav-seat-map-container.tav-fullscreen-active .tav-venue-image-wrapper {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important to prevent internal scrollbars if content overflows due to JS sizing */
}

/* Adjust controls position in fullscreen to be more accessible */
.tav-seat-map-container.tav-fullscreen-active .tav-map-controls {
    right: 20px !important;
    bottom: 100px !important;
    z-index: 1005 !important; /* Above the map scene */
}

/* Styling for the selection info/cart section in fullscreen */
.tav-seat-map-container.tav-fullscreen-active .tav-selection-info {
    position: absolute !important;
    bottom: 15px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 30vh !important; /* Limit height to 30% of viewport height */
    overflow-y: auto !important;
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 1001 !important; /* Above map, below controls if they are at bottom */
    box-shadow: 0 -3px 10px rgba(0,0,0,0.15) !important;
    margin-top: 0 !important;
    border-top: 1px solid #ccc !important;
    border-radius: 5px 5px 0 0 !important; /* Optional: rounded corners at the top */
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* Adjust legend in fullscreen mode */
.tav-seat-map-container.tav-fullscreen-active .tav-seat-legend {
    position: absolute !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1001 !important; /* Same as selection info, or slightly higher/lower based on preference */
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 8px 15px !important;
    font-size: 0.9em; /* Slightly smaller font in fullscreen if needed */
    box-shadow: 0 3px 10px rgba(0,0,0,0.15) !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #ccc !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px 15px !important; /* Adjust gap for better spacing */
}

.tav-seat-map-container.tav-fullscreen-active .tav-seat-legend .tav-legend-item {
    font-size: 12px; /* Adjust if necessary */
}


/* Styles for the fullscreen button itself */
.tav-fullscreen-toggle-btn {
    /* Styles are mostly defined in JS, you can add hover/active states here */
    transition: background-color 0.2s ease;
}

.tav-fullscreen-toggle-btn:hover {
    background-color: #e9e9e9 !important; /* Light gray hover */
}

.tav-fullscreen-toggle-btn span {
    display: inline-block;
    line-height: 1;
} 

html, body, .tav-seat-map-container, .tav-seat-map-outer {
  height: 100%;
  min-height: 100vh;
}
.tav-seat-map-container {
  display: flex;
  flex-direction: column;
}
@media (max-width: 400px) {
  .tav-seat-map-container {
    min-height: 150px !important;
  }
}
.tav-seat-map-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
}
@media (max-width: 400px) {
  .tav-seat-map-wrapper {
    min-height: 150px !important;
  }
} 