/* Content Category Buttons */
.content-categories .btn-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.content-categories .btn {
    padding: 12px 20px;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.content-categories .btn:hover {
    transform: translateY(-1px);
}

.content-categories .btn.active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Custom purple badge */
.bg-purple {
    background-color: #6f42c1 !important;
}

/* Featured Event Styling - high specificity to override Bootstrap table-striped */
.table-striped > tbody > tr.featured-event,
.table > tbody > tr.featured-event,
tr.featured-event {
    background: rgba(255, 215, 0, 0.10) !important;
    border-left: 8px solid #FFD700 !important;
    border-right: 8px solid #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
    position: relative;
}

/* Event-type edges — drawn as absolutely-positioned pseudo-elements inside
   the first and last cells of each row, with 4px of vertical breathing room
   at top and bottom. The bar is shorter than the row, so consecutive same-
   type rows show a visible gap (the row/page background) between bars
   instead of merging into one continuous coloured stripe.
   Using pseudo-elements (not <tr> borders) sidesteps the border-collapse
   corner-rendering quirk that lets a wide border-left swallow any thin
   border-bottom at the corner. */
tr.event-type-single-day > td:first-child,
tr.event-type-single-day > td:last-child,
tr.event-type-multi-day > td:first-child,
tr.event-type-multi-day > td:last-child,
tr.event-type-holiday > td:first-child,
tr.event-type-holiday > td:last-child {
    position: relative !important;
}

tr.event-type-single-day > td:first-child::before,
tr.event-type-multi-day > td:first-child::before,
tr.event-type-holiday > td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
}

tr.event-type-single-day > td:last-child::after,
tr.event-type-multi-day > td:last-child::after,
tr.event-type-holiday > td:last-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
}

tr.event-type-single-day > td:first-child::before,
tr.event-type-single-day > td:last-child::after {
    background: #007bff;
}

tr.event-type-multi-day > td:first-child::before,
tr.event-type-multi-day > td:last-child::after {
    background: #28a745;
}

tr.event-type-holiday > td:first-child::before,
tr.event-type-holiday > td:last-child::after {
    background: #f8b4b4;
}

/* Featured rows keep their full-height gold border (set elsewhere) — hide
   the pseudo-element type pills so the gold envelope stays uninterrupted. */
tr.featured-event > td:first-child::before,
tr.featured-event > td:last-child::after {
    display: none !important;
}

/* Mobile card type edges */
.event-type-card-single-day {
    border-left: 5px solid #007bff !important;
    border-right: 5px solid #007bff !important;
}

.event-type-card-multi-day {
    border-left: 5px solid #28a745 !important;
    border-right: 5px solid #28a745 !important;
}

.event-type-card-holiday {
    border-left: 5px solid #f8b4b4 !important;
    border-right: 5px solid #f8b4b4 !important;
}

/* Featured rows beat the event-type edges — gold left/right wins when both
   classes are present. Compound selector lifts specificity above .event-type-X. */
.table-striped > tbody > tr.featured-event.event-type-single-day,
.table > tbody > tr.featured-event.event-type-single-day,
tr.featured-event.event-type-single-day,
.table-striped > tbody > tr.featured-event.event-type-multi-day,
.table > tbody > tr.featured-event.event-type-multi-day,
tr.featured-event.event-type-multi-day,
.table-striped > tbody > tr.featured-event.event-type-holiday,
.table > tbody > tr.featured-event.event-type-holiday,
tr.featured-event.event-type-holiday {
    border-left: 8px solid #FFD700 !important;
    border-right: 8px solid #FFD700 !important;
}

/* Mobile featured cards: gold 2px border wins over the type-card edges. */
.featured-event-card.event-type-card-single-day,
.featured-event-card.event-type-card-multi-day,
.featured-event-card.event-type-card-holiday {
    border-left: 2px solid #FFD700 !important;
    border-right: 2px solid #FFD700 !important;
}

.table-striped > tbody > tr.featured-event:hover,
.table > tbody > tr.featured-event:hover,
tr.featured-event:hover {
    background: rgba(255, 215, 0, 0.15) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6) !important;
    transform: scale(1.005);
    transition: all 0.2s ease-in-out;
}

.table-striped > tbody > tr.featured-event > td,
.table > tbody > tr.featured-event > td,
tr.featured-event td {
    --bs-table-accent-bg: transparent !important;
    background-color: rgba(255, 215, 0, 0.08) !important;
    border-top: 3px solid rgba(255, 215, 0, 0.4) !important;
    border-bottom: 3px solid rgba(255, 215, 0, 0.4) !important;
}

.table-striped > tbody > tr.featured-event:hover > td,
.table > tbody > tr.featured-event:hover > td,
tr.featured-event:hover td {
    --bs-table-accent-bg: transparent !important;
    background-color: rgba(255, 215, 0, 0.12) !important;
}

/* Featured Event - Mobile Card Styling */
.featured-event-card {
    border: 2px solid #FFD700 !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4) !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

.featured-event-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Enhanced badge styling */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Force table layout for consistent column widths */
.table {
    table-layout: fixed !important;
    width: 100% !important;
    margin-bottom: 30px !important;
}

/* Add some breathing room to the table and center content vertically */
.table th, .table td {
    padding: 8px 6px !important;
    vertical-align: middle !important;
}

/* Specific column width and text wrapping controls */
.col-logo {
    width: 140px !important;
    white-space: nowrap !important;
}

.col-company {
    width: 120px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.col-title {
    width: 200px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.col-location {
    width: 100px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.col-city {
    width: 75px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    hyphens: auto !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.col-date {
    width: 110px !important;
    white-space: nowrap !important;
}

.col-time {
    width: 80px !important;
    white-space: nowrap !important;
}

.col-cost {
    width: 60px !important;
    white-space: nowrap !important;
}

.col-notes {
    width: 90px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.col-website {
    width: 70px !important;
    white-space: nowrap !important;
}

.col-type {
    width: 60px !important;
    white-space: nowrap !important;
}

/* Consistent text alignment for headers and cells */
.text-center {
    text-align: center !important;
}

/* Additional spacing for readability - exclude featured events */
.table-striped > tbody > tr:nth-of-type(odd):not(.featured-event) > td {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Logo styling for consistent display */
.col-logo img {
    max-width: 136px !important;
    max-height: 68px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Event title link hover effect */
.col-title a {
    transition: all 0.2s ease;
}

.col-title a:hover {
    text-decoration: underline !important;
    color: #0d6efd !important;
}

/* Follow company button */
.follow-btn {
    font-size: 12px;
    color: #999;
    text-decoration: none;
    transition: all 0.2s;
    vertical-align: middle;
}

.follow-btn:hover {
    color: #0a66c2;
    text-decoration: none;
}

.follow-btn.following {
    color: #34c759;
}

.follow-btn.following:hover {
    color: #dc3545;
}
