    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    color: #333;
}

/* --- 4. FROSTED GLASS: SIDEBAR PANELS --- */
#filter-controls {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#event-plan-panel {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 85px;
}

/* --- 5. FILTER CONTROLS (Original) --- */
#filter-controls::after {
    content: attr(data-active-filters);
    display: inline-block;
    background: #007bff;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8em;
    margin-left: 10px;
    position: absolute;
    top: 15px;
    right: 15px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filter-group label {
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
}
.filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-btn {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    cursor: pointer;
    text-align: center;
    font-size: 0.85em;
}
.filter-btn.active {
    background-color: #e7f3ff;
    border-color: #007bff;
    font-weight: bold;
}
.itinerary-item.ghost, .itinerary-item-ghost {
    opacity: 0.4;
    background-color: #c8c8c8;
}
#name-filter:not(:placeholder-shown) {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}
.flatpickr-day.available-full {
    background-color: #d4edda !important;
    color: #155724 !important;
}
.flatpickr-day.available-partial {
    background-color: #fff3cd !important;
    color: #856404 !important;
}
.flatpickr-day.unavailable {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    text-decoration: line-through;
}

/* Calendar container - no min-height to prevent extra whitespace */
#modal-calendar-container {
    /* Removed min-height to eliminate whitespace above calendar */
}

/* --- NEW CALENDAR STYLES --- */
.calendar-modal-content {
    max-width: 1200px;
    width: 90vw;
    height: 90vh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
}

.calendar-header {
    width: 100%;
    margin: 0;
    border-radius: 0;
    flex-shrink: 0;
}

#calendar-view-controls {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.calendar-view-btn {
    padding: 10px 20px;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s;
}

.calendar-view-btn:hover {
    background-color: #e7f3ff;
}

.calendar-view-btn.active {
    background-color: #007bff;
    color: white;
}

#calendar-content {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.calendar-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.calendar-title {
    font-size: 1.8em;
    margin: 0;
    color: #212529;
}

.cal-nav-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.weekday {
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    padding: 10px 5px;
    font-size: 1.1em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
    flex: 1;
    min-height: 0;
}

.calendar-day {
    border: 1px solid #dee2e6;
    padding: 8px;
    background-color: white;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-day.empty {
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.calendar-day.has-events {
    background-color: #e7f3ff;
}

.day-number {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #212529;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
}

.event-badge {
    background-color: #007bff;
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
    font-weight: 600;
}

.event-badge:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.more-events {
    font-size: 0.7em;
    color: #6c757d;
    font-weight: 600;
    padding: 2px 4px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.week-day-column {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.week-day-column.today {
    border-color: #ffc107;
    border-width: 2px;
    background-color: #fff3cd;
}

.week-day-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    text-align: center;
    flex-shrink: 0;
}

.week-day-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 5px;
}

.week-day-date {
    font-size: 0.9em;
}

.week-day-events {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-events {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.event-card.compact {
    padding: 8px;
    margin: 0;
}

.event-compact-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-time {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 600;
}

.event-name {
    font-size: 0.95em;
    color: #212529;
    font-weight: 500;
}

#events-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.event-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.event-card-title {
    margin: 0;
    font-size: 1.2em;
    color: #212529;
    flex: 1;
}

.event-card-date {
    font-size: 0.9em;
    color: #6c757d;
    white-space: nowrap;
}

.event-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Locked calendar item styles */
.event-card.locked {
    opacity: 0.85;
    background: #f8f9fa;
    border-color: #adb5bd;
    position: relative;
}

.event-card.locked:hover {
    opacity: 0.95;
}

.event-lock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2em;
    opacity: 0.7;
    cursor: help;
}

.event-badge.locked {
    opacity: 0.8;
    background-color: #e9ecef !important;
}

.event-card-description {
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

.event-card-location {
    color: #6c757d;
    font-size: 0.9em;
}

.event-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}

.no-events-message {
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-size: 1.1em;
}

/* --- END NEW CALENDAR STYLES --- */

/* === SKELETON LOADING STYLES === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    overflow: hidden;
    height: 420px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-price {
    height: 20px;
    width: 80px;
    border-radius: 4px;
}

.skeleton-button {
    height: 36px;
    width: 120px;
    border-radius: 5px;
}
/* === END SKELETON LOADING STYLES === */

#reset-filters-btn {
    width: 100%;
    padding: 10px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    margin-top: 10px;
}
#catalog-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}
#catalog-toolbar select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9em;
}

/* --- 6. EVENT PLAN PANEL (Original) --- */
.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.toolbar-group label {
    font-size: 0.75em;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}
.toolbar-group input, .toolbar-group textarea, .filter-group select, .filter-group input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}
#cart-items-container {
    flex-grow: 1;
    min-height: 80px; /* Reserve space for locked items - prevents layout shift */
}
#cart-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
}
#cart-footer .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.total-row.subtotal-row {
    font-size: 1.1em;
    color: #333;
}
#cart-footer button {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
}
#cart-footer #checkout-btn {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
    margin-top: 15px;
    margin-bottom: 10px;
}
#cart-footer #save-share-btn {
    background-color: #f0f0f0;
    color: #333;
}
#favorites-section { 
    padding: 15px 0px;
    box-sizing: border-box;
    position: relative;
}
#favorites-carousel { 
    display: flex;
    gap: 15px;
    overflow-x: auto; 
    padding-bottom: 5px; 
    max-width: 1800px;
    margin: 0 auto;
    scroll-behavior: smooth;
    min-height: 100px; /* Reserve space for carousel items - prevents layout shift */
}
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}
.carousel-nav.left { left: 0; }
.carousel-nav.right { right: 0; }
.favorite-item {
    position: relative;
    flex: 0 0 100px;
    height: 100px;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio - prevents layout shift */
    min-height: 100px; /* Fallback for browsers without aspect-ratio support */
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}
.favorite-item .card-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}
.favorite-item .action-btn {
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    padding: 0;
    font-weight: bold;
}
#catalog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    /* Allow container to shrink below content size for grid children */
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* When catalog has grouping carousels, switch to flex column layout */
#catalog-container:has(.grouping-carousel-section) {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* CRITICAL: Force container to shrink to parent width */
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* --- GROUPING CAROUSEL SECTION STYLES --- */
.grouping-carousel-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    /* CRITICAL: Constrain section width to parent container */
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    /* In flex column, prevent stretching beyond parent */
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    /* Color overlay for filtering effect - will be customized per section */
    position: relative;
}

/* Filter-based color variations for each carousel section - using backdrop-filter with hue-rotate */
.grouping-carousel-section:nth-child(5n+1) {
    backdrop-filter: blur(8px) saturate(1.5) hue-rotate(60deg);
    -webkit-backdrop-filter: blur(8px) saturate(1.5) hue-rotate(60deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-carousel-section:nth-child(5n+2) {
    backdrop-filter: blur(8px) saturate(1.3) hue-rotate(120deg);
    -webkit-backdrop-filter: blur(8px) saturate(1.3) hue-rotate(120deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-carousel-section:nth-child(5n+3) {
    backdrop-filter: blur(8px) saturate(1.6) hue-rotate(180deg);
    -webkit-backdrop-filter: blur(8px) saturate(1.6) hue-rotate(180deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-carousel-section:nth-child(5n+4) {
    backdrop-filter: blur(8px) saturate(1.4) hue-rotate(240deg);
    -webkit-backdrop-filter: blur(8px) saturate(1.4) hue-rotate(240deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-carousel-section:nth-child(5n+5) {
    backdrop-filter: blur(8px) saturate(1.5) hue-rotate(300deg);
    -webkit-backdrop-filter: blur(8px) saturate(1.5) hue-rotate(300deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.grouping-carousel-header:hover .grouping-carousel-title {
    color: #007bff;
}

.grouping-carousel-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    transition: color 0.2s;
}

.grouping-carousel-description {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0 0 15px 0;
}

.grouping-carousel-count {
    font-size: 0.85em;
    color: #6c757d;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.grouping-carousel-wrapper {
    position: relative;
    /* Key: wrapper clips the overflow so only visible cards show */
    overflow: hidden;
    /* CRITICAL: Force wrapper to constrain to parent width */
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Inner container styling - more transparent to let backdrop-filter show through */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
}

/* Edge fade gradients - neutral to let the hue-rotated background show through */
.grouping-carousel-wrapper::before,
.grouping-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.grouping-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.7) 0%, transparent 100%);
    border-radius: 12px 0 0 12px;
}

.grouping-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.7) 0%, transparent 100%);
    border-radius: 0 12px 12px 0;
}

.grouping-carousel-container {
    display: flex;
    gap: 20px;
    /* Enable horizontal scrolling ONLY on the container */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 5px;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.1);
    /* Snap scrolling for better UX */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Prevent scroll chaining to parent elements */
    overscroll-behavior-x: contain;
    /* Allow both horizontal carousel scrolling AND vertical page scrolling on touch devices */
    touch-action: pan-x pan-y;
    /* CRITICAL: Container must inherit parent width, NOT expand to fit content */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

.grouping-carousel-container::-webkit-scrollbar {
    height: 8px;
}

.grouping-carousel-container::-webkit-scrollbar-track {
    background: transparent;
}

.grouping-carousel-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.grouping-carousel-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.grouping-carousel-container .event-card {
    /* Desktop: Fixed width cards (not percentage-based, which doesn't work with overflow) */
    /* 3 cards visible: (container_width - 2*gap) / 3, using fixed 320px per card */
    flex: 0 0 320px;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    height: auto;
    scroll-snap-align: start;
    /* Prevent cards from shrinking */
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Hide descriptions for cards in carousel view to reduce clutter */
.grouping-carousel-container .event-card .event-card-content .description {
    display: none;
}

.grouping-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.grouping-carousel-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.grouping-carousel-nav.left {
    left: -15px;
}

.grouping-carousel-nav.right {
    right: -15px;
}

.grouping-carousel-view-all {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95em;
    transition: color 0.2s;
}

.grouping-carousel-view-all:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Hide nav buttons when not needed */
.grouping-carousel-wrapper:not(.has-overflow) .grouping-carousel-nav {
    display: none;
}

/* Mobile responsiveness for grouping carousels */
@media (max-width: 768px) {
    /* Force main content to respect viewport width on mobile */
    .main-content {
        width: 100%;
        max-width: 100vw;
        padding: 10px;
        overflow-x: hidden;
    }

    /* Catalog area must not exceed screen */
    #catalog-area {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    /* Catalog container with carousels */
    #catalog-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .grouping-carousel-section {
        padding: 10px;
        margin-bottom: 20px;
        margin-left: 0;
        margin-right: 0;
        /* CRITICAL: Constrain section to available width on mobile */
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .grouping-carousel-wrapper {
        /* CRITICAL: Prevent wrapper from exceeding parent width on mobile */
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Reduce edge gradient width on mobile */
    .grouping-carousel-wrapper::before,
    .grouping-carousel-wrapper::after {
        width: 15px;
    }

    .grouping-carousel-container {
        /* CRITICAL: Container must fit within parent on mobile */
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 8px 5px;
        gap: 12px;
    }

    .grouping-carousel-container .event-card {
        /* Mobile: Show card at width relative to container, not viewport */
        /* Use percentage of parent container to ensure proper sizing */
        flex: 0 0 calc(100% - 20px);
        width: calc(100% - 20px);
        min-width: 260px;
        max-width: calc(100% - 20px);
        box-sizing: border-box;
    }

    .grouping-carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* CRITICAL: Keep nav buttons inside the container on mobile */
    .grouping-carousel-nav.left {
        left: 5px;
    }

    .grouping-carousel-nav.right {
        right: 5px;
    }
}

/* Tablet responsiveness - show 2 cards */
@media (min-width: 769px) and (max-width: 1024px) {
    .grouping-carousel-container .event-card {
        /* Tablet: Fixed 280px width cards to show ~2 */
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}
/* --- END GROUPING CAROUSEL SECTION STYLES --- */

/* --- 7. FROSTED GLASS: EVENT CARD & SHIMMER --- */
.event-card {
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #333;
    overflow: hidden; /* CRUCIAL for shimmer */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100%; /* <-- FIX #1: This makes all cards in a row the same height */
}

.event-card:hover {
    transform: translateY(-4px) scale(1.01);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Card Shimmer Effect */
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 75%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.7s ease-in-out;
    z-index: 1;
}

.event-card:hover::before {
    left: 150%; /* Animate across */
}

.event-card-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    aspect-ratio: 3 / 2.6; /* Reserve space for images - prevents layout shift */
    min-height: 200px; /* Fallback for browsers without aspect-ratio support */
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0; /* Placeholder color while loading */
    transition: opacity 0.3s ease-in;
}

.event-card-image-container.lazy-load {
    opacity: 0.6;
}

.event-card-image-container.loaded {
    opacity: 1;
}
.event-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.event-card-actions .action-btn {
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
}
.heart-icon {
    position: absolute;
    top: 10px;
    right: 50px;
    cursor: pointer;
    z-index: 10;
    display: block;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.heart-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}
.heart-icon:active {
    transform: scale(0.95);
}
.heart-icon svg {
    width: 24px;
    height: 24px;
    fill: #e0e0e0;
    stroke: #999;
    stroke-width: 2;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}
.heart-icon:hover svg {
    stroke: #666;
    fill: #f0f0f0;
}
.heart-icon.hearted svg {
    fill: #ff3b30;
    stroke: #ff3b30;
    animation: heartPulse 0.4s ease;
}
.heart-icon.hearted:hover svg {
    fill: #ff6b66;
    stroke: #ff6b66;
}
.heart-icon.locked svg {
    fill: #34c759;
    stroke: none;
}
.heart-icon.locked {
    cursor: default;
    pointer-events: none;
    background: rgba(240, 255, 240, 0.9);
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.availability-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10;
    display: block;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.availability-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.availability-btn:active {
    transform: scale(0.95);
}

/* Make card content sit above the shimmer */
.event-card-content, .card-footer {
    position: relative;
    z-index: 2;
}

.event-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.event-card-content h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}
.event-card-content .description {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0 10px 0;
}
.card-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f8f8;
}
.card-footer .price {
    font-weight: bold;
    font-size: 1.1em;
    color: #28a745;
}
.card-footer .price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.card-footer .actions-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}
.card-footer .quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ced4da;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}
.card-footer .quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: none;
    color: #495057;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.card-footer .quantity-btn:hover {
    background-color: #e9ecef;
    color: #007bff;
}
.card-footer .quantity-btn:active {
    background-color: #dee2e6;
    transform: scale(0.95);
}
.card-footer .quantity-input {
    width: 45px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    background: white;
    -moz-appearance: textfield;
}
.card-footer .quantity-input::-webkit-outer-spin-button,
.card-footer .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.card-footer .quantity-input:focus {
    outline: none;
    background-color: #f8f9fa;
}
.card-action-btn {
    padding: 8px 16px;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s ease;
}
.card-action-btn:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}
.card-action-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.2);
}
.card-action-btn:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}
.card-action-btn:disabled {
    background-color: #5a6268;
    cursor: not-allowed;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.card-action-btn:disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 10;
}
.parent-link {
    font-size: 0.8em;
    margin: 0 0 5px 0;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
}
.locked-item-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
}
.locked-item-card:last-child {
    border-bottom: none;
    padding-bottom: 5px;
}
.locked-item-card:first-child {
    padding-top: 5px;
}
.locked-item-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.locked-item-details {
    flex-grow: 1;
    min-width: 0;
}
.locked-item-details p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.locked-item-name {
    font-weight: bold;
}
.locked-item-option, .locked-item-note {
    font-size: 0.8em;
    color: #6c757d;
}
.locked-item-pricing {
    font-size: 0.85em !important;
}
.locked-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.locked-item-actions .edit-btn {
    font-size: 0.8em;
    padding: 4px 8px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}
.locked-item-actions .edit-btn:hover {
    background-color: #e0e0e0;
}
.locked-item-status-icon {
    display: flex;
    align-items: center;
    font-size: 1.2em;
}
.remove-locked-item-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5em;
    line-height: 1;
    padding: 0 5px;
    cursor: pointer;
}

/* --- 8. MODAL STYLES (Original) --- */
.modal-overlay {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.modal-content, .checkout-modal-content, .itinerary-content, .presentation-content, .quick-pay-modal-content, .quick-plan-modal-content {
    pointer-events: auto;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 1100px;
    height: 90vh;
    max-height: 700px;
    display: flex;
    overflow: hidden;
    position: relative;
    color: #333;
    transform: scale(0.8);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    z-index: 1010;
}
.modal-main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#modal-main-image {
    flex-grow: 1;
    background-size: cover;
    background-position: center;
    border-right: 1px solid #eee;
}
#modal-thumbnail-strip {
    display: flex;
    gap: 5px;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    overflow-x: auto;
}
.thumbnail-img {
    width: 80px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.thumbnail-img.active {
    border-color: #007bff;
}
.modal-sidebar-column {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#modal-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
#modal-breadcrumbs {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
}
#modal-breadcrumbs a {
    color: #007bff;
    text-decoration: none;
}
#modal-breadcrumbs a:hover {
    text-decoration: underline;
}
#modal-item-name { 
    margin-top: 0;
}
#modal-item-price { 
    font-size: 1.5em;
    font-weight: bold; 
    margin: 10px 0;
}
#modal-options-container { 
    margin: 20px 0;
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px;
}
.option-btn {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    border-radius: 5px;
    cursor: pointer;
}
.option-btn.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}
#modal-quantity-selector { 
    margin: 20px 0;
}
#modal-quantity-selector .quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ced4da;
    border-radius: 5px;
    overflow: hidden;
    background: white;
    width: fit-content;
}
#modal-quantity-selector .quantity-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: none;
    color: #495057;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
#modal-quantity-selector .quantity-btn:hover {
    background-color: #e9ecef;
    color: #007bff;
}
#modal-quantity-selector .quantity-btn:active {
    background-color: #dee2e6;
    transform: scale(0.95);
}
#modal-quantity-selector .quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    background: white;
    -moz-appearance: textfield;
}
#modal-quantity-selector .quantity-input::-webkit-outer-spin-button,
#modal-quantity-selector .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#modal-quantity-selector .quantity-input:focus {
    outline: none;
    background-color: #f8f9fa;
}
#modal-notes-container { 
    margin-bottom: 20px;
}
#modal-item-note {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
    box-sizing: border-box;
}
#modal-actions-container {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.primary-action-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}
.primary-action-btn:hover {
    background-color: #218838;
}
.primary-action-btn:disabled {
    background-color: #5a6268;
    cursor: not-allowed;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.primary-action-btn:disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 10;
}
.checkout-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    position: relative;
    color: #333;
    transform: scale(0.8);
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-height: 90vh; /* <-- ADD THIS */
    overflow-y: auto; /* <-- ADD THIS */
}
.modal-overlay.active .checkout-modal-content {
    transform: scale(1);
    opacity: 1;
}
#checkout-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
#checkout-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    margin: 20px 0;
}
#payment-form .form-row {
    margin-bottom: 15px;
}
#payment-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}
#payment-form input, #card-element {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#card-errors {
    color: #fa755a;
    font-size: 0.9em;
    margin-top: 5px;
}
.checkout-deposit {
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}
.tip-row label {
    margin-bottom: 0;
}
.tip-row input {
    width: 100px;
    text-align: right;
}
.itinerary-content {
    max-width: 1000px;
}
.itinerary-container {
    display: flex;
    gap: 20px;
}
.itinerary-column {
    flex: 1;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-height: 200px;
}
.itinerary-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    min-height: 100px;
}
.itinerary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    cursor: move;
}
.itinerary-item.ghost {
    opacity: 0.4;
    background-color: #c8c8c8;
}
.itinerary-item .locked-item-actions {
    margin-left: auto;
}
.itinerary-item .remove-btn {
    font-size: 1.2em;
}
.itinerary-modal-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}
.itinerary-header-item {
    flex: 1;
}
.itinerary-header-item label {
    font-size: 0.8em;
    color: #666;
    display: block;
}
.itinerary-header-item input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    width: 100%;
}
.itinerary-item .quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}
.itinerary-item .quantity-input {
    width: 40px;
    text-align: center;
}
.itinerary-item-note {
    width: 100%;
    height: 60px;
    font-size: 0.8em;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-top: 5px;
    padding: 5px;
    resize: vertical;
}

.presentation-summary-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 10px 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9em;
    color: #495057;
}
.summary-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.summary-item strong {
    color: #212529;
}
.summary-links {
    margin-left: auto;
    display: flex;
    gap: 10px;
}
.summary-link-btn {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
}
.summary-link-btn.active {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    cursor: default;
}

#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050; 
}

.chat-options {
    font-size: 0.8em;
    font-weight: normal;
    text-align: right;
    padding-right: 5px;
    margin-top: 5px;
    color: #666;
}

.chat-options input {
    vertical-align: middle;
}

#chat-toggle-button {
    background-color: #007bff;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1001;
}

#chat-widget-container.chat-open #chat-toggle-button {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

#presence-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

#chat-window {
    width: 350px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#chat-widget-container.chat-open #chat-window {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    z-index: 1002;
}

#chat-header {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}
#chat-header p { 
    margin: 0;
    font-weight: bold;
}

#chat-header .user-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 0 5px;
}
#chat-header .user-identity label {
    font-size: 0.8em;
    font-weight: normal;
}
#chat-user-name {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.9em;
}
#chat-user-name:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,.25);
}

#whos-here-list {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.9em;
    flex-shrink: 0;
}

#messages-container {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#messages-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#typing-indicator {
    padding: 5px 10px;
    font-style: italic;
    color: #888;
    height: 24px; 
    font-size: 0.85em;
}

#message-form {
    border-top: 1px solid #ddd;
    padding: 10px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#message-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px;
}

#message-form button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message-wrapper.sent { align-self: flex-end; }
.message-wrapper.received { align-self: flex-start; }

.chat-message {
    padding: 8px 12px;
    border-radius: 18px;
    word-wrap: break-word;
}

.chat-message.sent {
    background-color: #007bff;
    color: white;
}

.chat-message.received {
    background-color: #f1f1f1;
    color: #333;
}

.chat-message .sender {
    font-size: 0.75em;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}
#modal-chat-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

#modal-chat-container h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background-color: #f8f9fa;
  flex-grow: 1;
}

#message-form-item {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#message-input-item {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px;
}

#message-form-item button {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  cursor: pointer;
}

.message-wrapper .moderation-actions {
  position: absolute;
  top: -5px;
  right: -5px;
  display: none;
  gap: 5px;
}

.message-wrapper:hover .moderation-actions {
  display: flex;
}

.message-wrapper .flag-btn, .message-wrapper .ban-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 0.8em;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.message-wrapper .flag-btn {
  background-color: #ffc107;
  color: #333;
}

.chat-message.banned, .chat-message.flagged {
    color: #6c757d;
    font-style: italic;
    background-color: #e9ecef;
}

/* Recent Chats Section */
#recent-chats-section {
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

#recent-chats-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s;
}

#recent-chats-toggle:hover {
    background: #e9ecef;
}

#recent-chats-toggle .toggle-icon {
    font-size: 0.7em;
    color: #666;
    transition: transform 0.2s;
}

#recent-chats-list {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#recent-chats-list.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#recent-chats-loading {
    padding: 12px;
    text-align: center;
    color: #666;
    font-size: 0.85em;
    font-style: italic;
}

.recent-chat-empty {
    padding: 16px 12px;
    text-align: center;
    color: #999;
    font-size: 0.85em;
}

.recent-chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.recent-chat-item:hover {
    background-color: #f5f5f5;
}

.recent-chat-item:last-child {
    border-bottom: none;
}

.recent-chat-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.recent-chat-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.recent-chat-name {
    font-weight: 500;
    font-size: 0.9em;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-chat-preview {
    font-size: 0.8em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.recent-chat-time {
    font-size: 0.75em;
    color: #999;
    flex-shrink: 0;
}

.coming-soon-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  z-index: 5;
}


.timestamp {
    font-size: 0.7em;
    color: #999;
    text-align: right;
    margin-top: 4px;
    margin-right: 5px;
}
.sidebar-header-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.sidebar-header-group h4 {
    margin: 0;
}
.present-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.present-btn:hover {
    background-color: #e0e0e0;
}

.presentation-content {
    background: #fff;
    border-radius: 8px;
    width: 95vw;
    height: 90vh;
    max-width: 1600px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.presentation-header {
    padding: 15px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.presentation-header h2 {
    margin: 0;
}
.presentation-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}
#presentation-share-btn {
    font-size: 1em;
}

.presentation-body {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}
#presentation-gallery-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#presentation-main-image {
    flex-grow: 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
#presentation-thumbnail-strip {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    overflow-x: auto;
    flex-shrink: 0;
}
#presentation-details-column {
    overflow-y: auto;
    padding-right: 15px;
}
#presentation-item-note-container {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}
#presentation-item-note {
    white-space: pre-wrap;
    word-wrap: break-word;
}
.presentation-nav-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1011;
}
.presentation-nav-arrow.up { top: 15px; }
.presentation-nav-arrow.down { bottom: 15px; }

#presentation-reactions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.reaction-bar-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}
.reaction-bar-buttons button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 20px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.reaction-bar-buttons button:hover {
    transform: scale(1.1);
    border-color: #999;
}
.reaction-bar-buttons button.selected {
    background-color: #e7f3ff;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}
.reaction-summary-display {
    font-size: 0.85em;
    color: #6c757d;
    min-height: 20px;
}
.total-row.amount-paid-row {
    font-size: 0.9em;
    color: #6c757d;
}
.total-row.final-total-row {
    margin-top: 5px;
    font-size: 1.4em;
    font-weight: bold;
}
hr.total-divider {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 5px 0;
}
.footer-link {
    text-align: center;
    padding: 20px;
    font-size: 0.8em;
}
.footer-link a {
    color: #aaa;
    text-decoration: none;
}

#mobile-summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #343a40;
    color: white;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    z-index: 998;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}
#mobile-summary-bar.available { background-color: #28a745; }
#mobile-summary-bar.partial { background-color: #fd7e14; }
#mobile-summary-bar.unavailable { background-color: #dc3545; }

#mobile-bar-info {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
}

#mobile-bar-total-cost {
    font-weight: bold;
    font-size: 1.1em;
}

#mobile-view-plan-btn, #mobile-show-filters-btn {
    padding: 10px 20px;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    cursor: pointer;
}

#mobile-show-filters-btn {
    display: none;
    margin-bottom: 20px;
    width: 100%;
    background-color: #6c757d;
    border: none;
}

/* --- FIX: HIDE MOBILE BUTTON ON DESKTOP --- */
#mobile-filter-trigger {
    display: none;
}

@media (max-width: 999px) {
    #left-sidebar, #right-sidebar {
        max-width: 100%;
        transition: max-height 0.4s ease-out, opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease;
        overflow: hidden;
        max-height: 2000px;
        opacity: 1;
    }
    
    #left-sidebar.collapsed, #right-sidebar.collapsed {
        max-height: 0;
        opacity: 0;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    #mobile-summary-bar, #mobile-show-filters-btn {
        display: flex;
    }

    #mobile-show-filters-btn {
        position: sticky;
        top: 75px;
        z-index: 999;
    }
    
    .presentation-body {
        display: flex;
        flex-direction: column;
    }

    .presentation-nav-arrow {
        background: rgba(0,0,0,0.4);
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    #mobile-summary-bar {
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    body.mobile-bar-active #mobile-summary-bar {
        transform: translateY(0);
    }
    
    body.mobile-bar-active #chat-widget-container {
        bottom: 75px;
        transition: bottom 0.3s ease-in-out;
    }

    /* --- FIX: SHOW MOBILE BUTTON ON MOBILE --- */
    #mobile-filter-trigger {
        display: flex;
        width: 100%;
        position: sticky;
        top: 75px;
        z-index: 998;
        background-color: #6c757d;
        color: white;
        padding: 15px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        justify-content: space-between;
        align-items: center;
        font-size: 1em;
        font-weight: bold;
        margin-bottom: 15px;
    }

    .caret {
        transition: transform 0.3s ease;
    }

    .collapsed .caret {
        transform: rotate(-90deg);
    }

    /* Header mobile styles - stack layout with search below branding */
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        position: relative;
    }

    #header-left {
        justify-content: center;
        gap: 10px;
        padding-right: 80px; /* Space for absolute positioned right section */
    }

    #header-center {
        order: 3;
        max-width: 100%;
        padding: 0;
    }

    #header-search-wrapper {
        max-width: 100%;
    }

    #header-right {
        position: absolute;
        right: 12px;
        top: 10px;
        gap: 8px;
    }
}
/* --- (End of @media (max-width: 999px)) --- */


#plan-filter-btn {
    background-color: #f0f8ff;
    font-weight: bold;
    border-color: #cce5ff; /* Added from snippet */
}

#plan-filter-btn.active {
    background-color: #cce5ff;
    border-color: #007bff;
}

#catalog-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    display: none;
}

.event-type-card .event-card-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

.event-date-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    min-width: 70px;
}

.event-date-display .month {
    display: block;
    font-size: 0.8em;
    font-weight: bold;
    color: #dc3545;
}

.event-date-display .day {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #343a40;
    line-height: 1.1;
}

.event-details {
    flex-grow: 1;
}

.event-details h3 {
    margin-top: 0;
}

.collage-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 200px;
}

.collage-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* --- FIX #2: This makes groupings with only one image fill the entire container --- */
.collage-image:only-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* --- NESTED COLLECTION TILE STYLES --- */
.nested-collection-tile {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nested-collection-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nested-collection-tile .collage-container.nested-collage {
    position: relative;
    height: 180px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.nested-collection-tile .collage-image {
    transition: transform 0.3s ease;
}

.nested-collection-tile:hover .collage-image {
    transform: scale(1.05);
}

.nested-collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    padding: 20px 12px 10px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.nested-collection-count {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 0.75em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.nested-collection-tile .event-card-content {
    padding: 12px 15px;
}

.nested-collection-tile .event-card-content h3 {
    font-size: 1.1em;
    margin: 0 0 6px 0;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.nested-collection-tile .event-card-content .description {
    font-size: 0.85em;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nested-collection-tile .card-footer {
    padding: 10px 15px 15px;
    display: flex;
    justify-content: center;
}

.see-collection-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    width: 100%;
    text-transform: none;
}

.see-collection-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.see-collection-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

/* Carousel-specific styling for nested collection tiles */
.grouping-carousel-container .nested-collection-tile {
    flex: 0 0 320px;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: start;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Mobile responsive adjustments for nested tiles */
@media (max-width: 768px) {
    .grouping-carousel-container .nested-collection-tile {
        flex: 0 0 calc(100vw - 70px);
        width: calc(100vw - 70px);
        min-width: calc(100vw - 70px);
        max-width: calc(100vw - 70px);
    }

    .nested-collection-tile .collage-container.nested-collage {
        height: 160px;
    }

    .see-collection-btn {
        padding: 12px 24px;
        font-size: 1em;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 999px) {
    .grouping-carousel-container .nested-collection-tile {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}


.grouping-card .card-footer {
    justify-content: center;
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        height: 95vh;
        width: 95vw;
        max-height: none;
    }

    .modal-main-column {
        flex: 1;
        min-height: 250px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .modal-sidebar-column {
        flex: 1;
        padding: 20px;
    }

    #modal-thumbnail-strip {
        padding: 8px;
    }

    .thumbnail-img {
        width: 65px;
        height: 50px;
    }

    #calendar-body {
        padding: 10px;
    }
    
    #calendar-view-controls {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .calendar-view-btn {
        flex: 1;
        min-width: 140px;
    }

    .flatpickr-day.has-event {
        min-height: 35px;
        font-size: 0.9em;
    }
    
    .day-event-item {
        font-size: 0.75em;
        padding: 1px 2px;
    }
    
    .event-card {
        padding: 12px;
    }
    
    .event-card-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .event-card-title {
        font-size: 1.1em;
    }
}

.sso-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #aaa;
    font-size: 0.8em;
    text-transform: uppercase;
}
.sso-divider::before, .sso-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}
.sso-divider:not(:empty)::before {
    margin-right: .5em;
}
.sso-divider:not(:empty)::after {
    margin-left: .5em;
}

.sso-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.sso-btn:hover {
    background-color: #f8f8f8;
}

#breadcrumbs {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    padding: 5px 0;
}

#breadcrumbs a.breadcrumb-link {
    color: #007bff;
    text-decoration: none;
}

#breadcrumbs a.breadcrumb-link:hover {
    text-decoration: underline;
}

#breadcrumbs span {
    font-weight: bold;
    color: #343a40;
}

.price-original {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-left: 5px;
}

.price-editor {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-editor label {
    font-size: 0.8em;
    color: #6c757d;
}

.price-override-input {
    width: 70px;
    padding: 4px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
}

.itinerary-content {
    display: flex;
    flex-direction: column;
}

.itinerary-container {
    flex-grow: 1;
    min-height: 0;
}

.itinerary-column {
    display: flex;
    flex-direction: column;
}

.itinerary-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 5px;
}

#checkout-summary-details li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary-item-details {
    display: flex;
    flex-direction: column;
    padding-right: 10px;
}

.checkout-summary-note {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

.itinerary-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-shrink: 0;
}

#marquee-banner-container {
    background-color: #e9ecef;
    color: #495057;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px; /* Added rounded corners */
}

#marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 25s linear infinite;
    font-size: 0.9em;
    font-weight: 500;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

#marquee-banner-container:hover #marquee-text {
    animation-play-state: paused;
}

#modal-additional-details {
    margin-top: 20px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #495057;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.detail-item {
    line-height: 1.5;
}

.detail-label {
    display: block;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 3px;
    font-size: 0.85em;
    text-transform: uppercase;
}

.detail-value {
    /* Style for the value text */
}

.ranking-list {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.ranking-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 0.85em;
    white-space: nowrap;
}

.ranking-label {
    /* Style for the ranking name (e.g., \"Fun\") */
}

.ranking-stars {
    color: #ffc107;
    margin-left: 5px;
    font-size: 1.1em;
}

/* --- 9. SLIDER STYLES (Kept for now) --- */
/* We are removing the UI, but the styles can stay just in case */
/* Style for the 'Fun Tweaks' <select> dropdown */
.form-row select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
}
/* Container for each dynamic slider */
.form-row-slider {
    margin-top: 10px;
}
/* Label for the slider (e.g., \"Kaleidoscope: 6\") */
.form-row-slider label {
    font-size: 0.9em !important;
    font-weight: normal !important;
    margin-top: 5px;
    color: #333 !important;
}
/* The slider <input type=\"range\"> */
.form-row-slider input[type=\"range\"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    margin-top: 5px;
    padding: 0; /* Override defaults */
}
.form-row-slider input[type=\"range\"]:hover {
    opacity: 1;
}
.form-row-slider input[type=\"range\"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}
.form-row-slider input[type=\"range\"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}
.form-row {\
    margin-bottom: 15px;\
}\
.form-row label {\
    display: block;\
    margin-bottom: 5px;\
    font-size: 0.9em;\
    color: #666;\
    font-weight: 500;\
}\
.form-row input[type=\"range\"] {\
    width: 100%;\
}\
/* --- END SLIDER STYLES --- */\
\
/* --- REMOVED: All #solid-bg, .bg-effect-*, @keyframes rules --- */\

/* --- NEW UI POLISHES (Restored) --- */

/* 1. Header Event Name Input */
#header-event-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 5px;
    /* Optional: Focus state looks cleaner without border */
    outline: none;
    box-shadow: none;
}

/* 2. My Plans Dropdown */
#my-plans-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#my-plans-dropdown {
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s;
}

#my-plans-dropdown:hover {
    border-color: #007bff;
    background-color: #e7f3ff;
}

/* 3. Event Plan Button (Sidebar) */
#itinerary-btn {
    /* Style to make it look like a prominent header/button hybrid */
    background: none;
    border: none;
    padding: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

#itinerary-btn:hover {
    color: #007bff;
}

/* In: style.css (at the end) */
.partner-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #007bff;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 10;
    cursor: help; /* Makes the mouse cursor a question mark */
}

/* In: style.css */
/* Action: Add these new rules to the end of the file */

/* Container for the breadcrumb path (e.g., All > Activities) */
#catalog-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

#catalog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#breadcrumbs {
    flex: 1;
    min-width: 0;
}

#breadcrumb-path-container {
    font-size: 0.9em;
    color: #6c757d;
}

#breadcrumb-path-container a {
    color: #007bff;
    text-decoration: none;
}
#breadcrumb-path-container a:hover {
    text-decoration: underline;
}
#breadcrumb-path-container span {
    font-weight: bold;
    color: #343a40;
}


/* Container for all active filter chips */
#filter-chip-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.6); /* Frosted glass */
    backdrop-filter: blur(5px);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* "Active Filters:" text label */
.chip-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

/* Individual filter chip */
.filter-chip {
    display: flex;
    align-items: center;
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 15px;
    padding: 3px 8px 3px 10px;
    font-size: 0.85em;
    color: #0056b3;
    font-weight: 500;
}

/* Goal-specific chip styling */
.filter-chip.goal-chip {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* "x" button on each chip */
.filter-chip button {
    background: none;
    border: none;
    font-size: 1.3em;
    color: #007bff;
    cursor: pointer;
    padding: 0 0 0 5px;
    line-height: 1;
    font-weight: bold;
}

.filter-chip.goal-chip button {
    color: #856404;
}

/* "Clear All" button */
.filter-chip-clear-all {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85em;
    margin-left: auto; /* Pushes it to the far right */
    padding: 5px;
    font-weight: 500;
}
.filter-chip-clear-all:hover {
    color: #0056b3;
}

/* --- Beta Feature Tags --- */

/* For subtle, inline tags (e.g., in headers) */
.beta-tag-subtle {
    font-size: 0.6em;
    background: #fd7e14; /* Orange */
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: super;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* For obvious banners at the top of modals */
.beta-banner {
    background-color: #fff3cd; /* Light yellow */
    border-bottom: 1px solid #ffeeba;
    color: #856404;
    font-weight: 500;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}

/* --- ADD TO END of style.css --- */

/* Scene Builder Layout */
.scene-builder-container {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    padding: 20px;
    min-height: 0; /* Fix for flex-grow */
    position: relative; /* <-- ADD THIS LINE */
}

#scene-builder-canvas {
    flex-grow: 1;
    background-color: #e9ecef;
    border-radius: 8px;
    position: relative; /* This is crucial */
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid #dee2e6;
}
#scene-builder-palette {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#scene-background-picker, #scene-item-palette {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}
#scene-background-picker h4, #scene-item-palette h4 {
    margin: 0 0 5px 0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}
#scene-item-palette .palette-items, .background-thumbnails {
    flex-grow: 1;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.palette-items p.description,
.background-thumbnails p.description {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0;
}

/* Scene Builder Items */
.palette-item, .background-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: grab;
}
.background-thumb {
    cursor: pointer;
}
.palette-item img, .background-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.palette-item span, .background-thumb span {
    font-size: 0.9em;
    font-weight: 500;
}
.palette-item:active {
    cursor: grabbing;
}
.background-thumb:hover {
    background-color: #e7f3ff;
}

/* The AI-Generated "Cutout" */
.scene-cutout {
    position: absolute; /* This is crucial */
    cursor: move;
    width: 150px; /* Default cutout size */
    height: auto;
    transition: transform 0.1s ease;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.scene-cutout:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.scene-cutout.is-dragging {
    opacity: 0.7;
    transform: scale(1.05);
}

/* --- ADD TO END of style.css --- */

/* Styles for palette items */
.palette-item.idea {
    opacity: 0.7; /* Greys out the "idea" items */
}
.palette-item.idea:hover {
    opacity: 1;
}
.palette-item.locked {
    border-left: 4px solid #28a745; /* Green bar for "locked" items */
    padding-left: 10px;
}

/* Styles for cutout picker thumbnails */
#cutout-picker-thumbnails .thumbnail-img {
    width: 100px;
    height: 80px;
    border: 3px solid #ddd;
}
#cutout-picker-thumbnails .thumbnail-img:hover {
    border-color: #007bff;
}

/* --- ADD TO END of style.css --- */

/* New status text overlay */
#scene-status-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    z-index: 50;
    transition: opacity 0.3s ease;
}

/* New styles for the cutout picker */
#cutout-picker-thumbnails .thumbnail-img {
    cursor: pointer;
    transition: border-color 0.2s;
}
#cutout-picker-thumbnails .thumbnail-img.selected {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.5);
}
#cutout-picker-submit-btn {
    flex-shrink: 0;
}

/* --- ADD TO END of style.css --- */

/* New context header for cutout picker */
#cutout-picker-context {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
#cutout-context-thumb {
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

/* --- ADD TO END of style.css --- */

/* New wrapper for scene items to handle transforms */
.scene-item-wrapper {
    position: absolute;
    cursor: move;
    /* transform-origin is center by default, which is perfect */
}

/* Update cutout class to work inside the wrapper */
.scene-item-wrapper .scene-cutout {
    display: block;
/* --- THIS IS THE CHANGE (150px -> 250px) --- */
    width: 250px; /* Base width */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    pointer-events: none;
}

/* Controls container, hidden by default */
.scene-item-controls {
    position: absolute;
    top: -10px;    /* Position outside the top-right corner */
    right: -10px;
    display: none; /* Hide by default */
    gap: 5px;
    z-index: 100;
}

/* Show controls on wrapper hover */
.scene-item-wrapper:hover .scene-item-controls {
    display: flex;
}

/* Style for the handles */
.scene-rotate-handle,
.scene-resize-handle {
    width: 20px;
    height: 20px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    user-select: none; /* Prevent text selection */
}

.scene-rotate-handle {
    cursor: grab; /* 'grab' is a good visual cue for rotation */
}
.scene-resize-handle {
    cursor: nwse-resize; /* Standard resize cursor */
}

.scene-flip-handle { /* <-- ADD THIS */
    width: 20px;
    height: 20px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    user-select: none; /* Prevent text selection */
}

/* --- ADD THIS NEW RULE for the flip cursor --- */
.scene-flip-handle {
    cursor: pointer;
}

/* Update hover and dragging styles */
.scene-item-wrapper:hover .scene-cutout {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.scene-item-wrapper.is-dragging {
    opacity: 0.7;
}
.scene-item-wrapper.is-dragging .scene-cutout {
     filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Remove old individual cutout styles */
.scene-cutout {
    position: static; /* No longer absolute */
    cursor: default;  /* Wrapper handles cursor */
}
.scene-cutout:hover,
.scene-cutout.is-dragging {
    /* These are now controlled by the wrapper */
    transform: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    opacity: 1;
}

/* Event Detail Modal - RSVP Features */
.event-info-section {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.event-date-time {
    font-size: 1.05em;
    margin-bottom: 6px;
    color: #333;
}

.event-location {
    font-size: 0.95em;
    color: #666;
}

.rsvp-button-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.rsvp-btn {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.rsvp-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rsvp-btn.rsvp-yes {
    border-color: #28a745;
    color: #28a745;
}

.rsvp-btn.rsvp-yes.active {
    background-color: #28a745;
    color: white;
}

.rsvp-btn.rsvp-maybe {
    border-color: #ffc107;
    color: #f39c12;
}

.rsvp-btn.rsvp-maybe.active {
    background-color: #ffc107;
    color: white;
}

.rsvp-btn.rsvp-no {
    border-color: #dc3545;
    color: #dc3545;
}

.rsvp-btn.rsvp-no.active {
    background-color: #dc3545;
    color: white;
}

.rsvp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rsvp-list-section {
    background-color: #f0f8ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.rsvp-list-header {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #333;
}

.rsvp-list-group {
    margin-bottom: 10px;
}

.rsvp-list-group:last-child {
    margin-bottom: 0;
}

.rsvp-list-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.rsvp-list-items {
    color: #666;
    font-size: 0.9em;
    padding-left: 10px;
}

@media (max-width: 768px) {
    .rsvp-button-group {
        flex-direction: column;
    }
    
    .rsvp-btn {
        width: 100%;
    }
    
    .event-info-section {
        padding: 10px 12px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .card-footer .price-wrapper,
    .card-footer .actions-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    
    .card-footer .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
        touch-action: manipulation;
    }
    
    .card-footer .quantity-input {
        width: 60px;
        height: 40px;
        font-size: 16px;
    }
    
    .card-action-btn {
        flex: 1;
        min-height: 44px;
        font-size: 16px;
    }
}

/* --- SHARE MENU STYLES --- */
.event-plan-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.event-plan-header-row .event-name-group {
    flex-grow: 1;
    min-width: 0;
}

#share-menu-container {
    position: relative;
    flex-shrink: 0;
}

#share-menu-btn {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.2em;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#share-menu-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.05);
}

#share-menu-btn:active {
    transform: scale(0.95);
}

#share-menu-btn .share-icon {
    font-size: 1.1em;
    line-height: 1;
}

.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.share-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    text-align: left;
    transition: background-color 0.15s;
}

.share-dropdown-item:hover {
    background-color: #f8f9fa;
}

.share-dropdown-item:active {
    background-color: #e9ecef;
}

.share-item-icon {
    margin-right: 10px;
    font-size: 1.1em;
}

.share-dropdown-divider {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 0;
}

/* Hamburger Menu Styles */
#hamburger-menu-container {
    position: relative;
}

#hamburger-menu-btn {
    font-size: 1.4em;
}

.hamburger-icon {
    line-height: 1;
}

.hamburger-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    z-index: 1000;
    overflow: hidden;
}

.hamburger-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    color: #333;
    text-align: left;
    transition: background-color 0.15s;
}

.hamburger-dropdown-item:hover {
    background-color: #f8f9fa;
}

.hamburger-dropdown-item:active {
    background-color: #e9ecef;
}

.menu-item-icon {
    margin-right: 12px;
    font-size: 1.2em;
}

.hamburger-dropdown-divider {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 0;
}

.share-dropdown-item.publish-option {
    color: #28a745;
    font-weight: 500;
}

.share-dropdown-item.publish-option:hover {
    background-color: #d4edda;
}

.share-dropdown-item.update-published-option {
    color: #17a2b8;
    font-weight: 500;
}

.share-dropdown-item.update-published-option:hover {
    background-color: #d1ecf1;
}

/* RSVP Stats section in dropdown */
.share-rsvp-stats {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.share-rsvp-stats h5 {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #6c757d;
    text-transform: uppercase;
}

.share-rsvp-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.share-rsvp-item {
    text-align: center;
    flex: 1;
}

.share-rsvp-count {
    font-size: 1.2em;
    font-weight: bold;
    display: block;
}

.share-rsvp-count.going {
    color: #28a745;
}

.share-rsvp-count.maybe {
    color: #ffc107;
}

.share-rsvp-count.no {
    color: #dc3545;
}

.share-rsvp-label {
    font-size: 0.75em;
    color: #6c757d;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .share-dropdown {
        min-width: 200px;
    }

    .share-dropdown-item {
        padding: 14px 15px;
    }
}

/* Invite Collaborator Popup */
.invite-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: #fff;
    border: 1px solid #cce5ff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    min-width: 280px;
    max-width: 320px;
    z-index: 1001;
    padding: 16px;
}

.invite-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.invite-popup-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.invite-popup-title {
    flex: 1;
    font-weight: 600;
    color: #0056b3;
    font-size: 1em;
}

.invite-popup-close {
    background: none;
    border: none;
    font-size: 1.4em;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.invite-popup-close:hover {
    color: #333;
}

.invite-popup-desc {
    font-size: 0.85em;
    color: #666;
    margin: 0 0 12px 0;
}

.invite-popup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-popup-input {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.invite-popup-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.invite-popup-btn {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 4px;
}

.invite-popup-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.invite-popup-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.invite-popup-btn:disabled {
    background-color: #6c9bd1;
    cursor: not-allowed;
}

.invite-popup-status {
    font-size: 0.85em;
    text-align: center;
    min-height: 1.2em;
    margin-top: 2px;
}

/* Phase 4: Role selector in invite popup */
.invite-role-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.invite-role-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.invite-popup-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9em;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.invite-popup-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.invite-popup-select:hover {
    border-color: #c0c0c0;
}

/* Mobile adjustments for invite popup */
@media (max-width: 768px) {
    .invite-popup {
        min-width: 250px;
        max-width: calc(100vw - 40px);
        right: -10px;
    }
}

/* =========================
   Quick Pay Modal Styles
   ========================= */
.quick-pay-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.quick-pay-modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.4em;
}

.quick-pay-description {
    color: #6c757d;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.quick-pay-amount-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.quick-pay-amount-total {
    font-size: 1.5em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.quick-pay-item-name {
    font-size: 0.95em;
    color: #6c757d;
    font-weight: 500;
}

#quick-pay-options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-pay-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.quick-pay-option-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-pay-option-btn:active {
    transform: translateY(0);
}

.quick-pay-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.quick-pay-icon.zelle {
    background: linear-gradient(135deg, #6D1ED4, #8E2DE2);
}

.quick-pay-icon.venmo {
    background: #3D95CE;
}

.quick-pay-icon.cashapp {
    background: #00D632;
}

.quick-pay-icon.paypal {
    background: linear-gradient(135deg, #003087, #009cde);
}

.quick-pay-option-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.quick-pay-option-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.quick-pay-option-handle {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 2px;
}

.quick-pay-arrow {
    color: #adb5bd;
    font-size: 1.2em;
}

/* Quick Pay Button in Detail Modal */
.quick-pay-btn {
    width: 100%;
    padding: 12px 15px;
    margin-top: 10px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6D1ED4, #3D95CE);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-pay-btn:hover {
    background: linear-gradient(135deg, #5a19b3, #3385b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 30, 212, 0.3);
}

.quick-pay-btn:active {
    transform: translateY(0);
}

.quick-pay-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No payment options message */
.quick-pay-no-options {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.quick-pay-no-options p {
    margin: 0;
}

/* Quick Pay Tip Selector */
.quick-pay-tip-selector {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.quick-pay-tip-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.quick-pay-tip-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-pay-tip-btn {
    flex: 1 1 auto;
    min-width: 60px;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-pay-tip-btn:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}

.quick-pay-tip-btn.active {
    border-color: #6D1ED4;
    background: linear-gradient(135deg, #6D1ED4, #3D95CE);
    color: #fff;
}

.quick-pay-tip-custom-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #6D1ED4;
    border-radius: 8px;
}

.quick-pay-tip-currency {
    font-weight: 600;
    color: #6D1ED4;
    font-size: 1.1em;
}

.quick-pay-tip-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1em;
    font-weight: 500;
    color: #333;
    background: transparent;
}

.quick-pay-tip-input::placeholder {
    color: #adb5bd;
}

.quick-pay-tip-input::-webkit-outer-spin-button,
.quick-pay-tip-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quick-pay-tip-input[type=number] {
    -moz-appearance: textfield;
}

.quick-pay-tip-included {
    font-size: 0.75em;
    color: #28a745;
    font-weight: 500;
}

/* =========================
   Quick Plan Modal Styles
   ========================= */
.quick-plan-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.quick-plan-modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.4em;
}

.quick-plan-description {
    color: #6c757d;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.quick-plan-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#quick-plan-idea-input {
    width: 100%;
    padding: 16px;
    font-size: 1em;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#quick-plan-idea-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

#quick-plan-idea-input::placeholder {
    color: #adb5bd;
}

#quick-plan-submit-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#quick-plan-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #1aa179);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#quick-plan-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

#quick-plan-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

#quick-plan-submit-btn .spinner {
    display: none;
}

#quick-plan-submit-btn.loading .button-text {
    display: none;
}

#quick-plan-submit-btn.loading .spinner {
    display: inline;
}

.quick-plan-error {
    padding: 12px 16px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 10px;
}

/* ============================================================================
   PHASE 3a: TASK MANAGER STYLES
   ============================================================================ */

/* Task Manager Container */
.task-manager {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Phase 4: Permission-based styling */
.task-manager.permissions-loading {
    opacity: 0.7;
    pointer-events: none;
}

.task-manager.read-only {
    background-color: rgba(248, 249, 250, 0.95);
}

.task-viewer-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background-color: #6c757d;
    color: white;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.task-card-readonly {
    background-color: #f8f9fa;
}

.task-card-readonly .task-card-main {
    padding-left: 12px;
}

.task-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.task-manager-header h3 {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.task-add-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.task-add-btn:hover {
    background-color: #0056b3;
}

.task-add-btn:active {
    transform: scale(0.98);
}

/* Task List Container */
.task-list-container {
    min-height: 100px;
}

.task-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.task-list-empty p {
    margin: 0;
    font-size: 0.95em;
}

/* Task Groups */
.task-group {
    margin-bottom: 24px;
}

.task-group:last-child {
    margin-bottom: 0;
}

.task-group-header {
    font-size: 0.85em;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.completed-group .task-group-header {
    color: #868e96;
}

.task-group-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Task Card */
.task-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.task-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.task-card.task-completed {
    background-color: #f8f9fa;
    opacity: 0.8;
}

.task-card-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.task-checkbox {
    flex-shrink: 0;
    padding-top: 2px;
}

.task-complete-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #28a745;
}

.task-card-content {
    flex: 1;
    min-width: 0;
}

.task-name {
    display: block;
    font-size: 0.95em;
    font-weight: 500;
    color: #212529;
    margin-bottom: 6px;
    word-break: break-word;
}

.task-name-completed {
    text-decoration: line-through;
    color: #868e96;
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Task Status Badges */
.task-status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75em;
    font-weight: 500;
    border-radius: 12px;
    text-transform: capitalize;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background-color: #cce5ff;
    color: #004085;
}

.status-blocked {
    background-color: #f8d7da;
    color: #721c24;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.task-due-date {
    font-size: 0.8em;
    color: #6c757d;
}

.task-assignee {
    font-size: 0.8em;
    color: #007bff;
}

/* Task Card Actions */
.task-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-card:hover .task-card-actions {
    opacity: 1;
}

.task-edit-btn,
.task-delete-btn {
    padding: 4px 8px;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    color: #495057;
    transition: all 0.2s;
}

.task-edit-btn:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.task-delete-btn:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #dc3545;
}

/* Task Modal */
.task-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-modal-overlay.active {
    opacity: 1;
}

.task-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.task-modal-overlay.active .task-modal {
    transform: scale(1) translateY(0);
}

.task-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.task-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #212529;
}

.task-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #868e96;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.task-modal-close:hover {
    color: #dc3545;
}

/* Task Form */
.task-form {
    padding: 24px;
}

.task-form-group {
    margin-bottom: 20px;
}

.task-form-group:last-of-type {
    margin-bottom: 24px;
}

.task-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
}

.task-form-group input[type="text"],
.task-form-group input[type="date"],
.task-form-group textarea,
.task-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95em;
    color: #212529;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.task-form-group input:focus,
.task-form-group textarea:focus,
.task-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.task-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.task-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.task-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.task-cancel-btn,
.task-save-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.task-cancel-btn {
    background: none;
    border: 1px solid #ced4da;
    color: #495057;
}

.task-cancel-btn:hover {
    background-color: #f8f9fa;
}

.task-save-btn {
    background-color: #007bff;
    border: none;
    color: white;
}

.task-save-btn:hover {
    background-color: #0056b3;
}

.task-save-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Task Loading & Error States */
.task-manager-loading,
.task-manager-error,
.task-manager-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.task-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: task-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes task-spin {
    to {
        transform: rotate(360deg);
    }
}

.task-retry-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.task-retry-btn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .task-modal {
        width: 95%;
        max-height: 95vh;
    }

    .task-form-row {
        grid-template-columns: 1fr;
    }

    .task-card-actions {
        opacity: 1;
    }

    .task-manager-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .task-add-btn {
        width: 100%;
    }
}

/* ==========================================================================
   TASK MANAGER PHASE 3B: DRAG-AND-DROP & LINKED ITEMS
   ========================================================================== */

/* Drag Handle */
.task-card-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    cursor: grab;
    color: #adb5bd;
    font-size: 1em;
    padding: 0 4px;
    user-select: none;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
}

.task-card:hover .task-card-drag-handle {
    opacity: 1;
}

.task-card-drag-handle:hover {
    color: #6c757d;
}

.task-card-drag-handle:active {
    cursor: grabbing;
}

.drag-icon {
    letter-spacing: -2px;
    font-weight: bold;
}

/* Sortable Ghost (placeholder during drag) */
.task-sortable-ghost {
    background-color: #e8f4fd !important;
    border: 2px dashed #3498db !important;
    opacity: 0.6;
}

/* Sortable Chosen (element being dragged) */
.task-sortable-chosen {
    background-color: #fff !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    transform: scale(1.02);
}

/* Sortable Drag (element in motion) */
.task-sortable-drag {
    opacity: 1 !important;
}

/* Task Card with drag handle - adjust layout */
.task-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.task-card-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

/* Linked Item Snippet on Task Card */
.task-linked-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 8px;
    background-color: #f0f4f8;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85em;
    color: #4a5568;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    max-width: 100%;
}

.task-linked-item:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e0;
}

.task-linked-item-missing {
    color: #718096;
    font-style: italic;
}

.linked-item-thumb {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
}

.linked-item-icon {
    font-size: 0.9em;
}

.linked-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Link Item Select in Modal */
.task-linked-item-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-linked-item-select-wrapper select {
    width: 100%;
}

.task-linked-item-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.task-linked-item-search:focus {
    outline: none;
    border-color: #3498db;
}

.task-form-hint {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 0.8em;
}

/* Task Group List (sortable container) */
.task-sortable {
    min-height: 40px; /* Allow dropping into empty groups */
}

.task-sortable:empty::after {
    content: 'Drop tasks here';
    display: block;
    padding: 20px;
    text-align: center;
    color: #adb5bd;
    font-style: italic;
    border: 2px dashed #e9ecef;
    border-radius: 6px;
}

/* Mobile adjustments for drag-and-drop */
@media (max-width: 768px) {
    .task-card-drag-handle {
        padding: 0 8px;
        margin-right: -4px;
    }

    .linked-item-name {
        max-width: 120px;
    }

    .task-linked-item-select-wrapper {
        gap: 6px;
    }
}

/* Projects Panel Tasks Button */
.projects-tasks-btn {
    flex: 1;
    padding: 12px 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.projects-tasks-btn:hover {
    background-color: #218838;
}

.projects-panel-footer {
    display: flex;
    gap: 10px;
}

.projects-panel-footer .projects-create-btn {
    flex: 1;
}

/* ==========================================================================
   PHASE 5: REAL-TIME UPDATES & UI POLISH
   ========================================================================== */

/* Real-time toast notification styling */
.toast-notification.realtime-toast {
    background-color: rgba(52, 152, 219, 0.95);
    border-left: 4px solid #2980b9;
}

/* Task list smooth update transition */
.task-list-container.updating {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Task card real-time updated highlight */
.task-card.realtime-updated {
    animation: highlightUpdate 2s ease-out;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}

@keyframes highlightUpdate {
    0% {
        background-color: rgba(52, 152, 219, 0.2);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
    }
    100% {
        background-color: inherit;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
}

/* Task card removing animation */
.task-card.removing {
    animation: fadeOutRemove 0.3s ease-out forwards;
}

@keyframes fadeOutRemove {
    0% {
        opacity: 1;
        transform: translateX(0);
        max-height: 100px;
    }
    100% {
        opacity: 0;
        transform: translateX(20px);
        max-height: 0;
        padding: 0;
        margin: 0;
        border: none;
    }
}

/* Loading spinner for Task Manager */
.task-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Project selector modal */
.project-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-selector-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-selector-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-selector-modal.active .project-selector-content {
    transform: translateY(0);
}

.project-selector-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-selector-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.project-selector-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #6c757d;
    padding: 0 8px;
}

.project-selector-close:hover {
    color: #333;
}

.project-selector-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
}

.project-selector-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.project-selector-item:hover {
    background-color: #f8f9fa;
}

.project-selector-item.active {
    background-color: #e7f3ff;
    border: 1px solid #3498db;
}

.project-selector-icon {
    font-size: 1.2em;
}

.project-selector-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.project-selector-meta {
    font-size: 0.85em;
    color: #6c757d;
}

.project-selector-empty {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

/* Chat panel project name in header */
.chat-project-indicator {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-project-indicator .project-icon {
    font-size: 1em;
}

/* Item detail modal - linked task indicator */
.item-linked-tasks {
    margin-top: 16px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.item-linked-tasks h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #6c757d;
}

.item-linked-task {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.item-linked-task:hover {
    background-color: #e9ecef;
}

.item-linked-task:last-child {
    margin-bottom: 0;
}

.item-linked-task .task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.item-linked-task .task-status-dot.pending { background-color: #ffc107; }
.item-linked-task .task-status-dot.in-progress { background-color: #3498db; }
.item-linked-task .task-status-dot.completed { background-color: #28a745; }
.item-linked-task .task-status-dot.blocked { background-color: #dc3545; }

/* Mobile responsive for real-time features */
@media (max-width: 768px) {
    .project-selector-content {
        width: 95%;
        max-height: 70vh;
    }

    .toast-notification.realtime-toast {
        font-size: 0.9em;
        padding: 10px 16px;
    }
}

/* ============================================= */
/* Plan Component Cards - Clickable Media Carousel */
/* ============================================= */

/* Container for all plan component cards */
.plan-components-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.plan-components-carousel::-webkit-scrollbar {
    height: 6px;
}

.plan-components-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.plan-components-carousel::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Individual plan component card */
.plan-component-card {
    flex: 0 0 180px;
    min-width: 180px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.plan-component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.plan-component-card.locked {
    border-top: 3px solid #28a745;
}

.plan-component-card.idea {
    border-top: 3px solid #ffc107;
}

/* Media container - holds collage or single image */
.plan-component-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

/* Single image display */
.plan-component-media .single-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.plan-component-card:hover .plan-component-media .single-image {
    transform: scale(1.05);
}

/* Collage grid (2x2 for multiple images) */
.plan-component-media .media-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;
}

.plan-component-media .media-collage .collage-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* For 1 image, full size */
.plan-component-media .media-collage.single .collage-img {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

/* For 2 images, side by side */
.plan-component-media .media-collage.two-images .collage-img {
    grid-row: 1 / -1;
}

/* For 3 images, one large + two small */
.plan-component-media .media-collage.three-images .collage-img:first-child {
    grid-row: 1 / -1;
}

/* Image scroll indicator (if multiple images) */
.plan-component-media .image-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.plan-component-media .image-count::before {
    content: '📷';
    font-size: 0.9em;
}

/* Status badge on component card */
.plan-component-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.plan-component-badge.locked {
    background: #28a745;
    color: white;
}

.plan-component-badge.idea {
    background: #ffc107;
    color: #333;
}

/* Component info section */
.plan-component-info {
    padding: 10px;
}

.plan-component-name {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-component-details {
    font-size: 0.75em;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.plan-component-quantity {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.plan-component-price {
    color: #28a745;
    font-weight: 600;
}

.plan-component-note-indicator {
    color: #007bff;
    font-size: 1.1em;
}

/* Component Detail Modal (overlay on top of main detail modal) */
.component-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.component-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.component-detail-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s;
}

.component-detail-overlay.active .component-detail-modal {
    transform: scale(1) translateY(0);
}

.component-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.component-detail-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.component-detail-close {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.component-detail-close:hover {
    color: #333;
}

.component-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Component detail image gallery */
.component-detail-gallery {
    margin-bottom: 20px;
}

.component-detail-main-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 10px;
}

.component-detail-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.component-detail-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.component-detail-thumb.active,
.component-detail-thumb:hover {
    border-color: #007bff;
}

/* Component info in detail modal */
.component-detail-info {
    margin-bottom: 20px;
}

.component-detail-name {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.component-detail-description {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* Quantity controls in detail modal */
.component-detail-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.component-detail-quantity label {
    font-weight: 500;
    color: #333;
}

.component-detail-quantity .quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden;
}

.component-detail-quantity .quantity-btn {
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.component-detail-quantity .quantity-btn:hover {
    background: #e0e0e0;
}

.component-detail-quantity .quantity-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    font-size: 1em;
    font-weight: 600;
}

.component-detail-quantity .quantity-input::-webkit-outer-spin-button,
.component-detail-quantity .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.component-detail-quantity .quantity-price {
    margin-left: auto;
    font-size: 1.1em;
    font-weight: 600;
    color: #28a745;
}

/* Notes section in detail modal */
.component-detail-notes {
    margin-bottom: 20px;
}

.component-detail-notes label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.component-detail-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
    box-sizing: border-box;
}

.component-detail-notes textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Footer actions */
.component-detail-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.component-detail-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.component-save-btn {
    background: #007bff;
    color: white;
    border: none;
}

.component-save-btn:hover {
    background: #0056b3;
}

.component-view-btn {
    background: white;
    color: #333;
    border: 1px solid #ced4da;
}

.component-view-btn:hover {
    background: #f0f0f0;
}

/* Responsive adjustments for component cards */
@media (max-width: 768px) {
    .plan-component-card {
        flex: 0 0 150px;
        min-width: 150px;
    }

    .plan-component-name {
        font-size: 0.85em;
    }

    .plan-component-info {
        padding: 8px;
    }

    .component-detail-modal {
        width: 95%;
        max-height: 90vh;
    }
}
