/* General styles */
body {
    font-family: 'Lato', sans-serif;
    background-color: #1a001a !important; /* Deep purple for a theatre feel */
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Hide horizontal scrollbar from sparkles */
    position: relative;
}

body > .container,
body > .header,
body > .footer {
    color: #fff; /* White text for main content areas, without !important */
}


/* Spotlight Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), rgba(255, 255, 255, 0.15), transparent 40%);
    pointer-events: none;
    animation: spotlight 10s infinite alternate linear;
    z-index: 0;
}

@keyframes spotlight {
    0% { --x: 0%; --y: 20%; }
    25% { --x: 100%; --y: 40%; }
    50% { --x: 80%; --y: 100%; }
    75% { --x: 20%; --y: 60%; }
    100% { --x: 0%; --y: 20%; }
}

/* Sparkles */
@keyframes sparkle {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 0; }
}

.sparkle {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff;
    animation: sparkle 2s infinite linear;
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative; /* Ensure content is above the background effects */
    z-index: 2;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0 0 0;
}

.mast-head {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.social-links a {
    color: #fff !important; /* White links for the dark background */
    text-decoration: none;
    margin: 0 10px;
    font-size: 24px;
}

.social-links a:hover {
    color: #ddd !important;
}

/* Event list */
.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-list > li {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-list > li:hover {
    transform: translateY(-5px);
}

.image-container {
    position: relative;
}

.event-list time {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #4a004a, #c52c66); /* Glamorous gradient */
    color: #fff;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.event-list .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-list .month {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

.event-list .year {
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1;
}


.event-list .promo-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}

.event-list .info {
    padding: 20px;
    flex-grow: 1;
    color: #fff !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-list .info-main > * {
    margin-bottom: 10px;
}

.event-list .title {
    font-size: clamp(1.2rem, 4vw, 1.6rem); /* Responsive font size */
    font-weight: 700;
    color: #fff !important;
    line-height: 1.2;
    min-height: 3.8rem; /* Reserve space for 2 lines */
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-list .venue {
    font-size: 1.1rem;
    font-weight: 500;
    color: #eee !important;
}

.on-sale-container {
    text-align: center;
    margin-top: auto; /* Pushes the badge to the bottom */
    padding-top: 10px;
}

.event-list .dayTime {
    font-size: 1rem;
    color: #ddd !important;
}

.event-list .address {
    font-size: 0.9rem;
    color: #ccc !important;
}

.event-list .social {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
}

.event-list .social ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
}

.event-list .social .links a {
    color: #fff !important;
    text-decoration: none;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-list .social .links a:hover {
    color: #c52c66 !important;
}

/* Form Control Overrides */
#location_address_lookup,
.getAddress_autocomplete_input {
    color: #000 !important; /* Ensure text is readable */
}

/* getAddress.io Autocomplete List Overrides */
.getAddress_autocomplete_list,
.getAddress_autocomplete_list div,
.getAddress_autocomplete_list span,
.ga-autocomplete-scroll,
.ga-autocomplete-scroll div,
.ga-autocomplete-scroll span,
.ga-autocomplete-scroll b {
    color: #000 !important; /* Ensure all text within the autocomplete list is black */
}


/* Podcast section */
.podcast-section {
    text-align: center;
    padding: 40px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.podcast-section h3 {
    color: #fff !important;
    font-size: 28px;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #ccc !important;
}

.footer a {
    color: #fff !important;
}

/* Responsive design */
@media (min-width: 768px) {
    .event-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .event-list > li {
        flex-direction: column;
    }

    .event-list .promo-image {
        width: 100%;
        height: auto;
    }

    .event-list .social {
        border-radius: 0 0 10px 10px;
    }

    .event-list .social ul {
        flex-direction: row;
    }

    .event-list .social .links {
        margin-bottom: 0;
    }

    /* Admin Sidebar specific styles */
    .sidebar {
        position: fixed;
        top: 0; /* No fixed header on desktop */
        bottom: 0;
        left: 0;
        z-index: 1030; /* Ensure it's above other content */
        overflow-y: auto; /* Enable scrolling for sidebar content */
        /* The width is handled by col-md-3 and col-lg-2 in HTML */
        /* Background color and padding are already handled by Bootstrap classes */
    }

    /* Adjust main content area to make space for the fixed sidebar */
    /* Target the main content column directly to override Bootstrap's margin-left: auto */
    .container-fluid > .row > main.col-md-9 {
        margin-left: 25%; /* For md breakpoint, matches col-md-3 width */
    }
}

@media (min-width: 992px) {
    .event-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .container-fluid > .row > main.col-lg-10 {
        margin-left: 16.666667%; /* For lg breakpoint, matches col-lg-2 width */
    }
}

/* Responsive Tables - Individual styling for each admin view */

/* Tickets Admin Table */
@media screen and (max-width: 767.98px) {
    .tickets-admin-table thead {
        display: none;
    }
    .tickets-admin-table,
    .tickets-admin-table tbody,
    .tickets-admin-table tr,
    .tickets-admin-table td {
        display: block !important;
        width: 100% !important;
    }
    .tickets-admin-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .tickets-admin-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .tickets-admin-table td:last-child {
        border-bottom: 0;
    }
    .tickets-admin-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Edit Ticket Types Table */
@media screen and (max-width: 767.98px) {
    .edit-ticket-types-table thead {
        display: none;
    }
    .edit-ticket-types-table,
    .edit-ticket-types-table tbody,
    .edit-ticket-types-table tr,
    .edit-ticket-types-table td {
        display: block !important;
        width: 100% !important;
    }
    .edit-ticket-types-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .edit-ticket-types-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .edit-ticket-types-table td:last-child {
        border-bottom: 0;
    }
    .edit-ticket-types-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Manage Ticket Types Table */
@media screen and (max-width: 767.98px) {
    .manage-ticket-types-table thead {
        display: none;
    }
    .manage-ticket-types-table,
    .manage-ticket-types-table tbody,
    .manage-ticket-types-table tr,
    .manage-ticket-types-table td {
        display: block !important;
        width: 100% !important;
    }
    .manage-ticket-types-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .manage-ticket-types-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .manage-ticket-types-table td:last-child {
        border-bottom: 0;
    }
    .manage-ticket-types-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Event Names Table */
@media screen and (max-width: 767.98px) {
    .event-names-table thead {
        display: none;
    }
    .event-names-table,
    .event-names-table tbody,
    .event-names-table tr,
    .event-names-table td {
        display: block !important;
        width: 100% !important;
    }
    .event-names-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .event-names-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .event-names-table td:last-child {
        border-bottom: 0;
    }
    .event-names-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Entertainers Table */
@media screen and (max-width: 767.98px) {
    .entertainers-table thead {
        display: none;
    }
    .entertainers-table,
    .entertainers-table tbody,
    .entertainers-table tr,
    .entertainers-table td {
        display: block !important;
        width: 100% !important;
    }
    .entertainers-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .entertainers-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .entertainers-table td:last-child {
        border-bottom: 0;
    }
    .entertainers-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Users Table */
@media screen and (max-width: 767.98px) {
    .users-table thead {
        display: none;
    }
    .users-table,
    .users-table tbody,
    .users-table tr,
    .users-table td {
        display: block !important;
        width: 100% !important;
    }
    .users-table tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 5px;
    }
    .users-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }
    .users-table td:last-child {
        border-bottom: 0;
    }
    .users-table td[data-label]:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
        text-align: left;
        flex: 1;
    }
}

/* Mailing List Drawer Styles */
.mailing-list-drawer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: clamp(280px, 90vw, 350px); /* Responsive width */
    background-color: #2a002a; /* Darker purple to match theme */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Deeper shadow */
    transform: translateX(120%); /* Start off-screen to the right */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother animation */
    z-index: 1000;
    padding: 25px; /* Increased padding */
    box-sizing: border-box;
    color: #e0e0e0; /* Lighter text for contrast */
}

.mailing-list-drawer.show {
    transform: translateX(0); /* Slide in */
}

.mailing-list-drawer .drawer-content {
    position: relative;
}

.mailing-list-drawer .close-button {
    position: absolute;
    top: -15px; /* Adjusted for better positioning */
    right: -15px; /* Adjusted for better positioning */
    background: linear-gradient(45deg, #c52c66, #ff6b6b); /* Glamorous gradient */
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px; /* Slightly larger */
    height: 35px; /* Slightly larger */
    font-size: 20px; /* Larger icon */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
    transition: transform 0.2s ease-in-out;
}

.mailing-list-drawer .close-button:hover {
    transform: scale(1.1);
}

.mailing-list-drawer h3 {
    margin-top: 0;
    color: #fff; /* White heading */
    font-size: 1.5em; /* Slightly larger heading */
    margin-bottom: 15px;
    text-align: center;
}

.mailing-list-drawer p {
    font-size: 0.95em;
    color: #c0c0c0; /* Slightly muted text */
    margin-bottom: 15px;
}

.mailing-list-drawer .form-group {
    margin-bottom: 20px; /* Increased spacing */
}

.mailing-list-drawer label {
    display: block;
    margin-bottom: 8px; /* Increased spacing */
    font-weight: 600; /* Bolder label */
    font-size: 0.9em;
    color: #fff; /* White label */
}

.mailing-list-drawer input[type="text"],
.mailing-list-drawer input[type="email"] {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid #555; /* Darker border */
    border-radius: 8px; /* More rounded inputs */
    box-sizing: border-box;
    font-size: 1em;
    background-color: #3a003a; /* Darker input background */
    color: #fff; /* White input text */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mailing-list-drawer input[type="text"]:focus,
.mailing-list-drawer input[type="email"]:focus {
    border-color: #c52c66; /* Highlight color on focus */
    box-shadow: 0 0 0 0.2rem rgba(197, 44, 102, 0.25); /* Subtle glow */
    outline: none;
}

.mailing-list-drawer button[type="submit"] {
    background: linear-gradient(45deg, #c52c66, #8a2be2); /* Glamorous gradient button */
    color: white;
    padding: 12px 20px; /* Increased padding */
    border: none;
    border-radius: 8px; /* More rounded button */
    cursor: pointer;
    font-size: 1.1em; /* Larger font */
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
}

.mailing-list-drawer button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mailing-list-drawer .confirmation-message {
    font-size: 0.85em;
    color: #a0a0a0;
    margin-top: 15px;
    text-align: center;
    font-style: italic; /* Added italic style */
}

.mailing-list-drawer .alert {
    padding: 12px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
}

.mailing-list-drawer .alert-success {
    background-color: #28a745; /* Bootstrap success green */
    color: #fff;
    border: 1px solid #218838;
}

.mailing-list-drawer .alert-danger {
    background-color: #dc3545; /* Bootstrap danger red */
    color: #fff;
    border: 1px solid #c82333;
}

/* Media query for smaller screens to adjust drawer position/size */
@media (max-width: 576px) {
    .mailing-list-drawer {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px); /* Full width minus padding */
        max-width: 350px; /* Still limit max width */
    }
}


/* Mailing List Table */
@media screen and (max-width: 767.98px) {
    .mailing-list-table thead {
        display: none !important;
    }
    .mailing-list-table,
    .mailing-list-table tbody,
    .mailing-list-table tr,
    .mailing-list-table td {
        display: block !important;
        width: 100% !important;
    }
    .mailing-list-table tr {
        margin-bottom: 1rem !important;
        border: 1px solid #ddd !important;
        border-radius: 5px !important;
    }
    .mailing-list-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        text-align: right !important;
    }
    .mailing-list-table td:last-child {
        border-bottom: 0 !important;
    }
    .mailing-list-table td[data-label]:before {
        content: attr(data-label) !important;
        font-weight: bold !important;
        margin-right: 1rem !important;
        text-align: left !important;
        flex: 1 !important;
    }
}
