:root {
    --primary-gradient: linear-gradient(135deg, #000000, #884499, #000000);
    --secondary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --success-color: #27ae60;
    --error-color: #bb1100; /* #e74c3c; */
    --warning-color: #f39c12;
    --info-color: #3498db;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --bg-light: #202020;
    --border-color: #404040;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --header-height: 0px;
    --dynamic-padding-top: 10px;
    --dynamic-zoom-top: 10px;
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans Armenian", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background-color: #2D2D2D;
    color: var(--text-primary);
    /* Allow vertical scrolling but prevent zoom gestures */
    touch-action: pan-y;
}

.main-layout {
    min-height: 100vh;
    /*background: rgba(220, 210, 210, 0.9);*/
}
.event-header {
    width: 90%;
    position: relative;
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);

    background: #ccc;
    padding: 0 2px 2px 2px;
    clip-path: polygon(0.8% 0%, 99.2% 0%, 90% 100%, 100% 100%, 0% 100%, 0% 100%, 10% 100%);
}
.event-header-inner {
    /*background: rgba(250, 250, 250, 0.1);*/
    color: #fff; /*#330000; rgb(30, 0, 0); */
    padding: 10px 0;
    /*border-radius: 0 0 50px 50px;
    margin: 0 25px;*/
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /*border: 2px solid #330000;*/
    border-top: 0;
    /*position: fixed;*/
    
    z-index: 500;
    
    /*new*/
    background: #2D2D2D;
    clip-path: polygon(0% 0%, 100% 0%, 90% 100%, 100% 100%, 0% 100%, 0% 100%, 10% 100%);   
}

.logo-container {
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: 2em;
    margin-top: 10px;
}

.theater-logo {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.theater-logo:hover {
    filter: brightness(0) invert(1) opacity(0.8);
}

/* Only hide confirmation page header initially for loading sequence */
.confirmation-header {
    visibility: hidden;
}

.header-content {
    text-align: center;
    margin: auto;
}

.header-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loader-text {
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: 500;
}

.header-data {
    /* Will be shown after data loads */
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #202020;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-left: 6px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 10px;
    width: 80%;
}

.zoom-out-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    border: 0;
    /* border-radius: 10px; */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    clip-path: polygon(5px 0%, calc(100% - 5px) 0%, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0% calc(100% - 5px), 0% 5px);
}

.zoom-out-btn:hover {
    background: rgb(160 150 150 / 100%);
    /*transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);*/
}

.zoom-out-btn:active {
    transform: scale(0.95);
}

.legend {
    margin: 5px;
}

.lmenu {
    margin: 5px;
    display: none;
    /*display: flex;*/
    flex-direction: column;
    gap: 5px;
}

.legend-btn {
    background: rgb(255 255 255 / 100%);/*rgb(33 0 0 / 20%); rgba(255, 255, 255, 0.2); */
    color: rgba(0, 40, 110, 0.5);  
    border: 0;
    padding: 7px 13px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: 0.3s;
}
/*
.legend-btn:hover {
    background: rgb(160 150 150 / 100%); /*rgb(33 0 0 / 30%); rgba(255, 255, 255, 0.3); 
}
*/
.back-button-container {
    margin: 0;
}

.back-btn-nav {
    background: rgb(255 255 255 / 100%);
    color: rgba(0, 40, 110, 0.5); /* #330000; */
    border: 0;
    padding: 7px 13px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
/*
.back-btn-nav:hover {
    background: rgb(160 150 150 / 100%);
}
*/
.back-btn-nav img {
    width: 16px;
    height: 16px;
    /*filter: invert(12%) sepia(100%) saturate(7500%) hue-rotate(4deg) brightness(88%) contrast(134%);*/
    filter: invert(7%) sepia(86%) saturate(3002%) hue-rotate(222deg) brightness(97%) contrast(100%);
    opacity: 0.5;
}

.event-header h1 {
    font-size: 1.25em;
    margin: 10px auto;
    display: inline-block;
}

.event-header p {
    font-size: 1.1em;
    margin: 10px;
    display: inline-block;
}
.stage {
    display: block;
    font-size: 2em;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 0.6em;
}

.language-toggle {
    /*display: none;*/
    display: flex;
    gap: 5px;
    margin: 5px;
    flex-direction: column;
    position: relative;
    align-items: end;
    min-width: 38px;
}

.lang-btn {
    background: rgb(255 255 255 / 100%);/* rgb(33 0 0 / 20%); */
    color: rgba(0, 40, 110, 0.5); /* #330000; */
    border: 0; /*1px solid rgba(255, 255, 255, 0.3);*/
    padding: 12px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.lang-btn:hover {
    background: rgb(160 150 150 / 100%);
}
.fa-globe {
    margin-top: 2px;
}
.globe-btn {
    font-size: 1em;
    padding: 10px 12px;
    transition: all 0.3s ease;
    position: absolute;
    display: none;
}

.globe-btn.hidden {
    display: none;
    /*opacity: 0;
    transform: scale(0.8);
    pointer-events: none;*/
}

.lang-option {
    /*position: absolute;*/
    top: 0;
    right: 0;
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    pointer-events: none;
}

.lang-option.hidden {
    display: none !important;
}

.lang-option.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
.lang-option.active {
    display: none;
    /*background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);*/
}

/* Modal Styles */
.select-seats-placeholder {
    font-size: 1.5em;
    font-weight: 600;
    padding-bottom: 5px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /*background-color: rgba(0, 0, 0, 0.5);*/
}

.modal-content {
    background-color: #202020;
    height: 100%;
    /*
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative; */
}

#legend-modal {
    width: 70%;
    left: 50%;
    transform: translateX(-50%);
    top: 15%;
    height: auto;
    font-size: 1.8em;
    font-weight: 600;
}

#legend-modal .modal-content {
    padding: 15px;
    border-radius: 20px;
    
}
.close {
    color: #aaa;
    float: right;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    position: fixed;
    right: 15px;
    top: 10px;
    padding: 2px 9px;
    background: white;
    border-radius: 5px;
}

.close:hover {
    color: black;
}

.legend-items {
    display: flex;
    flex-direction: column;
    /*gap: 10px;
    margin-top: -20px;*/
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    /*border-radius: 8px;
    background: #f8f9fa;*/
}

.legend-seat {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

#legend-content.legend-item.seat {
    width: 40px;
    height: 40px;
    margin: 5px 20px 5px 0;
    clip-path: polygon(0px 12px, 12px 0px, 28px 0px, 40px 12px, 40px 40px, 0px 40px);
}

.legend-text {
    font-size: 1em;
    color: var(--text-primary);
}

.legend-panel {
    border-radius: 15px;
    padding: 15px;
    margin: 20px auto;
    max-width: 700px;
    color: var(--text-primary);
    /* background: rgba(0, 0, 0, 0.4);
    border: 1px solid #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
}

.legend-panel-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.legend-panel .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    /* background: rgba(64, 64, 64, 0.6);
    border-radius: 6px;
    border: 1px solid #555;
    transition: background-color 0.2s ease; */
}

.legend-panel .legend-item:hover {
    background: rgba(80, 80, 80, 0.8);
}

.legend-panel .legend-seat {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    clip-path: polygon(0% calc(24px * 0.3), calc(24px * 0.3) 0%, calc(24px * 0.7) 0%, 100% calc(24px * 0.3), 100% 100%, 0% 100%);
}

.legend-panel .legend-text {
    font-size: 0.85em;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive adjustments for legend panel */
@media (max-width: 768px) {
    .legend-panel {
        margin: 15px auto;
        padding: 12px;
        max-width: 95%;
    }

    .legend-panel-items {
        gap: 8px;
    }

    .legend-panel .legend-item {
        padding: 4px 8px;
        gap: 6px;
    }

    .legend-panel .legend-seat {
        width: 20px;
        height: 20px;
        clip-path: polygon(0px 6px, 6px 0px, 14px 0px, 20px 6px, 20px 20px, 0px 20px);
    }

    .legend-panel .legend-text {
        font-size: 1em;
        font-weight: 600;
    }

    .personal-details-payment-methods {
        margin: 20px auto 15px;
        padding: 12px;
        gap: 15px;
        max-width: 95%;
    }

    /* Disable all transitions on seats for mobile to prevent flickering and unwanted animations */
    .seat, .seat:hover, .seat:active, .seat:focus {
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Improve rendering stability during dragging on mobile - Safari optimized */
    .seating-area.dragging {
        will-change: transform;
        /* Force hardware acceleration for Safari stability */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        /* Safari-specific hardware acceleration */
        -webkit-perspective: 1000px;
        perspective: 1000px;
        /* Prevent flickering during transforms */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Ensure seats remain visible during transforms */
    .seating-area.dragging .seat {
        will-change: auto;
        /* Safari-specific visibility fixes */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        /* Prevent flickering */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}


.seating-container {
    position: relative;
    overflow: visible;
    padding: 30px 30px 0;
    max-height: 600px;
}

.seating-container.zoomed {
    height: 85vh;
}

.seating-area {
    position: relative;
    /* Removed transform-origin that can cause Safari issues */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: grab;
    /* Allow panning but prevent zoom on the seating area */
    touch-action: pan-x pan-y;
    /* Prevent Safari flickering during transforms */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Initial zoomed-out transform */
    transform: translate(0px, -150px) scale(0.6);
}


.seating-area.zoomed {
    cursor: grab;
}

.seating-area.dragging {
    cursor: grabbing;
    /* Disable transition during dragging for instant response */
    transition: none;
}

.main-seating {
    margin-top: 30px;
}

.amph {
    margin-top: 40px;
}

.section-title {
    text-align: center;
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
    display: none;
}

.row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.row-label {
    width: 25px;
    text-align: center;
    font-weight: bold;
    color: var(--text-secondary);
    margin: 2px;
    flex: 0 0 auto;
    line-height: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    /*display: none;*/
    width: 20px;
    font-size: 1.2em;
    padding: 0 20px;
}
div.amph div.row:nth-of-type(4) div.row-label {
    display: none;
}
.seat {
    width: clamp(10px, min(3vw, 40px), 40px);
    height: clamp(10px, min(3vw, 40px), 40px);
    margin: clamp(1px, min(calc(100vw / 120), 5px), 5px);
    background: var(--info-color);
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: bold;
    color: white;
    --seat-size: clamp(10px, min(3vw, 40px), 40px);
    clip-path: polygon(0% calc(var(--seat-size) * 0.3), calc(var(--seat-size) * 0.3) 0%, calc(var(--seat-size) * 0.7) 0%, 100% calc(var(--seat-size) * 0.3), 100% 100%, 0% 100%);
    /* Crisp rendering for high-DPI displays */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Prevent subpixel rendering issues */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.seat::before {
    content: '';
    display: none;
}

.seat.available {
    background: var(--success-color);
}

.seat.available:hover {
    transform: scale(1.1);
    box-shadow: rgba(39, 174, 96, 0.4) 0px 4px 15px;
}

.seat.occupied {
    background: var(--error-color);
    cursor: pointer;
}

.seat.occupied:hover {
    transform: scale(1.1);
    box-shadow: rgba(231, 76, 60, 0.4) 0px 4px 15px;
}

.seat.reserved {
    background: var(--error-color); /*var(--warning-color);*/
    cursor: pointer;
}

.seat.reserved:hover {
    transform: scale(1.1);
    box-shadow: rgba(243, 156, 18, 0.4) 0px 4px 15px;
}

.seat.sold {
    /* background: var(--error-color) url('/img/cross.svg') no-repeat center 60%; */
    background-color: #444;
    
    /* background-size: 60%; */
    cursor: not-allowed;
}
/*
.seat.sold:hover {
    transform: scale(1.1);
    box-shadow: rgba(231, 76, 60, 0.4) 0px 4px 15px;
}
*/
.seat.partner-sold {
    background: #cc0033 url('/img/cross.svg') no-repeat center center;
    background-size: 60%;
    cursor: not-allowed;
}

.seat.partner-reserved {
    cursor: not-allowed;
    background: #ff7700 !important;
}

.seat.partner-sold:hover, .seat.partner-reserved:hover {
    transform: none;
    box-shadow: none;
}

.seat.selected {
    background: #F0F0F0; /*#884499;*/
}

.seat.blocked {
    opacity: 0.3;
    cursor: not-allowed;
}

.seat.blockedout {
    background: #495057;
    cursor: not-allowed;
    pointer-events: none;
}

.gap {
    width: clamp(10px, min(3vw, 40px), 40px);
    flex: 0 0 auto;
    margin: clamp(1px, min(calc(100vw / 320), 5px), 5px);
}
.gap-sm {
    width: clamp(0px, min(1.5vw, 19px), 19px);
    flex: 0 0 auto;
    margin: clamp(1.5px, min(0.3vw, 3px), 3px);
}
/*
.legend {
    display: none;
    justify-content: center;
    gap: 30px;
    margin: 0px 0px 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-primary);
}

.legend-seat {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}
*/
.legend-item .seat {
    width: 40px;
    height: 40px;
    clip-path: polygon(0px 12px, 12px 0px, 28px 0px, 40px 12px, 40px 40px, 0px 40px);
}

.action-panel {
    background: rgba(0, 0, 0, 0.4); /*rgba(250, 250, 250, 0.1);*/
    color: #fff;
    padding: 20px;
    text-align: center;
    display: none;
    width: fit-content;
    /*
    border-radius: 15px;
    border: 2px solid #330000;
    min-width: 300px;
    max-width: 70vw;*/
    clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0% calc(100% - 15px), 0% 15px);
    margin: 25px auto;
    z-index: 10;
    position: relative;

    /*
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1000;
    
    left: 50%;
    transform: translateX(-50%);*/
}

.seating-container.zoomed + .action-panel {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1000;
    clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0% calc(100% - 15px), 0% 15px);
    /*border-radius: 25px
    max-width: 90vw;*/
}

.action-panel.show {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 5px 30px;
    max-width: 520px;
}

.selected-seats {
    margin: 15px auto;
    font-size: 1em;
    /*min-width: 20em;*/
}

.selected-seats-list {
    margin-bottom: 10px;
}

.section-header {
    font-weight: bold;
    font-size: 1.3em;
    margin: 5px 10px 2px 10px;
    color: #fff;
    text-align: left;
}

.selected-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 10px;
    border-bottom: 0 /*1px solid rgba(255, 255, 255, 0.1);*/
}

.selected-seat-info {
    font-weight: normal;
    font-size: 1.25em;
    margin: 0 30px 0 0;
}

.selected-seat-price {
    color: #fff;
    font-weight: bold;
    font-size: 1.2em;
    letter-spacing: 0.5px;
}

.selected-seats-total {
    margin: 5px 0 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    padding: 5px 10px 0 0;
    text-align: right;
    display: none;
    letter-spacing: 0.5px;
}

.selected-seats-total.show {
    display: block;
}

.selected-seats-discount {
    margin: -12px 0px 0 0px;
    font-size: 1em;
    font-weight: bold;
    color: #77ee33;
    text-align: center;
    display: none;
}

.selected-seats-discount.show {
    display: block;
}

.confirmation-promo-discount {
    margin: 5px 0px 0 0px;
    font-size: 1em;
    font-weight: bold;
    color: #77ee33;
    text-align: center;
}

.selected-seats-summary {
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin: 10px 0;
}

.personal-details-form {
    /*margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(51, 0, 0, 0.2);*/
    margin: 10px;
    width: 85%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: bold;
    /* color: #330000; */
    margin-bottom: 5px;
}

.form-group label a {
    color: #ccc;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #404040;
    border-radius: 8px;
    font-size: 1em;
    background: #ccc; /*#303030;*/
    /*color: var(--text-primary);*/
    clip-path: polygon(7px 0%, calc(100% - 7px) 0%, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0% calc(100% - 7px), 0% 7px);
    /*transition: border-color 0.3s ease;*/
}

.form-group input:focus {
    outline: none;
    /*border-color: #330000;
    box-shadow: 0 0 0 2px rgba(51, 0, 0, 0.1);*/
}

.form-group input.invalid {
    border-color: #bb1100;
    /* background-color: #eeeeee; */
}
/*
.checkbox-group input[type="checkbox"].invalid {
    outline: none;
    display: inline;
    width: 6%;
}
*/
.checkbox-group {
    margin: 3px 0 0;
}
.checkbox-label {
    text-align: right;
}
#terms-agreement {
    outline: none;
    outline-offset: 0;
    display: inline;
    width: 7%;
    float: left;
    margin: 3px 0 0;
}

#terms-agreement:invalid {
    background-color: none;
}

.form-note {
    display: none;

    font-size: 0.8em;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 15px;
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    /*box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);*/
}

.checkout-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-buttons {
    margin: 0px auto; 
    /*margin: 15px 30px;*/
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    background: rgba(0, 100, 0, 1); /*rgba(0, 40, 110, 0.8);*/
    color: #fff;
    /*background: rgba(255, 255, 255, 1);
    color: #330000;*/
    border: none;
    padding: 15px 30px;
    font-size: 1.4em;
    clip-path: polygon(10px 0%, calc(100% - 10px) 0%, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0% calc(100% - 10px), 0% 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    /*display: inline-block;*/
    opacity: 1;
    transform: scale(1);
}
.reserve-btn {
    margin: 5px auto 10px;
}
.action-btn:hover:not(:disabled) {
    /*transform: translateY(-3px);
    box-shadow: rgba(160, 150, 150, 0.4) 0px 12px 35px;

    background: rgba(160, 150, 150, 1);*/
    background: #7F3F98;
}

.action-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.back-btn {
    /*background: rgba(160, 150, 150, 0.8);
    color: #330000;
    border: 2px solid #330000;*/
    background: rgba(240, 100, 35, 0.8);
    color: #fff;
}

.back-btn:hover:not(:disabled) {
    background: rgba(160, 150, 150, 1);
}

.payment-methods {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(33, 0, 0, 0.1);
}

.payment-icon {
    height: 25px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-icon:hover {
    opacity: 1;
}

/* Individual payment method icon classes */
.payment-icon-arca {
    height: 22px;
    width: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.payment-icon-visa {
    height: 25px;
    width: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.payment-icon-mc {
    height: 32px;
    width: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.personal-details-payment-methods {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px auto 0px;
    padding: 15px;
    background: #ccc; /* rgba(32, 32, 32, 0.95); */
    /* border-radius: 10px;
    border: 1px solid #404040; */
    max-width: 400px;
}


.seats-text-bold {
    font-weight: bold;
}

.pricing-tiers-enabled .seat.available:not(.selected).tier-a {
    background: #7F3F98; /*#388E3C;  #30e06e;*/
}

.pricing-tiers-enabled .seat.available:not(.selected).tier-b {
    background: #F26522; /*#009688; #26aeb7; */
}

.pricing-tiers-enabled .seat.available:not(.selected).tier-c {
    background: #ED0677; /*#4CAF50; var(--success-color); */
}

.pricing-tiers-enabled .seat.available:not(.selected).tier-d {
    background: #FFDE17; /*#9E9D24; #85a900; */
}

.pricing-tiers-enabled .seat.available:not(.selected).tier-e {
    background: #3155A6; /*#57CC99; #1a8054; */
}

@media (max-width: 1199px) {
    body {
        /*padding: 0 8px;*/
        /* Allow content to extend beyond viewport during transforms */
        overflow-x: visible;
    }

    .event-header {
        clip-path: polygon(1.5% 0%, 98.5% 0%, 90% 100%, 100% 100%, 0% 100%, 0% 100%, 10% 100%);
    }

    .logo-container {
        margin-left: 1em;
        margin-top: 0px;
    }
    .theater-logo {
        height: 20px;
    }

    .main-layout {
        padding: 0px;
    }
    .seating-container {
        padding: 10px;
        margin-top: 10px;
        /* Ensure content can extend beyond container for transforms */
        overflow: visible;
        /* Fixed height for zoomed-out view on mobile */
        height: 280px;
        /*padding-top: var(--dynamic-padding-top);*/
    }

    .amph {
        margin-top: 25px;
    }
    .row {
        margin-bottom: 2px;
    }
    .section-title {
        font-size: 1em;
        margin-bottom: 8px;
    }
    .main-seating {
        margin-bottom: 10px;
        margin-top: 5px;
    }
    .legend {
        gap: 12px;
        margin: 0;
        padding: 0px;
    }
    .legend-item {
        font-size: 0.75em;
        /*gap: 15px;*/
    }
    .legend-seat {
        width: 14px;
        height: 14px;
    }

    .legend-item .seat {
        width: 24px;
        height: 24px;
        clip-path: polygon(0px 7.2px, 7.2px 0px, 16.8px 0px, 24px 7.2px, 24px 24px, 0px 24px);
    }

    /* Ensure consistent seat rendering on mobile */
    .seat {
        width: 28px;
        height: 28px;
        margin: 3px;
        --seat-size: 28px;
        clip-path: polygon(0px 8.4px, 8.4px 0px, 19.6px 0px, 28px 8.4px, 28px 28px, 0px 28px);
        /* Enhanced crisp rendering for mobile */
        image-rendering: pixelated;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        /* Prevent Safari transform issues */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    .gap {
        width: 28px;
        margin: clamp(1px, min(calc(100vw / 120), 5px), 5px);   
    }
    .gap-sm {
        width: 14px;
        margin: clamp(1.5px, min(0.3vw, 3px), 3px);
    }

    /* High-DPI specific fixes */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        .seat {
            /* Force crisp edges on high-DPI displays */
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: none;
        }

        .seating-area {
            /* Improve transform rendering on high-DPI */
            -webkit-transform-style: flat;
            transform-style: flat;
        }
    }

    .seating-area {
        transform: translate(0px, -150px) scale(0.4);
    }

    @media (min-width: 1400px) {
        .seating-area {
            transform: scale(0.7);
        }
    }

    .action-panel {
        margin: 15px auto 5px;
        padding: 5px;
        border: 0;
        width: 85%
    }
    .selected-seats {
        width: fit-content;
        font-size: 0.8em;
        margin: 0;
        /*min-width: 20em;*/
    }
    .action-buttons {
        /* flex-direction: column;
        align-items: center;
        gap: 10px; */
        margin-top: 0;
        margin: 0;
    }
    .action-btn {
        padding: 12px 20px;
        font-size: .9em;
        width: 100%;
        max-width: 200px;
    }
    .event-header {
        margin: 0.5em 0em;
        width: 105%;
    }
    .event-header h1 {
        font-size: 1em;
        margin: 0px;
        padding: 0 5%;
    }
    .event-header p {
        font-size: 1em;
        margin: 5px 0 10px 0;
    }
    .stage {
        font-size: 1.25em;
        margin-top: 0.5em;
    }
    .language-toggle {
        margin: 0;
        padding: 0;
        min-width: 50px;
    }
    
    .lmenu {
        margin: 0;
        padding: 0;
    }
    
    .payment-methods {
        gap: 8px;
        margin-top: 10px;
    }
    
    .payment-icon {
        height: 20px;
    }
}
.confirmation-container {
    color: #eee; /*rgb(0, 40, 110);*/
    text-align: center;
    margin: 1em auto;
    /* Hide initially to prevent content flash during loading sequence */
    display: none;
}
.success-message {
    margin: 1.5em auto;
}
.success-message > p {
    font-size: 1.2em;
}
.order-details {
    /* margin: 1em .5em; */
    width: 90%;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    padding: 10px;
    /*border-radius: 25px;*/
    clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0% calc(100% - 15px), 0% 15px);
    max-width: 500px;
}
.order-details h2 {
    font-size: 1.5em;
}
#event-details {
    font-size: 1.2em;
    margin: 5px 5px 10px;
}
.order-items {
    /*max-width: 320px;*/
    margin: auto;
    margin-bottom: 5px;
}
.order-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.seat-info {
    text-align: left;
    font-size: 1.2em;
    margin-left: 10px;
}
.seat-price {
    margin: 0 10px 0 25px;
    text-align: right;
    font-size: 1.1em;
    font-weight: bold;
}
.promo-info {
    margin-top: 8px;
}
/*
.order-total {
    /*text-align: right;
    border-top: 1px solid rgba(33, 0, 0, 0.2);*
    padding: 4px 10px;
    font-size: 1.1em;
    margin: 3px 0;
}
*/
.next-steps {
    margin: 1em;
}

/* Only hide confirmation page next-steps initially for loading sequence */
.confirmation-next-steps {
    visibility: hidden;
    color: #aaa; /*rgb(0, 40, 110);*/
    text-align: center;
}
.next-steps h3 {
    font-size: 1.4em;
}

div.next-steps > ul {
    font-size: 1.1em;
    list-style: none;
    line-height: 1.2em;
}

div.next-steps > ul > li {
    padding: 4px;
}

.next-steps-info h3 {
    font-size: 1.4em;
}

.next-steps-info > ul {
    font-size: 1.1em;
    list-style: none;
    line-height: 1.2em;
}

.next-steps-info > ul > li {
    padding: 4px;
}

#download-all-btn, #email-tickets-btn {
    /*background: rgba(160, 150, 150, 1);*/
    margin: .5em 1em;
}

#download-all-btn {
    display: none !important;
}

.additional-actions {
    text-align: center;
}

#send-tickets-btn {
    margin-top: 8px;
}

#book-another-btn {
    /* background: rgb(225 215 215); */
    margin: 15px auto;
}

#email-form {
    /* margin-top: -22px; */
    max-width: 600px;
    margin: auto;
}

#email-input {
    width: 65%;
    margin: 10px auto 15px;
    padding: 10px;
    border: 1px solid #404040;
    border-radius: 8px;
    font-size: 1em;
    background: #303030;
    color: var(--text-primary);
    text-align: center;
    display: block;
}

#send-email-btn {
    display: block;
    margin: auto;
}

div#email-form > p {
    padding: 10px 10px 0px;
}

.or-text {
    display: none !important;
}

@media (max-width: 872px) {
    body {
        /* padding: 0 2px; */
    }
    .main-layout {
        padding: 0px;
    }
    .amph {
    margin-top: 0px;
    }
    .or-text {
        font-size: 1.4em;
        font-weight: bold;
        color: rgba(0, 40, 110, 0.8);
        margin: auto 15px;
        align-self: center;
        min-width: 10em;
    }
}

.ticket-actions {
    margin: 20px;
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease-in;
    text-align: center;
}

.ticket-actions.is-hidden {
    display: none !important;
}

/* Reservation Error and Loading Styles */
.reservation-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.reservation-error .fas {
    color: #dc3545;
    font-size: 1.1em;
}

.reservation-loading {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.reservation-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

#retry-reservation-btn {
    background-color: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#retry-reservation-btn:hover {
    background-color: #dc3545;
    color: white;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Promo code success message styling */
.promo-success {
    color: rgb(90 200 100);
    font-size: 14px;
    margin-top: 5px;
}

/* Event Loading Overlay Styles */
.event-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-loading-overlay.show {
    opacity: 1;
}

.event-loading-content {
    text-align: center;
    background: #202020;
    color: var(--text-primary);
    padding: 40px 30px;
    /*
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid #330000;
    */
    max-width: 400px;
    margin: 20px;
}

.loading-spinner {
    margin: 20px auto;
    font-size: 1.2em;
    font-weight: 600;
}

.payment-loading {
    text-align: center;
    margin: 20px auto;
    padding: 20px;
}

.payment-loading .spinner {
    margin-bottom: 15px;
}

.payment-loading p {
    font-size: 1.1em;
    color: var(--text-primary); /* #330000; */
    font-weight: 500;
}

/*

<div class="payment-loading">
    <div class="loading-spinner">
        <p>Վճարման էջը բեռնվում է...</p>
    </div>
</div>

*/

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-left: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-title {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-bottom: 25px;
    line-height: 1.4;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 40, 110, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00286e, #667ea8);
    width: 0%;
    border-radius: 2px;
    animation: progress 60s linear forwards;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Responsive adjustments for loading overlay */
@media (max-width: 480px) {
    .event-loading-content {
        padding: 30px 20px;
        margin: 15px;
    }

    .loading-title {
        font-size: 1.1em;
    }

    .loading-subtitle {
        font-size: 0.9em;
    }

    .spinner {
        width: 40px;
        height: 40px;
    }
}

/* Customer Details Form Styles */
.customer-details-form {
    background: rgba(32, 32, 32, 0.95);
    border: 2px solid #404040;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.customer-details-form h2 {
    color: #330000;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
}

.customer-details-form p {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    text-align: center;
}

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

.customer-details-form label {
    display: block;
    font-size: 1em;
    font-weight: bold;
    color: #330000;
    margin-bottom: 8px;
}

.customer-details-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #404040;
    border-radius: 8px;
    font-size: 1em;
    background: #303030;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.customer-details-form input:focus {
    outline: none;
    border-color: #330000;
    box-shadow: 0 0 0 3px rgba(51, 0, 0, 0.1);
}

.customer-details-form input:invalid {
    border-color: #bb1100;
}

.customer-details-form button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 10px;
}

.customer-details-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.customer-details-form button[type="submit"]:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Explainer Block */
.error-explainer {
    /* background: rgba(248, 215, 218, 0.95); 
    border: 2px solid #dc3545;  Red border
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
    width: 80%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
    background: #aa0000;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
    width: 90%;
    clip-path: polygon(15px 0%, calc(100% - 15px) 0%, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0% calc(100% - 15px), 0% 15px);
}

.error-explainer h3 {
    color: #ffffff;
    font-size: 1.4em;
    margin-bottom: 5px;
    font-weight: 600;
}

.error-explainer p {
    color: #ffffff;
    font-size: 1em;
    /* margin: 0 10px 0; */
    line-height: 1.4;
}

#error-text {
    font-weight: bold;
    font-size: 1.1em;
}

/* Remove bullets from error explainer ul */
.error-explainer ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
    color: #ccc;
}

.error-explainer ul li {
    list-style: none;
    padding: 5px 0;
}

.error-explainer ul li a {
    color: #fff;;
}

/* Confirmation Page Loading Sequence Styles */
.order-processing-loader,
.ticket-preparation-loader {
    color: #ddd; /*var(--text-primary);*/
    /*
    background: rgba(32, 32, 32, 0.95);
    border-radius: 15px;
    */
    padding: 30px 20px;
    margin: 1em auto;
    max-width: 500px;
    /*
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #330000;
    */
    text-align: center;
}

.order-processing-loader .processing-content,
.ticket-preparation-loader .processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.order-processing-loader .spinner-border,
.ticket-preparation-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.order-processing-loader h4,
.ticket-preparation-loader h4 {
    color: var(--text-primary);
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
}

.order-processing-loader p,
.ticket-preparation-loader p {
    color: var(--text-secondary);
    font-size: 1em;
    margin: 0;
    line-height: 1.4;
}

/* Hide download button and or-text on mobile */
@media (max-width: 1199px) {
    #download-all-btn {
        display: none !important;
    }
    .or-text {
        display: none !important;
    }
}

/* Ticket Preview Styles */
.tickets-preview {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
    display: block;
}

.ticket-pdf-canvas {
    width: 300px;
    height: 700px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 0 auto 20px;
    background: #fff;
    display: block;
}

@media (max-width: 600px) {
    .ticket-pdf-canvas {
        border-radius: 4px;
    }
}