/* BBML Public Styles */

/* Variables */
:root {
    --bbml-primary: #e63946;
    /* Example accent */
    --bbml-text: #ffffff;
    --bbml-bg: #1a1a1a;
    --bbml-border: #333;
    --bbml-highlight: #333;
}

/* Page Layout Fix */
.bbml-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Setlist Container */
.bbml-setlist-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max_width: 100%;
}

.bbml-set-header {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    padding: 10px 15px;
    margin-top: 30px;
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    border-left: 4px solid var(--bbml-primary, #ccc);
    text-transform: uppercase;
}

/* Controls */
.bbml-setlist-controls {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: inherit;
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between for better alignment */
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    border-radius: 5px;
}

.bbml-setlist-controls label {
    font-weight: 600;
    margin-right: 10px;
    color: inherit;
}

.bbml-setlist-controls select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}

/* Table */
.bbml-setlist-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: transparent;
}

.bbml-setlist-table th {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 600;
    text-align: left;
    opacity: 0.8;
}

.bbml-setlist-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    vertical-align: top;
}

.bbml-setlist-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Columns */
.bbml-col-num {
    width: 50px;
    font-weight: bold;
    opacity: 0.5;
}

.bbml-col-title {
    font-size: 1.1em;
    font-weight: 600;
}

.bbml-col-arranger {
    opacity: 0.8;
}

.bbml-col-duration {
    opacity: 0.7;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.button.bbml-btn-pdf {
    background-color: #fcebeb;
    color: #cc0000;
    border: 1px solid #cc0000;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    padding: 6px 10px;
    /* Increased padding */
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.button.bbml-btn-pdf:hover {
    background-color: #cc0000;
    color: white;
}

.bbml-no-part {
    font-style: italic;
    opacity: 0.5;
    font-size: 0.85em;
}

/* Gigs List */
.bbml-gigs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.bbml-gig-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bbml-gig-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.bbml-clickable-card {
    cursor: pointer;
}

.bbml-clickable-card:hover {
    border-color: var(--bbml-primary, #e63946);
}

.bbml-gig-item h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.bbml-gig-item h3 a {
    text-decoration: none;
    color: inherit;
}

.bbml-gig-meta {
    margin: 0;
    font-size: 0.95em;
    color: inherit;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bbml-gig-date {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbml-gig-location {
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Audio Player Trigger */
.bbml-audio-trigger {
    background: #444;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bbml-audio-trigger:hover {
    background: var(--bbml-primary, #e63946);
    transform: scale(1.1);
}

.bbml-audio-trigger.playing {
    background: var(--bbml-primary, #e63946);
    box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.3);
    animation: bbml-pulse 2s infinite;
}

.bbml-audio-trigger .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-left: 2px;
    /* Visual center fix for play triangle */
}

.bbml-audio-trigger.playing .dashicons {
    margin-left: 0;
    /* Center fix not needed for pause bars */
}


@keyframes bbml-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(230, 57, 70, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
}


/* Single Gig Metadata */
.bbml-gig-detail-meta {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.bbml-meta-item {
    display: flex;
    flex-direction: column;
}

.bbml-meta-label {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 5px;
}

.bbml-meta-value {
    font-size: 1.1em;
    font-weight: 500;
}

/* Added Address Contrast Fix */
.bbml-address {
    color: #444;
    /* Force dark text for visibility on light background */
}

.bbml-section-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .bbml-setlist-table thead {
        display: none;
    }

    .bbml-setlist-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px;
    }

    .bbml-setlist-table td {
        display: block;
        padding: 5px 0;
        border: none !important;
    }

    .bbml-col-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
}