:root {
    --ass-red: #dc3545 !important;
    --ass-green: #28a745 !important;
    --ass-border: #dee2e6;
}

.ass-modal-overlay {
    width: 100% !important;
    margin-top: 20px !important;
    position: relative !important;
    z-index: 10 !important;
}

.ass-modal-content {
    background: #fff;
    width: 100%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    border-top: 10px solid #a4b0a6;
}

.ass-modal-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.ass-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.ass-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.ass-modal-close:hover {
    color: #dc3545;
}

.ass-modal-body {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    padding: 20px;
    background: #f1f1f1;
}

.ass-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 20px;
    border-top: 1px solid var(--ass-border);
}

/* Accordion & Workflow Styles */
.ass-accordion-section {
    border-bottom: 1px solid var(--ass-border);
    background: #fff;
    transition: all 0.3s ease;
}

.ass-accordion-section.active .ass-accordion-header {
    background: var(--ass-bg-light);
}

.ass-accordion-header {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    background: #fff;
    color: #333;
}

.ass-step-number {
    width: 28px;
    height: 28px;
    background: var(--ass-red);
    color: #fff;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.ass-accordion-content {
    padding: 0 20px 20px 20px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
}

.ass-collapse {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    border-bottom: none;
}

.ass-collapse.show {
    max-height: 2000px; /* Large enough to hold the map */
    opacity: 1;
    pointer-events: auto;
    border-bottom: 1px solid var(--ass-border);
}

.ass-date-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ass-summary {
    font-size: 1.1rem;
    color: #444;
}

/* Base Canvas / Interactive Elements */
#ass-dynamic-canvas-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    container-type: inline-size;
    container-name: ass-map;
}

.ass-front-zone {
    position: absolute;
    padding: 4px;
    background-color: var(--ass-red);
    opacity: 0.85;
    color: white;
    border: 1px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
}

.ass-front-zone:hover {
    background-color: rgba(255, 152, 0, 0.9);
    transform: scale(1.05);
}

.ass-front-zone .zone-name {
    font-size: clamp(7px, 1.5cqi, 13px);
    font-weight: bold;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1;
    width: 100%;
}

.ass-front-zone .zone-price {
    display: block;
    font-size: clamp(6px, 1.2cqi, 11px);
    font-weight: bold;
    margin-top: 2px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .ass-front-zone {
        padding: 1px;
    }
    .ass-front-zone .zone-name {
        -webkit-line-clamp: 1;
        line-height: 1;
    }
    .ass-front-zone .zone-price {
        margin-top: 0;
    }
}

/* Seat Matrix Layout */
.ass-grid-view {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ass-grid-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.ass-btn-back {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ass-btn-back:hover {
    background: #e9ecef;
}

.ass-btn-back i {
    margin-right: 5px;
}

.ass-grid-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: bold;
}

.ass-matrix-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
}

.ass-layout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.ass-stage-direction {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
}

.ass-down-arrow {
    width: 20px;
    height: 40px;
    position: relative;
    border-left: 4px solid #bbb;
    transition: transform 0.3s;
}

.ass-down-arrow::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: -12px;
    border-top: 12px solid #bbb;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

.ass-stage-block {
    width: 80%;
    max-width: 600px;
    background: #444;
    color: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base Seat Curve (Facing UP by default, flat bottom = stage at bottom) */
.ass-front-row {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.ass-front-seat {
    width: var(--ass-seat-size);
    height: var(--ass-seat-size);
    margin: 3px;
    background-color: var(--ass-color-available);
    /* Free Seat */
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px 12px 0 0; 
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s, border-radius 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ass-front-seat-icon {
    font-size: 0.8em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Row and Column Labels */
.ass-row-label {
    width: var(--ass-seat-size);
    height: var(--ass-seat-size);
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #888;
    user-select: none;
}

.ass-col-label {
    width: var(--ass-seat-size);
    height: var(--ass-seat-size);
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #555;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    user-select: none;
}

.ass-corner-label {
    width: var(--ass-seat-size);
    height: var(--ass-seat-size);
    margin: 3px;
}

/* =========================================
   ORIENTATION: STAGE BOTTOM (Default)
   ========================================= */
.stage-bottom .ass-layout-container { flex-direction: column; }
.stage-bottom .ass-stage-block { margin-top: 20px; margin-bottom: 0; }
.stage-bottom .ass-down-arrow { transform: rotate(0deg); }
.stage-bottom .ass-front-seat { border-radius: 12px 12px 0 0; }

/* =========================================
   ORIENTATION: STAGE TOP
   ========================================= */
.stage-top .ass-layout-container { flex-direction: column-reverse; }
.stage-top .ass-stage-block { margin-bottom: 20px; margin-top: 0; }
.stage-top .ass-down-arrow { transform: rotate(180deg); }
.stage-top .ass-front-seat { border-radius: 0 0 12px 12px; }

/* =========================================
   ORIENTATION: STAGE LEFT
   ========================================= */
.stage-left .ass-layout-container { flex-direction: row-reverse; justify-content: center; align-items: center; }
.stage-left .ass-matrix-wrapper { flex-direction: column; width: auto; }
.stage-left .ass-stage-direction { padding: 5px 0; flex-direction: row; }
.stage-left .ass-stage-block { width: 60px; height: auto; min-height: 150px; margin: 0 20px 0 0; writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; }
.stage-left .ass-down-arrow { transform: rotate(90deg); }
.stage-left .ass-front-seat { border-radius: 0 12px 12px 0; }

/* =========================================
   ORIENTATION: STAGE RIGHT
   ========================================= */
.stage-right .ass-layout-container { flex-direction: row; justify-content: center; align-items: center; }
.stage-right .ass-matrix-wrapper { flex-direction: column; width: auto; }
.stage-right .ass-stage-direction { padding: 5px 0; flex-direction: row; }
.stage-right .ass-stage-block { width: 60px; height: auto; min-height: 150px; margin: 0 0 0 20px; writing-mode: vertical-rl; text-orientation: mixed; display: flex; align-items: center; justify-content: center; }
.stage-right .ass-down-arrow { transform: rotate(-90deg); }
.stage-right .ass-front-seat { border-radius: 12px 0 0 12px; }

.ass-front-seat:hover {
    transform: scale(1.15);
    background-color: #66BB6A;
}

.ass-front-seat.gap {
    visibility: hidden;
    cursor: default;
}

.ass-front-seat.selected {
    background-color: var(--ass-color-selection) !important;
    border-color: #E64A19 !important;
    cursor: not-allowed;
    opacity: 0.9;
}

.ass-front-seat.occupied {
    background-color: var(--ass-color-occupied) !important;
    /* Booked Seat */
    border-color: #757575 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.ass-front-seat.occupied:hover {
    transform: none;
}

.ass-front-seat.reserved {
    background-color: var(--ass-color-reserved, #FFC107) !important;
    border-color: var(--ass-color-reserved, #FFA000) !important;
    cursor: not-allowed;
    opacity: 0.9;
}

.ass-front-seat.reserved:hover {
    transform: none;
}

.ass-front-seat.partially-reserved {
    background: repeating-linear-gradient(
        45deg,
        var(--ass-color-available),
        var(--ass-color-available) 4px,
        var(--ass-color-partial-secondary) 4px,
        var(--ass-color-partial-secondary) 8px
    ) !important;
    background-color: var(--ass-color-partial-secondary) !important;
    border-color: #EF6C00 !important;
}

/* Date Selector Styling */
.ass-date-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.2s;
    border: 2px solid var(--ass-red) !important;
    background: transparent !important;
    color: var(--ass-red) !important;
    cursor: pointer;
}

.ass-date-btn:hover {
    background: #fff5f5 !important;
}

.ass-date-btn.active {
    background: var(--ass-green) !important;
    border-color: var(--ass-green) !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.4) !important;
}

/* Map Legend / Conventions */
/* Map Legend / Conventions */
#ass-legend {
    display: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 10px !important;
    padding: 15px !important;
    background: #fdfdfd !important;
    border-radius: 12px !important;
    border: 1px solid #eeeeee !important;
    margin: 20px auto !important;
    max-width: 500px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#ass-legend.visible {
    display: grid !important;
}

@media (min-width: 768px) {
    #ass-legend.visible {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 25px !important;
        max-width: none !important;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.legend-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-box.available {
    background-color: var(--ass-color-available);
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-box.occupied {
    background-color: var(--ass-color-occupied);
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-box.partially-occupied {
    background: repeating-linear-gradient(
        45deg,
        var(--ass-color-available),
        var(--ass-color-available) 4px,
        var(--ass-color-partial-secondary) 4px,
        var(--ass-color-partial-secondary) 8px
    );
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #444;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Table Styles in Frontend */
.ass-front-seat.is-table {
    width: var(--ass-table-size) !important;
    height: var(--ass-table-size) !important;
    border-radius: 4px !important;
    margin: 10px !important;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ass-front-seat.is-table,
.ass-front-seat.is-table.square,
.ass-front-seat.is-table.round {
    width: var(--ass-table-size) !important;
    height: var(--ass-table-size) !important;
    min-width: var(--ass-table-size) !important;
    min-height: var(--ass-table-size) !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ass-front-seat.is-table.round {
    border-radius: 50% !important;
}

.ass-table-label {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-top: 4px;
    word-break: break-all;
    max-width: 90%;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.ass-front-seat.is-table:hover {
    transform: scale(1.1);
}

.ass-front-seat.is-table.selected {
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.6);
}

/* Alignment for Table Grid Labels */
.is-table-matrix .ass-col-label,
.is-table-matrix .ass-corner-label {
    width: 60px !important;
    height: 30px !important;
    margin: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.is-table-matrix .ass-row-label {
    width: 30px !important;
    height: 60px !important;
    margin: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Back Button and Grid Header */
.ass-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    padding: 10px 0 20px 0;
    border-bottom: 2px solid #f1f1f1;
}

.ass-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #dddddd;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ass-btn-back:hover {
    background-color: #f8f9fa;
    border-color: #bbbbbb;
    color: #000;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ass-btn-back i {
    font-size: 1.1rem;
    color: #4CAF50; /* Primary brand color */
}

.ass-grid-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #2c3e50;
    text-align: right;
}

@media (max-width: 768px) {
    .ass-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .ass-grid-title {
        text-align: left;
    }
}