﻿/* ========================================================================== */
/*  Booking Sidebar - Mining Theme                                            */
/* ========================================================================== */

.booking-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
}

/* Desktop: Hauptinhalt links, Sidebar rechts */
@media (min-width: 1280px) {
    .booking-layout {
        grid-template-columns: 1fr 400px;
        gap: 1rem;
        padding-right: 20px;
    }
}

@media (min-width: 1440px) {
    .booking-layout {
        grid-template-columns: 1fr 440px;
        /*gap: 2.5rem;*/
    }
}

/* Hauptinhalt */
.booking-main-content {
    width: 100%;
    min-width: 0;
}

/* Sidebar */
.booking-sidebar {
    position: relative;
    width: 100%;
}

/* Desktop: Sticky Sidebar rechts im Grid */
@media (min-width: 1280px) {
    .booking-sidebar {
        position: sticky;
        top: 2rem;
        height: fit-content;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

        /* Custom Scrollbar für Sidebar */
        .booking-sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .booking-sidebar::-webkit-scrollbar-track {
            background: rgba(26, 26, 26, 0.4);
            border-radius: 10px;
        }

        .booking-sidebar::-webkit-scrollbar-thumb {
            background: rgba(184, 115, 51, 0.5);
            border-radius: 10px;
        }

            .booking-sidebar::-webkit-scrollbar-thumb:hover {
                background: rgba(184, 115, 51, 0.7);
            }
}

/* ======================= */
/*   Mobile / Tablet View  */
/* ======================= */

/* Bottom-Sheet: Sidebar am unteren Rand, sticky am Viewport (fixed) */
@media (max-width: 1279px) {
    .booking-sidebar {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        backdrop-filter: blur(20px);
        /*border-top: 2px solid rgba(184, 115, 51, 0.3);*/
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
        max-height: 70vh;
        overflow-y: auto;
        animation: slideUp 0.3s ease-out;
    }

    /*.booking-main-content {
        padding-bottom: 220px;*/ /* Platz für fixe Mobile-Sidebar */
    /*}*/
}

/* Tablet: etwas kleinere Höhe des Bottom-Sheets */
@media (min-width: 768px) and (max-width: 1279px) {
    .booking-sidebar {
        max-height: 60vh;
    }
}

/* Slide-up Animation (global definiert) */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Container innerhalb der Sidebar */
.sidebar-sticky {
    background: linear-gradient(135deg, #1a1a1a, #222222);
    border: 2px solid rgba(184, 115, 51, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

    /* Dekorativer Akzent */
    .sidebar-sticky::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle at top right, rgba(184, 115, 51, 0.15), transparent 70%);
        pointer-events: none;
    }

/* Mobile / kleinere Screens: Sidebar-Box vollbreit ohne runde Ecken */
@media (max-width: 1439px) {
    .sidebar-sticky {
        background: linear-gradient(135deg, #1a1a1a, #222222);
        border: 2px solid rgba(184, 115, 51, 0.3);
        border-radius: 1rem;
        padding: 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        position: relative;
    }
}

/* Sidebar Checkout Button */
.sidebar-checkout-btn {
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #ff7a33 0%, #ff5722 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.4);
    transition: all 0.3s ease;
    /*animation: pulse-glow 2s ease-in-out infinite;*/
}

    .sidebar-checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(255, 87, 34, 0.5);
        filter: brightness(1.1);
    }

    .sidebar-checkout-btn:active {
        transform: translateY(0);
    }

    .sidebar-checkout-btn i {
        font-size: 1.25rem;
    }

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(255, 87, 34, 0.4);
    }

    50% {
        box-shadow: 0 8px 28px rgba(255, 87, 34, 0.6);
    }
}

/* Badge für Anzahl Items (optional für Header) */
.sidebar-cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    background: linear-gradient(135deg, #ff7a33, #ff5722);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.5);
}

/* Scroll-Optimierung Ticketliste */
.booking-sidebar .ticket-list {
    max-height: none;
    overflow-y: visible;
}

@media (min-width: 1280px) {
    .booking-sidebar .ticket-list {
        overflow-y: auto;
        padding-right: 0rem;
        overflow-x:hidden;
    }

        /* Scrollbar für Ticket Liste */
        .booking-sidebar .ticket-list::-webkit-scrollbar {
            width: 4px;
        }

        .booking-sidebar .ticket-list::-webkit-scrollbar-track {
            background: transparent;
        }

        .booking-sidebar .ticket-list::-webkit-scrollbar-thumb {
            background: rgba(184, 115, 51, 0.3);
            border-radius: 10px;
        }
}

/* ========================================================================== */
/*  Cart Summary - Sidebar Optimierungen                                      */
/* ========================================================================== */

/* Kompakterer Header in Sidebar */
.booking-sidebar .cart-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(184, 115, 51, 0.2);
}

.booking-sidebar .cart-header-icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
}

.booking-sidebar .cart-title {
    font-size: 1.125rem;
}

/* Kompaktere Ticket Cards */
.booking-sidebar .ticket-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.booking-sidebar .ticket-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
}

.booking-sidebar .ticket-title {
    font-size: 0.9375rem;
}

.booking-sidebar .ticket-meta {
    font-size: 0.8125rem;
}

.booking-sidebar .ticket-option-row {
    padding: 0.5rem;
}

.booking-sidebar .ticket-remove-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

/* Total Section kompakter, immer unten innerhalb der Sidebar */
.booking-sidebar .cart-total-section {
    padding: 1rem;
    margin-top: 1rem;
    position: sticky;
    bottom: 0;
}

.booking-sidebar .cart-total-value {
    font-size: 1.5rem;
}

/* Mobile Sticky Footer Actions */
@media (max-width: 1279px) {
    .booking-sidebar .cart-total-content {
        display: flex;
        gap: 0.75rem;
    }

    /* Sowohl custom Footer als auch Fallback-Button sticky am unteren Rand der Sidebar */
    .booking-sidebar .cart-footer-actions,
    .booking-sidebar .btn-checkout {
        position: sticky;
        bottom: 0;
/*        margin-top: 0.5rem;
        padding-top: 0.75rem;*/
        /*border-top: 1px solid rgba(184, 115, 51, 0.2);*/
        /*background: linear-gradient( to top, rgba(17, 17, 17, 0.98) 0%, rgba(17, 17, 17, 0.9) 60%, transparent 100% );*/
        z-index: 2;
    }

        /* Button immer vollbreit in der Sidebar */
        .booking-sidebar .cart-footer-actions > * {
            width: 100%;
        }

    .booking-sidebar .btn-checkout {
        width: 100%;
        display: inline-flex;
        justify-content: center;
    }
}

/*
 ====================================== 
  Collapsible "Ihre Tickets"-Section    
 ====================================== 
*/

/* Header klickbar machen */
.cart-header-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 1rem 0;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
}

.cart-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-header-text {
    display: flex;
    flex-direction: column;
}

.cart-subtitle {
    font-size: 0.75rem;
    color: #a0a0a0;
}

.cart-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-total-mini {
    font-size: 0.875rem;
    font-weight: 600;
    color: #d4915d;
}

.cart-toggle-icon {
    font-size: 1.1rem;
    color: #a0a0a0;
    transition: transform 0.2s ease;
}

/*nicht deaktivieren!*/
.cart-body {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.cart-body--expanded {
    max-height: 2000px;
    opacity: 1;
}
.cart-body--collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}


/* Empty State in Sidebar */
.booking-sidebar .cart-empty-state {
    padding: 2rem 1rem;
}

.booking-sidebar .empty-icon-wrapper {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
}

.booking-sidebar .empty-message {
    font-size: 0.875rem;
}

/* Animationen für hinzugefügte Items */
/*.ticket-card.newly-added {
    animation: slideInRight 0.4s ease-out;
}*/

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

