html {
    scroll-padding-top: 65px;
}

.event.active {
    /* Only draw the top border */
    border-top: 10px solid #c0c0c0; 
}

.tickets.active {
    /* Only draw the bottom border */
    border-bottom: 10px solid #c0c0c0; 
}

.active-presale .desktop {
    font-weight: bold;
}

/* --- NEW UI STYLES --- */

/* Textured Backgrounds for Main Template */
.texture-well {
    background-color: #fcfcfc; 
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px); 
    background-size: 16px 16px; 
    border: 1px solid #eaeaea;
}

.texture-alert-warning {
    border: 2px dashed #ffc107; 
    background-color: #fffdf5; 
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 193, 7, 0.04) 10px, rgba(255, 193, 7, 0.04) 20px);
}
.texture-alert-warning .h5 { color: #856404; }
.texture-alert-warning p { font-size: 15px; color: #533f03; }

.btn-alert-me-large {
    max-width: 400px; 
    font-size: 1.15rem; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Bold Active City Links */
.active-location-link {
    font-weight: 800 !important;
}

/* Premium VIP Ticket Button */
.btn-fancy-purple {
    background: #2b1b54;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px), linear-gradient(135deg, #18234e 0%, #3d1c73 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
    text-align: left !important;
}
.btn-fancy-purple:hover, .btn-fancy-purple:focus {
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px), linear-gradient(135deg, #25316d 0%, #4f2690 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

/* New Mobile Card UI */
.mobile-event-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e3e3e3;
    overflow: hidden;
    margin: 10px 0;
    cursor: pointer;
    text-align: left;
}

.active-presale .mobile .mobile-event-card {
    border-left: 6px solid #337ab7;
}

.mobile-event-card-body {
    padding: 16px 15px 12px 15px;
}
.mobile-event-card-title {
    font-size: 1.25em; 
    font-weight: 700; 
    margin-bottom: 6px; 
    line-height: 1.2; 
    color: #337ab7;
}
.mobile-event-card-venue {
    font-size: 1.15em; 
    color: #222; 
    font-weight: 600; 
    margin-bottom: 4px;
}
.mobile-event-card-datetime-loc {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    flex-wrap: wrap; 
    margin-top: 8px; 
    font-size: 0.95em;
}
.mobile-event-card-datetime {
    color: #777; 
    margin-right: 10px; 
    margin-bottom: 4px;
}
.mobile-event-card-loc {
    color: #555; 
    font-weight: 500; 
    text-align: right;
}

/* Card Action Footers */
.card-footer-has-codes {
    background-color: #337ab7; 
    color: #ffffff; 
    padding: 12px 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.card-footer-no-codes {
    background-color: #f8f9fa; /* Soft, clean gray */
    color: #555555; /* Dark gray text */
    border-top: 1px solid #eaeaea; /* Subtle divider from the card body */
    padding: 12px 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.card-footer-text {
    font-size: 1em; 
    font-weight: 600; 
    letter-spacing: 0.5px;
}

/* Smooth Chevron Rotation triggered natively by your JS tr.active */
.expand-icon i.fa-chevron-down {
    transition: transform 0.3s ease;
}
tr.active .expand-icon i.fa-chevron-down {
    transform: rotate(180deg);
}
tr.active .fa-plus:before {
    content: "\f068";
}
tr.active .fa-square-plus:before {
    content: "\f146"; 
}

/* --- FIX: MOBILE CARD EXPANSION STITCHING --- */
@media (max-width: 991px) {
    /* 1. Remove the hidden table cell padding that causes the grey gap */
    tr.active > td.mobile {
        padding-bottom: 0 !important;
    }
    tr.tickets > td.mobile-td-reset {
        padding: 0 !important;
        border-top: none !important;
    }

    /* 2. Flatten the bottom of the main card when expanded */
    tr.active .mobile-event-card {
        margin-bottom: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-bottom: none !important;
    }

    /* 3. Style the drawer to seamlessly attach to the card above it */
    .mobile-tickets-drawer {
        background-color: #ffffff;
        border: 1px solid #e3e3e3;
        border-top: none !important;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.08);
        margin-top: 0 !important;
        margin-bottom: 10px; /* Moves the spacing gap to below the expanded drawer */
        padding: 15px;
    }

    /* 4. Carry the blue left-border down through the drawer */
    tr.active-presale + tr.tickets .mobile-tickets-drawer {
        border-left: 6px solid #337ab7;
    }
}