/* css/4-modals.css */

.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-overlay);
    z-index: 1000;
    cursor: pointer;
    overflow-y: auto; /* Allow scrolling when modal content is tall */
}

.modal.show {
    display: flex;
    align-items: flex-start; /* Start from top so scroll position is at top */
    justify-content: center;
    padding: 40px 0; /* Add padding so content doesn't touch edges */
}

.modal-content {
    background: var(--color-bg-primary);
    padding: 40px;
    border-radius: 20px !important;
    max-width: 550px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    position: relative;
    cursor: default;
}

/* Adjust modal width for Premium features Explore and Upgrade modal */
#upgradeModal .modal-content {
    max-width: 900px;
}

/* Event Modal and Event Details Modal - 625px width */
#eventModal .modal-content,
#eventDetailsModal .modal-content {
    max-width: 625px;
}

/* Base Modal "X" Close Button */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: var(--color-border-dark);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.modal-close-btn:hover {
    color: var(--color-text-primary);
}

/* Base Modal Title */
.modal-content h2 {
    color: var(--color-text-primary);
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Base Modal Footer Button Container */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-buttons .btn {
    flex: 0 0 auto;
    min-width: 110px;
}

/* --- MODAL STACKING --- */
#authModal,
#eventDetailsModal,
#timelinesManagerModal,
#accountModal,
#friendsModal,
#messageModal,
#profileModal,
#groupMembersModal {
    z-index: 1000;
}

/* Modals that open on top of other modals */
#timelineModal,
#editTimelineModal,
#eventModal,
#groupInviteModal,
#myGroupInvitationsModal {
    z-index: 1010;
}

/* Bulk upload modal appears on top of edit timeline modal */
#bulkUploadEventsModal {
    z-index: 1020;
}

/* --- MODAL SCROLLING --- */
#authModal .modal-content,
#accountModal .modal-content,
#eventModal .modal-content,
#profileModal .modal-content,
#groupsModal .modal-content,
#groupCreateModal .modal-content,
#timelineModal .modal-content,
#editTimelineModal .modal-content,
#eventDetailsModal .modal-content,
#filterModal .modal-content {
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 20px !important;
    /* Ensure scrollbar doesn't clip border-radius */
    scrollbar-gutter: stable;
}

/* Friends modal - fixed tall height with internal scrolling */
#friendsModal .modal-content {
    height: 85vh;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 20px !important;
    padding: 20px;
}

#friendsModal .profile-header {
    margin-bottom: 5px;
    gap: 10px;
}

#friendsModal .profile-header h2 {
    margin-bottom: 0;
}

/* Reduced padding for Friends and Account modals */
#accountModal .modal-content {
    padding: 20px;
}

/* Style scrollbar to match rounded corners */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 20px;
    margin: 20px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- AUTH MODAL SPACING --- */
#authModal #signup-confirm-password-field {
    margin-bottom: 2px;
}

#authModal #login-buttons {
    margin-top: 4px;
}

#authModal #signup-buttons {
    margin-top: 8px;
}

#authModal > .modal-content > div:last-child {
    margin-top: 8px;
}

#authModal #forgot-password-section a:hover {
    text-decoration: underline;
}

/* --- ACCOUNT MODAL TABS --- */
.account-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--color-border-light);
}

.account-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.account-tab-btn:hover {
    color: var(--color-primary);
}

.account-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --- ACCOUNT SECTIONS --- */
.account-section {
    display: none;
}

.account-section.active {
    display: block;
}

/* --- MEMBERSHIP SECTION --- */
.membership-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.membership-plan-info,
.membership-storage-info {
    padding: 20px;
    background: var(--color-bg-secondary);
    border-radius: 10px;
}

.membership-plan-info h3,
.membership-storage-info h3 {
    font-size: 0.9em;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: var(--letter-spacing-ui);
    margin: 0 0 10px 0;
}

.plan-name {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 8px 0;
}

.plan-description {
    font-size: 0.9em;
    color: var(--color-text-muted);
    margin: 0;
    font-style: italic;
}

.membership-features {
    padding: 20px;
    background: var(--color-bg-secondary);
    border-radius: 10px;
}

.membership-features h3 {
    font-size: 0.9em;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: var(--letter-spacing-ui);
    margin: 0 0 15px 0;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    color: var(--color-text-secondary);
}

.feature-checkmark {
    color: var(--color-success);
    font-weight: bold;
    font-size: 1.1em;
}

.storage-text {
    font-size: 0.95em;
    color: var(--color-text-secondary);
    margin: 0 0 12px 0;
}

.storage-bar-container {
    width: 100%;
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.3s;
}

.membership-footer {
    padding-top: 15px;
}

.membership-comparison {
    padding: 20px;
    background: var(--color-bg-secondary);
    border-radius: 10px;
}

.membership-comparison h3 {
    font-size: 0.9em;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: var(--letter-spacing-ui);
    margin: 0 0 20px 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.comparison-column {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.comparison-column:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary-sm);
}

.comparison-header {
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-bg-secondary);
    margin-bottom: 12px;
}

.comparison-header h4 {
    font-size: 1em;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comparison-list li {
    font-size: 0.85em;
    color: var(--color-text-secondary);
    padding-left: 18px;
    position: relative;
}

.comparison-list li:before {
    content: '✓';
    color: var(--color-success);
    font-weight: bold;
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* --- UPGRADE MODAL STYLING --- */
.upgrade-modal-content {
    max-width: 650px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    animation: slideUp 0.3s ease;
}

.upgrade-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.upgrade-modal-header h2 {
    color: var(--color-text-primary);
    font-size: 1.5em;
    margin: 0 0 4px 0;
}

.upgrade-modal-subtitle {
    color: var(--color-text-muted);
    font-size: 0.85em;
    margin: 0;
}

.upgrade-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Align tiers side by side */
.upgrade-plans-grid.side-by-side {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.upgrade-plan-card {
    flex: 1;
    min-width: 250px;
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    padding: 15px;
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.upgrade-plan-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary-md);
    transform: translateY(-2px);
}

.upgrade-plan-card.featured {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: var(--shadow-primary-md);
}

.featured-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient-primary);
    color: var(--color-text-on-brand);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-badge);
}

.plan-card-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.plan-card-header h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    margin: 0 0 3px 0;
}

.plan-card-description {
    color: var(--color-text-muted);
    font-size: 0.8em;
    margin: 0;
    font-style: italic;
}

.plan-card-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9em;
    line-height: 1.4;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.85em;
}

.plan-feature-icon {
    font-size: 1.2em;
    min-width: 24px;
}

.plan-feature-check {
    font-size: 1em;
    color: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
}

.plan-feature-x {
    font-size: 1em;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
}

.upgrade-modal-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--color-bg-secondary);
}

.upgrade-modal-note {
    color: var(--color-text-muted);
    font-size: 0.8em;
    margin-bottom: 10px;
}

/* --- UPGRADE NOTICE MODAL (for limit enforcement) --- */
.upgrade-notice-modal-content {
    max-width: 450px;
    animation: slideUp 0.3s ease;
}

.upgrade-notice-header {
    margin-bottom: 20px;
}

.upgrade-notice-header h3 {
    color: var(--color-warning);
    font-size: 1.4em;
    margin: 0;
}

.upgrade-notice-body {
    margin-bottom: 25px;
}

.upgrade-notice-body > p {
    color: var(--color-text-secondary);
    font-size: 0.95em;
    margin: 0 0 15px 0;
}

.upgrade-notice-details {
    background: #fef3c7;
    border-left: 4px solid var(--color-warning);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #78350f;
    line-height: 1.5;
}

.upgrade-notice-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.upgrade-notice-footer button {
    flex: 0 0 auto;
    min-width: 110px;
}

/* User Documents Table Styles */
.user-documents-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 2.6fr)  /* Name */
        minmax(0, 1.1fr)  /* Type */
        minmax(0, 1.6fr)  /* Event Name */
        minmax(0, 1.3fr)  /* Event Date */
        minmax(0, 1.6fr)  /* Event Tags */
        minmax(0, 1.6fr)  /* Timeline */
        60px;             /* Edit */
    column-gap: 12px;
    align-items: center;
    justify-items: start;
    text-align: left;
}

.user-documents-grid > div {
    text-align: left;
    justify-self: start;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .upgrade-plans-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-modal-header h2 {
        font-size: 1.4em;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ATTACHMENTS MANAGER MODAL - Full-Screen View (mirrors Event Manager)       */
/* ═══════════════════════════════════════════════════════════════════════════ */

.attachments-manager-modal {
    z-index: 1050;
    overflow: hidden; /* Override base modal - this modal handles its own scrolling */
}

.attachments-manager-modal.show {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0; /* Override base modal padding for full-page view */
}

.attachments-manager-content {
    background: var(--color-bg-primary);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
    overflow: hidden; /* Prevent edit panel from causing horizontal scroll during transition */
}

/* Header */
.attachments-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
    gap: 24px;
}

.attachments-manager-header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.am-header-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.attachments-manager-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attachments-manager-header h2 {
    margin: 0;
    font-size: 1.35em;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.attachments-manager-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Group Context Labels for Managers */
.am-group-context-label,
.em-group-context-label,
.tm-group-context-label {
    color: var(--color-primary);
    font-weight: 600;
}

.attachments-manager-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

/* Timeline Selector (matches Event Manager pattern) */
.am-timeline-selector {
    display: flex;
    align-items: center;
}

.am-timeline-selector select {
    padding: 10px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    font-size: 0.95em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-width: 160px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.am-timeline-selector select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.am-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.am-filter-input {
    width: 280px;
    padding: 10px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    font-size: 0.95em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.am-filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.am-filter-input::placeholder {
    color: var(--color-text-muted);
}

.am-filter-select {
    padding: 10px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    font-size: 0.95em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.am-filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.attachments-manager-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.attachments-manager-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.attachments-manager-close-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.attachments-manager-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* Table Container */
.attachments-manager-table-container {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
}

.attachments-manager-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.attachments-manager-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-bg-secondary);
}

.attachments-manager-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
    user-select: none;
}

.attachments-manager-table th:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.am-sort-indicator {
    font-size: 0.8em;
    margin-left: 4px;
    opacity: 0.5;
}

.attachments-manager-table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.15s;
}

.attachments-manager-table tbody tr:hover {
    background: var(--color-bg-hover);
}

.attachments-manager-table td {
    padding: 12px 16px;
    color: var(--color-text-primary);
    vertical-align: middle;
}

/* Column widths (adjusted for checkbox column) */
.am-col-name { width: 18%; min-width: 150px; }
.am-col-type { width: 8%; min-width: 70px; }
.am-col-event { width: 16%; min-width: 120px; }
.am-col-date { width: 10%; min-width: 90px; }
.am-col-tags { width: 14%; min-width: 100px; }
.am-col-timelines { width: 14%; min-width: 100px; }
.am-col-actions { width: 12%; min-width: 100px; text-align: center; }

/* Text truncation */
.am-col-name,
.am-col-event,
.am-col-tags,
.am-col-timelines {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Special States */
.am-special-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.am-special-state-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.6;
}

.am-special-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: var(--color-text-primary);
}

.am-special-state p {
    margin: 0;
    font-size: 0.95em;
}

.am-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: am-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes am-spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.attachments-manager-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.attachments-manager-footer-info {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .attachments-manager-header {
        flex-wrap: wrap;
        gap: 16px;
    }

    .attachments-manager-header-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .am-timeline-selector {
        width: 100%;
        margin-bottom: 8px;
    }

    .am-timeline-selector select {
        width: 100%;
    }

    .am-filter-row {
        flex-wrap: wrap;
        width: 100%;
    }

    .am-filter-input {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .attachments-manager-header {
        padding: 12px 16px;
    }

    .am-header-logo {
        width: 32px;
        height: 32px;
    }

    .attachments-manager-header h2 {
        font-size: 1.1em;
    }

    .attachments-manager-table th,
    .attachments-manager-table td {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    /* Hide less important columns on mobile */
    .am-col-tags,
    .am-col-timelines,
    .am-col-checkbox {
        display: none;
    }
    
    /* Compact bulk bar on mobile */
    .am-bulk-bar {
        flex-wrap: wrap;
        padding: 8px 16px;
    }
    
    .am-bulk-bar-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* Row and cell styles */
.am-row {
    transition: background-color 0.15s ease;
}

.am-row:hover {
    background: var(--color-bg-hover);
}

/* Name cell links */
.am-name-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text-primary);
}

.am-name-link:hover {
    color: var(--color-primary);
}

.am-name-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-file-link {
    color: var(--color-primary);
    text-decoration: underline;
    word-break: break-word;
}

.am-file-link:hover {
    color: var(--color-primary-hover);
}

.am-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

/* Edit button */
.am-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    color: var(--color-primary);
    font-size: 1.1em;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.am-edit-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary-hover);
}

/* No data state */
.am-no-data {
    text-align: center;
    color: var(--color-text-muted);
    padding: 60px 20px !important;
    font-size: 0.95em;
}

/* Subtitle divider (matches Event Manager) */
.am-subtitle-divider {
    color: var(--color-text-muted);
    margin: 0 6px;
}

/* Type badge with icon */
.am-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

/* Helper text in empty states */
.am-helper-text {
    font-size: 0.85em;
    color: var(--color-text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ATTACHMENTS MANAGER - CHECKBOX COLUMN & SELECTION                           */
/* ═══════════════════════════════════════════════════════════════════════════ */

.am-col-checkbox {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center !important;
    padding: 0 8px !important;
}

th.am-col-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

th.am-col-checkbox input[type="checkbox"] {
    margin: 0 auto;
    display: block;
}

.am-row-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.am-row-selected {
    background-color: var(--color-primary-light, rgba(102, 126, 234, 0.1)) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ATTACHMENTS MANAGER - BULK ACTION BAR                                       */
/* ═══════════════════════════════════════════════════════════════════════════ */

.am-bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: var(--color-primary);
    color: white;
    flex-shrink: 0;
    gap: 16px;
}

.am-bulk-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.am-bulk-count {
    font-weight: 600;
    font-size: 0.95em;
}

.am-bulk-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.2s;
}

.am-bulk-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.am-bulk-bar-actions {
    display: flex;
    gap: 8px;
}

.am-bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 14px;
    border-radius: 6px;
    color: white;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.am-bulk-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.am-bulk-action-danger {
    background: rgba(231, 76, 60, 0.8);
    border-color: rgba(231, 76, 60, 0.9);
}

.am-bulk-action-danger:hover {
    background: rgba(231, 76, 60, 1);
    border-color: #e74c3c;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ATTACHMENTS MANAGER - ACTION BUTTONS (matches Event Manager)                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.am-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.am-action-btn:hover {
    background: var(--color-bg-hover);
}

.am-action-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ATTACHMENTS MANAGER - ENHANCED SPECIAL STATES                               */
/* ═══════════════════════════════════════════════════════════════════════════ */

.am-special-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.am-special-state p {
    margin: 0 0 16px 0;
    font-size: 0.95em;
    color: var(--color-text-muted);
}

.am-special-state .btn {
    margin-top: 8px;
}

.am-error-state {
    color: var(--color-error, #e74c3c);
}

.am-error-state h3 {
    color: var(--color-error, #e74c3c);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TIMELINES MANAGER MODAL - Full-Screen Manager View                          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.timelines-manager-modal {
    z-index: 1050;
    overflow: hidden; /* Override base modal - this modal handles its own scrolling */
}

.timelines-manager-modal.show {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0; /* Override base modal padding for full-page view */
}

.timelines-manager-content {
    background: var(--color-bg-primary);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
    overflow: hidden; /* Prevent edit panel from causing horizontal scroll during transition */
}

/* Header */
.timelines-manager-header {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

/* Title Row */
.tm-header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid #e3e3e3;
}

.timelines-manager-header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.tm-header-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.timelines-manager-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timelines-manager-header h2 {
    margin: 0;
    font-size: 1.35em;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.timelines-manager-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.tm-subtitle-divider {
    color: var(--color-text-muted);
    opacity: 0.5;
}

/* Toolbar Row */
.tm-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 24px 10px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

/* Toolbar Left/Right Groups */
.tm-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-toolbar-right {
    margin-left: auto;
}

/* Status Dropdown Selector */
.tm-status-selector {
    display: flex;
    align-items: center;
}

.tm-status-selector select {
    padding: 7px 28px 7px 10px;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-width: 150px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tm-status-selector select:hover {
    border-color: var(--color-border-medium);
}

.tm-status-selector select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

/* Secondary button style for filter */
.tm-action-btn-secondary {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
}

.tm-action-btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.tm-action-btn-secondary svg {
    fill: currentColor;
}

/* Search Wrapper in Header */
.tm-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tm-search-input {
    width: 200px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    transition: all 0.2s;
}

.tm-search-input:focus {
    outline: none;
    border-color: var(--color-primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tm-search-input::placeholder {
    color: var(--color-text-muted);
}

.tm-search-wrapper svg {
    position: absolute;
    left: 10px;
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Icon-only Action Button */
.tm-action-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tm-action-btn-icon:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

.tm-action-btn-icon.primary {
    background: var(--color-primary, #6366f1);
    border-color: var(--color-primary, #6366f1);
    color: white;
}

.tm-action-btn-icon.primary:hover {
    background: var(--color-primary-hover, #4f46e5);
    border-color: var(--color-primary-hover, #4f46e5);
}

/* Timeline Filter Active State (Red Fill) */
#timeline-filter-btn.active {
    background-color: #fde8e8;
    border-color: var(--color-danger, #dc3545);
    color: var(--color-danger, #dc3545);
}

#timeline-filter-btn.active:hover {
    background-color: #fbdcdc;
    border-color: var(--color-danger, #dc3545);
}

#timeline-filter-btn.active svg {
    fill: var(--color-danger, #dc3545);
}

.tm-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s;
}

.tm-action-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-medium);
}

.tm-action-btn:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.tm-action-btn svg {
    flex-shrink: 0;
}

.tm-action-btn-primary {
    background: var(--color-primary, #6366f1);
    border-color: var(--color-primary, #6366f1);
    color: white;
}

.tm-action-btn-primary:hover {
    background: var(--color-primary-hover, #4f46e5);
    border-color: var(--color-primary-hover, #4f46e5);
}

.tm-action-btn-primary svg {
    fill: white;
}

.timelines-manager-header-right {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    margin-top: -4px;
}

.timelines-manager-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.timelines-manager-close-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.timelines-manager-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* Body - Scrollable Content */
/* Body - Contains status tabs and table */
.timelines-manager-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-bg-primary);
}

/* Status Filter Tabs */
.tm-status-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.tm-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tm-status-tab:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.tm-status-tab.active {
    background: var(--color-primary, #6366f1);
    color: white;
    border-color: var(--color-primary, #6366f1);
}

.tm-status-tab .tm-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
}

.tm-status-tab.active .tm-tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Table Container */
.timelines-manager-table-container {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
    scrollbar-gutter: stable; /* Reserve space for scrollbar to prevent layout shift */
}

.timelines-manager-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.timelines-manager-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-bg-secondary);
}

.timelines-manager-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 0.85em;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    opacity: 0.85;
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
    user-select: none;
}

.timelines-manager-table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.15s;
}

.timelines-manager-table tbody tr:hover {
    background: var(--color-bg-hover);
}

.timelines-manager-table tbody tr.tm-inactive-row {
    opacity: 0.6;
}

.timelines-manager-table td {
    padding: 12px 16px;
    color: var(--color-text-primary);
    vertical-align: middle;
}

/* Column Widths */
.tm-col-checkbox { 
    width: 50px; 
    min-width: 50px; 
    max-width: 50px; 
    text-align: center;
}
th.tm-col-checkbox,
td.tm-col-checkbox {
    padding: 12px 8px !important;
}
.tm-col-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 auto;
    display: block;
    cursor: pointer;
}
.tm-col-name { width: 25%; min-width: 180px; }
.tm-col-tags { width: 15%; min-width: 100px; }
.tm-col-events { width: 10%; min-width: 80px; }
.tm-col-visibility { width: 10%; min-width: 80px; }
.tm-col-status { width: 12%; min-width: 120px; }
.tm-col-edit { width: 6%; min-width: 50px; }
.tm-col-spacer { width: auto; }
th.tm-col-visibility,
td.tm-col-visibility,
th.tm-col-status,
td.tm-col-status,
th.tm-col-edit,
td.tm-col-edit,
th.tm-col-events,
td.tm-col-events { text-align: center; }
th.tm-col-edit,
td.tm-col-edit { padding: 12px 4px; }

/* Tags column */
.tm-col-tags {
    max-width: 200px;
}
.tm-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.tm-tag-pill {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gradient-primary);
    border-radius: 12px;
    font-size: 0.75em;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tm-tag-more {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 0.7em;
    color: var(--color-text-secondary);
    font-weight: 500;
}
.tm-tag-none {
    font-size: 0.85em;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Text truncation */
.tm-col-name {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Timeline Name Cell */
.tm-timeline-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Visibility Badge */
.tm-visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.tm-visibility-badge.public {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.tm-visibility-badge.private {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.tm-visibility-badge.friends {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* Events Count */
.tm-events-count {
    font-weight: 500;
    color: var(--color-text-muted);
}

.tm-events-count.clickable {
    color: var(--color-primary, #6366f1);
    cursor: pointer;
    transition: color 0.2s;
}

.tm-events-count.clickable:hover {
    color: var(--color-primary-hover, #4f46e5);
    text-decoration: underline;
}

/* Status Toggle Switch */
.tm-status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.tm-status-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tm-status-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(156, 163, 175, 0.4);
    border-radius: 20px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.tm-status-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tm-status-checkbox:checked + .tm-status-slider {
    background: #22c55e;
}

.tm-status-checkbox:checked + .tm-status-slider::before {
    transform: translateX(16px);
}

.tm-status-checkbox:focus-visible + .tm-status-slider {
    outline: 2px solid var(--color-primary, #6366f1);
    outline-offset: 2px;
}

.tm-status-toggle:hover .tm-status-slider {
    background: rgba(156, 163, 175, 0.6);
}

.tm-status-toggle:hover .tm-status-checkbox:checked + .tm-status-slider {
    background: #16a34a;
}

.tm-status-label {
    font-size: 0.8em;
    font-weight: 500;
    min-width: 50px;
    text-align: left;
}

.tm-status-label.active {
    color: #16a34a;
}

.tm-status-label.inactive {
    color: #6b7280;
}

.timeline-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.timeline-action-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary, #6366f1);
}

.timeline-action-btn svg {
    width: 16px;
    height: 16px;
}

.timeline-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Empty State */
.tm-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.tm-empty-state-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.tm-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.tm-empty-state p {
    margin: 0 0 24px 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.tm-empty-state .btn {
    min-width: 180px;
}

/* Error State */
.tm-error-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.tm-error-state-icon {
    font-size: 3em;
    margin-bottom: 16px;
    color: #dc2626;
}

.tm-error-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #dc2626;
}

.tm-error-state p {
    margin: 0 0 24px 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Footer */
.timelines-manager-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.timelines-manager-footer-info {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .tm-header-title-row {
        padding: 12px 16px 6px 16px;
    }

    .tm-header-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 16px 10px 16px;
    }
    
    .tm-toolbar-left {
        flex-wrap: wrap;
    }
    
    .tm-toolbar-right {
        margin-left: 0;
    }

    .tm-status-selector select {
        min-width: 140px;
        font-size: 0.85em;
    }

    .tm-action-btn {
        padding: 8px 10px;
    }

    .tm-action-btn span {
        display: none;
    }

    .timelines-manager-table th,
    .timelines-manager-table td {
        padding: 10px 12px;
        font-size: 0.9em;
    }

    /* Hide less important columns on mobile */
    .tm-col-visibility,
    .tm-col-events {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TIMELINE EVENTS MODAL - Shows events for a specific timeline                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.timeline-events-modal {
    z-index: 1060;
}

.timeline-events-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-events-content {
    background: var(--color-bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.timeline-events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
}

.timeline-events-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-events-header h2 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.timeline-events-subtitle {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.timeline-events-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.timeline-events-close-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.timeline-events-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.timeline-events-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 0.95em;
}

.timeline-events-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.timeline-event-item {
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: all 0.2s;
}

.timeline-event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timeline-event-text {
    flex: 1;
    min-width: 0;
}

.timeline-event-text h3 {
    font-size: 1.1em;
    margin: 0 0 2px 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-event-text p {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
}

.timeline-event-controls {
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}

.timeline-event-remove-btn {
    background: transparent;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.timeline-event-remove-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Add Event Section */
.timeline-events-add-section {
    padding: 0 0 var(--spacing-md) 0;
}

.timeline-events-list-container {
    display: flex;
    flex-direction: column;
}

.timeline-events-add-wrapper {
    display: flex;
    gap: 6px;
}

.timeline-events-add-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
}

.timeline-events-add-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.timeline-events-add-btn {
    padding: 8px 14px;
    background: var(--color-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.timeline-events-add-btn:hover {
    background: var(--color-primary-dark, #4a5fd9);
}

@media (max-width: 480px) {
    .timeline-events-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .timeline-events-header {
        padding: 16px 20px;
    }
    
    .timeline-events-add-section {
        padding: 0 var(--spacing-md) var(--spacing-sm);
    }
    
    .timeline-events-body {
        padding: var(--spacing-md);
    }
    
    .timeline-event-item {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .timeline-event-text h3 {
        font-size: 1em;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* EVENT MANAGER MODAL - Full-Screen Spreadsheet-Style View                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.event-manager-modal {
    z-index: 1050;
    overflow: hidden; /* Override base modal - this modal handles its own scrolling */
}

.event-manager-modal.show {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0; /* Override base modal padding for full-page view */
}

.event-manager-content {
    background: var(--color-bg-primary);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
    overflow: hidden; /* Prevent edit panel from causing horizontal scroll during transition */
}

/* Header - Matching Timelines Manager pattern */
.event-manager-header {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

/* Title Row */
.em-header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 24px 12px 24px;
    border-bottom: 1px solid #e3e3e3;
}

.event-manager-header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

/* Event Manager Header Logo */
.em-header-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.event-manager-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-manager-header h2 {
    margin: 0;
    font-size: 1.35em;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.event-manager-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.event-manager-divider {
    opacity: 0.5;
}

.event-manager-header-right {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    margin-top: -4px;
}

/* Toolbar Row */
.em-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 24px 10px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

/* Toolbar Left/Right Groups */
.em-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.em-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Timeline Dropdown Selector */
.em-timeline-selector {
    display: flex;
    align-items: center;
}

.em-timeline-selector select {
    padding: 7px 28px 7px 10px;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-width: 150px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.em-timeline-selector select:hover {
    border-color: var(--color-border-medium);
}

.em-timeline-selector select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

/* Action Buttons */
.em-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    height: 36px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.em-action-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-medium);
}

.em-action-btn:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.em-action-btn svg {
    flex-shrink: 0;
}

.em-action-btn-secondary {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
}

.em-action-btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.em-action-btn-secondary svg {
    fill: currentColor;
}

.em-action-btn-primary {
    background: var(--color-primary, #6366f1);
    border-color: var(--color-primary, #6366f1);
    color: white;
}

.em-action-btn-primary:hover {
    background: var(--color-primary-hover, #4f46e5);
    border-color: var(--color-primary-hover, #4f46e5);
}

.em-action-btn-primary svg {
    fill: white;
}

/* Event Manager Filter Active State (Red Fill) */
#emFilterBtn.active {
    background-color: #fde8e8;
    border-color: var(--color-danger, #dc3545);
    color: var(--color-danger, #dc3545);
}

#emFilterBtn.active:hover {
    background-color: #fbdcdc;
    border-color: var(--color-danger, #dc3545);
}

#emFilterBtn.active svg {
    fill: var(--color-danger, #dc3545);
}

/* Pro Feature Buttons (legacy - kept for compatibility) */
.event-manager-pro-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-pro-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.em-pro-btn:hover:not(.em-pro-locked) {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
}

.em-pro-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.em-pro-btn-text {
    white-space: nowrap;
}

/* Pro Badge */
.em-pro-badge {
    font-size: 0.65em;
    font-weight: 700;
    padding: 2px 5px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1e1e;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-badge);
}

/* Locked Pro Buttons */
.em-pro-btn.em-pro-locked {
    opacity: 0.7;
    cursor: pointer; /* Still clickable to show upgrade prompt */
}

.em-pro-btn.em-pro-locked:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-medium);
}

/* Unlocked Pro Buttons - hide badge */
.em-pro-btn:not(.em-pro-locked) .em-pro-badge {
    display: none;
}

/* Filter active indicator */
.em-filter-indicator {
    color: var(--color-danger, #dc3545);
    font-size: 0.7em;
    margin-left: 2px;
    animation: pulse 2s infinite;
}

.em-pro-btn.em-filters-active {
    background-color: #fde8e8;
    border-color: var(--color-danger, #dc3545);
    color: var(--color-danger, #dc3545);
}

.em-pro-btn.em-filters-active:hover {
    background-color: #fbdcdc;
    border-color: var(--color-danger, #dc3545);
}

.em-pro-btn.em-filters-active svg {
    fill: var(--color-danger, #dc3545);
}

/* Icon-only Pro Buttons */
.em-pro-btn.em-pro-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

/* Icon-only Action Button (for table actions) */
.em-action-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.em-action-btn-icon:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary, #6366f1);
}

.em-action-btn-icon svg {
    width: 16px;
    height: 16px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADVANCED FILTERS PANEL (Pro Feature) - Helper Classes
   ═══════════════════════════════════════════════════════════════════════════ */

/* NOTE: Main .em-filters-panel styles are defined later in the file.
   This section contains only helper classes for filter form elements. */

.em-filters-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-medium);
    flex-shrink: 0;
}

.em-filters-panel-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.em-filters-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.em-filters-panel-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.em-filters-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.em-filters-panel-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border-medium);
    flex-shrink: 0;
}

.em-filters-panel-footer .btn {
    flex: 1;
}

/* Filter sections */
.em-filter-section {
    margin-bottom: 20px;
}

.em-filter-label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.em-filter-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9em;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transition: border-color 0.2s;
}

.em-filter-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.em-filter-control::placeholder {
    color: var(--color-text-muted);
}

.em-filter-hint {
    font-size: 0.75em;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.em-filter-divider {
    border: none;
    border-top: 1px solid var(--color-border-light);
    margin: 16px 0;
}

/* Date range row */
.em-filter-date-row {
    display: flex;
    gap: 12px;
}

.em-filter-date-field {
    flex: 1;
}

.em-filter-date-field label {
    display: block;
    font-size: 0.75em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

/* Checkbox group */
.em-filter-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.em-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--color-text-primary);
    cursor: pointer;
}

.em-filter-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Saved views row */
.em-saved-views-row {
    display: flex;
    gap: 8px;
}

.em-saved-views-row select {
    flex: 1;
}

.em-filter-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-border-medium);
    background: var(--color-bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.em-filter-icon-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    border-color: var(--color-primary);
}

.em-filter-icon-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXPORT MODAL STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.em-export-section {
    margin-bottom: 20px;
}

.em-export-label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.em-export-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.em-export-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.em-export-radio-label:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-hover);
}

.em-export-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.em-export-radio-label input[type="radio"]:checked + span {
    color: var(--color-primary);
    font-weight: 500;
}

.em-export-radio-label span {
    font-size: 0.9em;
    color: var(--color-text-primary);
}

.event-manager-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.event-manager-close-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.event-manager-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* Visually hidden but accessible */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Table Container */
.event-manager-table-container {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
    scrollbar-gutter: stable; /* Reserve space for scrollbar to prevent layout shift */
}

.event-manager-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.event-manager-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-bg-secondary);
}

.event-manager-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
    user-select: none;
}

.event-manager-table tbody tr {
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.15s;
}

.event-manager-table tbody tr:hover {
    background: var(--color-bg-hover);
}

.event-manager-table td {
    padding: 12px 16px;
    color: var(--color-text-primary);
    vertical-align: middle;
}

/* Column Widths */
.em-col-checkbox { width: 48px; min-width: 48px; max-width: 48px; text-align: center; }
.em-col-title { width: 16%; min-width: 130px; }
.em-col-date { width: 9%; min-width: 90px; }
.em-col-category { width: 9%; min-width: 80px; }
.em-col-description { width: 18%; min-width: 120px; }
.em-col-visibility { width: 9%; min-width: 85px; }
.em-col-visible-to { width: 9%; min-width: 85px; }
.em-col-status { width: 10%; min-width: 100px; }
.em-col-edit { width: 50px; min-width: 50px; }
th.em-col-edit,
td.em-col-edit { text-align: center; }

/* Center the action button within the cell */
td.em-col-edit .em-action-btn-icon {
    margin: 0 auto;
}

/* Text truncation for long content */
.em-col-title,
.em-col-description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Placeholder row - removed, using special states instead */

/* Footer */
.event-manager-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.event-manager-footer-info {
    font-size: 0.9em;
    color: var(--color-text-muted);
    font-weight: 500;
}

.event-manager-footer-actions {
    display: flex;
    gap: 10px;
}

/* Special States: No Timelines, Error */
.em-special-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.em-special-state-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.em-special-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.em-special-state p {
    margin: 0 0 24px 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.em-special-state .btn {
    min-width: 180px;
}

.em-error-special-state h3 {
    color: #dc2626;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .em-header-title-row {
        padding: 12px 16px 8px 16px;
    }

    .em-header-toolbar {
        padding: 4px 16px 8px 16px;
        gap: 8px;
    }

    .em-timeline-selector select {
        min-width: 130px;
    }

    .event-manager-table {
        font-size: 0.9em;
    }

    .event-manager-table th,
    .event-manager-table td {
        padding: 10px 12px;
    }

    /* Hide less important columns on smaller screens */
    .em-col-description {
        display: none;
    }
}

@media (max-width: 768px) {
    .event-manager-header h2 {
        font-size: 1.2em;
    }

    .event-manager-subtitle {
        display: none;
    }

    .em-header-toolbar {
        flex-wrap: wrap;
    }
    
    .em-toolbar-left {
        flex-wrap: wrap;
    }
    
    .em-toolbar-right {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .em-action-btn {
        height: 32px;
        padding: 6px 10px;
    }

    .em-action-btn span {
        display: none;
    }

    .em-col-category,
    .em-col-visibility,
    .em-col-visible-to,
    .em-col-status {
        display: none;
    }

    .em-col-title { width: 45%; }
    .em-col-date { width: 25%; }
    .em-col-edit { width: 30%; }
    
    .em-pro-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    .em-pro-btn-text {
        display: none;
    }
    
    .em-pro-btn span:first-child {
        font-size: 1.1em;
    }
}

/* Loading State */
.em-loading-row td {
    background: var(--color-bg-secondary);
}

.em-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--color-text-muted);
}

.em-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: em-spin 0.8s linear infinite;
}

@keyframes em-spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.em-empty-row td,
.em-error-row td {
    background: var(--color-bg-secondary);
}

.em-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 8px;
}

.em-empty-icon {
    font-size: 2.5em;
    opacity: 0.5;
    margin-bottom: 8px;
}

.em-empty-message {
    font-size: 1.1em;
    color: var(--color-text-primary);
}

.em-empty-subtext {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Error State */
.em-error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: #ef4444;
}

/* Event Row Styling */
.em-event-row {
    cursor: default;
}

.em-event-row:hover {
    background: var(--color-bg-hover);
}

.em-event-row.em-inactive-row {
    opacity: 0.6;
}

.em-col-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.em-col-description {
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.em-col-category {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Visibility Badge */
.em-visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
}

.em-visibility-private {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
}

.em-visibility-friends {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.em-visibility-public {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Table Row Action Buttons (edit icons in table rows - scoped to not override header toolbar) */
.em-event-row .em-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
    padding: 0;
    gap: 0;
}

.em-event-row .em-action-btn:hover {
    background: var(--color-bg-hover);
}

.em-event-row .em-action-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTION & BULK ACTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Checkbox Column */
.em-col-checkbox {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center !important;
    padding: 0 8px !important;
}

/* Center the checkbox in the header cell */
th.em-col-checkbox {
    text-align: center !important;
}

th.em-col-checkbox input[type="checkbox"],
.em-col-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary, #3b82f6);
    margin: 0 auto;
    display: block;
}

/* Selected Row State */
.em-row-selected {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

.em-row-selected:hover {
    background-color: rgba(59, 130, 246, 0.12) !important;
}

/* Bulk Action Bar */
.event-manager-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
    gap: 16px;
}

.em-bulk-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.em-bulk-count {
    font-weight: 600;
    color: var(--color-primary, #3b82f6);
    font-size: 0.95em;
}

.em-bulk-clear-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.em-bulk-clear-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    border-color: var(--color-text-muted);
}

.em-bulk-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.em-bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--color-text-primary);
    transition: all 0.2s;
    white-space: nowrap;
}

.em-bulk-action-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.em-bulk-action-btn span {
    font-size: 1em;
}

.em-bulk-action-danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.em-bulk-action-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Responsive adjustments for bulk bar */
@media (max-width: 900px) {
    .event-manager-bulk-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .em-bulk-bar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .em-bulk-action-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.8em;
    }

    .em-bulk-action-btn span {
        display: none;
    }
}

@media (max-width: 600px) {
    .em-bulk-bar-actions {
        flex-wrap: wrap;
    }

    .em-bulk-action-btn {
        flex: 0 1 auto;
        font-size: 0.75em;
        padding: 6px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDIT EVENT SLIDE-OUT PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

.em-edit-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

.em-edit-panel.show {
    transform: translateX(0);
}

.em-edit-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.em-edit-panel-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text-primary);
}

.em-edit-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.em-edit-panel-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.em-edit-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.em-edit-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED CANVAS SIDEBAR SYSTEM
   Shared right-hand sidebar used for BOTH event details and filters
   Only ONE can be open at a time
   ═══════════════════════════════════════════════════════════════════════════ */

.canvas-sidebar {
    position: fixed;
    top: var(--app-header-height, 0px);
    right: 0;
    width: 625px;
    max-width: 90vw;
    height: calc(100vh - var(--app-header-height, 0px));
    background-color: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.12);
    z-index: 1100;

    display: flex;
    flex-direction: column;

    transform: translateX(100%);
    transition: transform 0.2s ease-out;
}

/* When a sidebar is open, slide it into view */
.canvas-sidebar.is-open {
    transform: translateX(0);
}

/* Typical inner layout for canvas sidebar */
.canvas-sidebar .yh-sidebar__header {
    flex-shrink: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.canvas-sidebar .yh-sidebar__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary, #1a1a1a);
}

.canvas-sidebar .yh-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted, #666);
    transition: background-color 0.2s, color 0.2s;
}

.canvas-sidebar .yh-sidebar__close:hover {
    background: var(--color-bg-hover, #f0f0f0);
    color: var(--color-text-primary, #1a1a1a);
}

.canvas-sidebar .yh-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.canvas-sidebar .yh-sidebar__footer {
    flex-shrink: 0;
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.canvas-sidebar .yh-sidebar__btn {
    border-radius: 8px;
    font-size: 0.95rem;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, opacity 0.2s;
}

.canvas-sidebar .yh-sidebar__btn--primary {
    background: var(--color-primary, #6366f1);
    color: #ffffff;
}

.canvas-sidebar .yh-sidebar__btn--primary:hover {
    opacity: 0.9;
}

.canvas-sidebar .yh-sidebar__btn--ghost {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.canvas-sidebar .yh-sidebar__btn--ghost:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

/* Responsive: Full width on mobile */
@media (max-width: 768px) {
    .canvas-sidebar {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGACY SIDEBAR STYLES - Kept for backwards compatibility
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container overlay - only used for click-outside on event sidebar if needed */
.yh-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 800;
    display: none;
    justify-content: flex-end;
}

.yh-sidebar-overlay--hidden {
    display: none;
}

.yh-sidebar-overlay--visible {
    display: flex;
}

/* For backwards compatibility with old #sidebarOverlay references */
#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#sidebarOverlay.show {
    opacity: 1;
    visibility: visible;
}

/* Base sidebar styles - kept for backwards compatibility */
.yh-sidebar {
    position: relative;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: var(--color-bg-primary, white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1100;
}

/* Right-side sidebar */
.yh-sidebar--right {
    /* Handled by ID-based styles above */
}

.yh-sidebar--hidden {
    /* Now using translateX instead of display:none */
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR CONTENT LAYOUT - Unified internal container for both sidebars
   ═══════════════════════════════════════════════════════════════════════════ */

.event-details-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #fff;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER SIDEBAR - Internal layout styles
   ═══════════════════════════════════════════════════════════════════════════ */

#filterSidebar .event-details-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#filterSidebar .sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

#filterSidebar .sidebar-header,
#filterSidebar .sidebar-footer {
    flex-shrink: 0;
}

#filterSidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e3e3e3;
}

#filterSidebar .sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

#filterSidebar .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-size: 24px;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s;
}

#filterSidebar .sidebar-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

#filterSidebar .sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid #e3e3e3;
    background: #f8f8f8;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

#filterSidebar .clear-btn,
#filterSidebar .apply-btn {
    border-radius: 8px;
    font-size: 0.95rem;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

#filterSidebar .clear-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

#filterSidebar .clear-btn:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

#filterSidebar .apply-btn {
    background: var(--color-accent, #007bff);
    color: #fff;
}

#filterSidebar .apply-btn:hover {
    background: var(--color-accent-hover, #0056b3);
}

/* Responsive: Full width on mobile */
@media (max-width: 768px) {
    #filterSidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Sidebar header for canvas sidebars only (not main left sidebar) */
.canvas-sidebar .sidebar-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid #eee;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.sidebar-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid #eee;
}

/* Responsive: Full width on mobile */
@media (max-width: 768px) {
    .yh-sidebar {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .yh-sidebar--right {
        border-radius: 0;
    }
}

/* Legacy ID-based selectors for backward compatibility */
#filterSidebar,
#eventDetailsSidebar {
    /* Inherits from .yh-sidebar .yh-sidebar--right */
}

/* Reuse the yh-sidebar inner styles */
.yh-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-light, #e3e3e3);
    flex-shrink: 0;
}

.yh-sidebar__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary, #1a1a1a);
}

.yh-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted, #666);
    transition: background-color 0.2s, color 0.2s;
}

.yh-sidebar__close:hover {
    background: var(--color-bg-hover, #f0f0f0);
    color: var(--color-text-primary, #1a1a1a);
}

.yh-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 24px 24px;
}

.yh-sidebar__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-light, #e3e3e3);
    background: var(--color-bg-secondary, #f8f8f8);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.yh-sidebar__btn {
    border-radius: 8px;
    font-size: 0.95rem;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, opacity 0.2s;
}

.yh-sidebar__btn--primary {
    background: var(--color-primary, #6366f1);
    color: #ffffff;
}

.yh-sidebar__btn--primary:hover {
    opacity: 0.9;
}

.yh-sidebar__btn--ghost {
    background: transparent;
    color: #e53935;
}

.yh-sidebar__btn--ghost:hover {
    background: rgba(229, 57, 53, 0.08);
}

/* Prevent body scroll when sidebar is open */
.yh-no-scroll {
    overflow: hidden;
}

/* Section styling to match event edit sidebar */
.filter-panel-section {
    margin-bottom: 24px;
}

.filter-panel-section:last-child {
    margin-bottom: 0;
}

/* Section label - matches "Tags / Category" style from event edit */
.filter-section-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--color-text-secondary);
    text-transform: lowercase;
}

/* Tag select dropdown - scoped to filter sidebar */
#filterSidebar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    font-size: 0.95em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

#filterSidebar select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Tag pillbox */
#filterSidebar .tag-pillbox {
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Date filter styling */
#filterSidebar .date-filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#filterSidebar .date-filter-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#filterSidebar .date-filter-label {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-secondary);
}

#filterSidebar .date-filter-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

#filterSidebar .date-filter-inputs select {
    flex: 1;
    margin-bottom: 0;
    padding: 8px 10px;
}

#filterSidebar .date-filter-inputs input {
    flex: 0 0 70px;
    padding: 8px 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    font-size: 0.9em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
}

#filterSidebar .date-filter-inputs input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Attributes checkboxes */
#filterSidebar .attachment-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#filterSidebar .filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light);
}

#filterSidebar .filter-checkbox-label:last-child {
    border-bottom: none;
}

#filterSidebar .filter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

#filterSidebar .filter-checkbox-label span {
    font-size: 0.95em;
    color: var(--color-text-primary);
}

/* Edit Form Styles */
.em-edit-form-group {
    margin-bottom: 20px;
}

.em-edit-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 0.95em;
}

.em-edit-form-group label .required {
    color: #ef4444;
}

.em-edit-form-group input[type="text"],
.em-edit-form-group input[type="date"],
.em-edit-form-group select,
.em-edit-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    font-size: 0.95em;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.em-edit-form-group input:focus,
.em-edit-form-group select:focus,
.em-edit-form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.em-edit-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Timeline Manager Create Panel - chip input styling */
.em-edit-form-group .edc-chip-input-wrapper {
    max-width: 100%;
}

#tmCreateTagInput.edc-chip-input,
#tmEditTagInput.edc-chip-input {
    flex: 1;
    padding: 10px 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 0.95em;
    background: #f9f9f9 !important;
    color: var(--color-text-primary);
    width: auto !important;
}

#tmCreateTagInput.edc-chip-input:focus,
#tmEditTagInput.edc-chip-input:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    background: white !important;
}

.em-edit-help-text {
    margin-top: 4px;
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.em-edit-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Radio Group for Edit/Create Panels */
.em-edit-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.em-edit-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.em-edit-radio-option:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-hover);
}

.em-edit-radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.em-edit-radio-option input[type="radio"]:checked ~ .em-edit-radio-label {
    color: var(--color-primary);
    font-weight: 500;
}

.em-edit-radio-label {
    font-size: 0.9em;
    color: var(--color-text-primary);
}

.em-edit-visibility-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Visibility Select Dropdown */
.em-edit-visibility-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95em;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.em-edit-visibility-select:hover {
    border-color: var(--color-border-medium);
}

.em-edit-visibility-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

/* Effective Visibility Display */
.em-edit-effective-visibility {
    margin-top: 8px;
}

.em-effective-visibility-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg-tertiary, #f5f5f5);
    border-radius: 6px;
    font-size: 0.9em;
}

.em-effective-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.em-effective-note-text {
    color: var(--color-text-muted);
    font-size: 0.9em;
}

.em-effective-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--color-bg-tertiary, #f5f5f5);
    border-radius: 6px;
    font-size: 0.85em;
}

.em-effective-timeline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.em-effective-timeline .em-timeline-name {
    color: var(--color-text-muted);
}

.em-effective-timeline .em-visibility-badge {
    font-size: 0.9em;
    padding: 2px 6px;
}

/* Timeline Checkbox List for Edit Panel */
.em-timeline-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-primary);
}

.em-timeline-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.15s;
    white-space: nowrap;
    margin-bottom: 0;
}

.em-timeline-checkbox:hover {
    background: var(--color-bg-hover);
}

.em-timeline-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.em-timeline-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    min-width: 0;
}

.em-timeline-name {
    font-size: 0.95em;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.em-timeline-visibility {
    font-size: 0.85em;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Edit Form Loading & Error States */
.em-edit-loading,
.em-edit-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    text-align: center;
    color: var(--color-text-muted);
}

.em-edit-error {
    color: #ef4444;
}

.em-edit-form-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Inline edit error (used for validation messages) */
.em-edit-panel-body .em-edit-error {
    display: block;
    padding: 10px 12px;
    background: #ffe6e6;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #e74c3c;
    font-size: 0.9em;
    margin: 10px 0;
    text-align: left;
}

/* Section Divider for edit panel */
.em-edit-section-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 20px 0;
}

/* Timeline Edit Panel - Associated Events Section */
.tm-edit-events-section {
    margin-top: 0;
}

.tm-edit-events-count {
    font-weight: 400;
    color: var(--color-text-muted);
}

.tm-edit-events-add {
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--color-bg-primary);
    padding-bottom: 2px;
}

.tm-edit-events-add-wrapper {
    display: flex;
    gap: 6px;
}

.tm-edit-events-add-input {
    flex: 1;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    background: #f9f9f9;
    color: var(--color-text-primary);
}

.tm-edit-events-add-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
}

/* Scrollable events container */
.tm-edit-events-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Subtle scrollbar styling */
.tm-edit-events-list::-webkit-scrollbar {
    width: 5px;
}

.tm-edit-events-list::-webkit-scrollbar-track {
    background: transparent;
}

.tm-edit-events-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.tm-edit-events-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Compact event card variant */
.tm-edit-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}

.tm-edit-event-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.25);
}

.tm-edit-event-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tm-edit-event-name {
    font-weight: 500;
    font-size: 0.88em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tm-edit-event-date {
    font-size: 0.75em;
    opacity: 0.85;
    line-height: 1.2;
}

.tm-edit-event-date.no-date {
    opacity: 0.6;
    font-style: italic;
}

.tm-edit-event-remove {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tm-edit-event-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tm-edit-events-empty {
    padding: 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85em;
    font-style: italic;
}

.tm-edit-events-empty p {
    margin: 0;
}

/* Danger Zone - Delete Section */
.em-edit-danger-zone {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.em-edit-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.em-edit-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

.em-edit-delete-btn svg {
    flex-shrink: 0;
}

/* Responsive adjustments for edit panel */
@media (max-width: 768px) {
    .em-edit-panel {
        width: 100%;
        /* transform already handles positioning */
    }
}

@media (max-width: 480px) {
    .em-edit-panel-body {
        padding: 16px;
    }

    .em-edit-panel-footer {
        padding: 12px 16px;
    }

    .em-edit-form-group {
        margin-bottom: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BULK ACTION MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.em-bulk-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 11000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.em-bulk-modal.show {
    display: flex;
    opacity: 1;
}

.em-bulk-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.em-bulk-modal.show .em-bulk-modal-content {
    transform: scale(1);
}

.em-bulk-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.em-bulk-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #1f2937;
}

.em-bulk-modal-header h3 span {
    color: #2563eb;
    font-weight: 700;
}

.em-bulk-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.em-bulk-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.em-bulk-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.em-bulk-modal-hint {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 0.9em;
    line-height: 1.5;
}

.em-bulk-modal-subhint {
    margin: 8px 0 16px 0;
    color: #9ca3af;
    font-size: 0.85em;
    font-style: italic;
}

.em-bulk-form-group {
    margin-bottom: 20px;
}

.em-bulk-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.95em;
}

.em-bulk-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95em;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.em-bulk-form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.em-bulk-form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.em-bulk-form-group-inline {
    flex: 1;
}

.em-bulk-shift-input {
    width: 100%;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
}

.em-bulk-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9em;
    margin-top: 8px;
}

.em-bulk-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f9fafb;
}

.em-bulk-modal-footer .btn {
    padding: 10px 20px;
    font-size: 0.95em;
    border-radius: 8px;
}

.em-bulk-modal-footer .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BULK OPERATION TOAST
   ═══════════════════════════════════════════════════════════════════════════ */

.em-bulk-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 500;
    z-index: 12000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.em-bulk-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments for bulk modals */
@media (max-width: 480px) {
    .em-bulk-modal-content {
        max-width: calc(100% - 32px);
        margin: 16px;
    }

    .em-bulk-modal-header,
    .em-bulk-modal-body,
    .em-bulk-modal-footer {
        padding: 16px 20px;
    }

    .em-bulk-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .em-bulk-modal-footer {
        flex-direction: column-reverse;
    }

    .em-bulk-modal-footer .btn {
        width: 100%;
    }

    .em-bulk-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
        text-align: center;
    }

    .em-bulk-toast.show {
        transform: translateX(0) translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENT MANAGER PRO FEATURES - ADVANCED FILTERS PANEL
   ═══════════════════════════════════════════════════════════════════════════ */

/* Filter Active Indicator Badge */
.em-filter-active-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--color-bg-primary, #fff);
    pointer-events: none;
}

/* Make the filter button relative for badge positioning */
.em-toolbar-btn[data-action="filters"] {
    position: relative;
}

/* Advanced Filters Slide-Out Panel */
.em-filters-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--color-bg-primary, #fff);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 11000;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.em-filters-panel.show {
    display: flex;
    transform: translateX(0);
}

.em-filters-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.em-filters-panel-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-text-primary, #111827);
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-filters-panel-header h3::before {
    content: "🔍";
}

.em-filters-panel-close {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--color-text-muted, #6b7280);
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.em-filters-panel-close:hover {
    color: var(--color-text-primary, #111827);
}

.em-filters-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Filter Form Groups */
.em-filter-form-group {
    margin-bottom: 20px;
}

.em-filter-form-group label {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--color-text-secondary, #374151);
    margin-bottom: 8px;
}

.em-filter-input,
.em-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 8px;
    font-size: 0.95em;
    background: var(--color-bg-primary, #fff);
    color: var(--color-text-primary, #111827);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.em-filter-input:focus,
.em-filter-select:focus {
    outline: none;
    border-color: var(--color-primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.em-filter-input::placeholder {
    color: var(--color-text-muted, #9ca3af);
}

/* Date Range Row */
.em-filter-date-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.em-filter-date-row .em-filter-input {
    flex: 1;
}

.em-filter-date-separator {
    color: var(--color-text-muted, #6b7280);
    font-size: 0.9em;
}

/* Multi-Select (Visibility, Categories) */
.em-filter-select[multiple] {
    height: auto;
    min-height: 100px;
    padding: 8px;
}

.em-filter-select[multiple] option {
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.em-filter-select[multiple] option:checked {
    background: var(--color-primary, #667eea);
    color: white;
}

/* Saved Views Section */
.em-saved-views-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.em-saved-views-section h4 {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--color-text-secondary, #374151);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.em-saved-views-section h4::before {
    content: "⭐";
    font-size: 0.9em;
}

.em-saved-views-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.em-saved-view-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg-secondary, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.em-saved-view-item:hover {
    background: var(--color-bg-hover, #f3f4f6);
    border-color: var(--color-primary, #667eea);
}

.em-saved-view-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--color-primary, #667eea);
}

.em-saved-view-name {
    flex: 1;
    font-size: 0.9em;
    color: var(--color-text-primary, #111827);
}

.em-saved-view-delete {
    background: transparent;
    border: none;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    padding: 4px;
    font-size: 1em;
    line-height: 1;
    transition: color 0.2s;
}

.em-saved-view-delete:hover {
    color: #ef4444;
}

.em-save-view-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.em-save-view-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 6px;
    font-size: 0.9em;
}

.em-save-view-row button {
    padding: 8px 16px;
    background: var(--color-primary, #667eea);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.em-save-view-row button:hover {
    background: var(--color-primary-hover, #5a67d8);
}

.em-no-saved-views {
    font-size: 0.85em;
    color: var(--color-text-muted, #6b7280);
    text-align: center;
    padding: 12px;
    font-style: italic;
}

/* Filters Panel Footer */
.em-filters-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    background: var(--color-bg-secondary, #f9fafb);
}

.em-filters-panel-footer .btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENT MANAGER PRO FEATURES - EXPORT MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.em-export-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 11000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.em-export-modal.open {
    display: flex;
}

.em-export-modal-content {
    background: var(--color-bg-primary, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.em-export-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.em-export-modal-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-text-primary, #111827);
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-export-modal-header h3::before {
    content: "📤";
}

.em-export-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--color-text-muted, #6b7280);
    padding: 4px;
    line-height: 1;
}

.em-export-modal-close:hover {
    color: var(--color-text-primary, #111827);
}

.em-export-modal-body {
    padding: 24px;
}

/* Export Option Groups */
.em-export-option-group {
    margin-bottom: 20px;
}

.em-export-option-group label {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--color-text-secondary, #374151);
    margin-bottom: 10px;
}

.em-export-options {
    display: flex;
    gap: 12px;
}

.em-export-radio {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.em-export-radio:hover {
    background: var(--color-bg-secondary, #f9fafb);
}

.em-export-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary, #667eea);
}

.em-export-radio input[type="radio"]:checked + span {
    color: var(--color-primary, #667eea);
    font-weight: 500;
}

.em-export-radio:has(input:checked) {
    border-color: var(--color-primary, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

.em-export-radio span {
    font-size: 0.95em;
    color: var(--color-text-primary, #111827);
}

/* Filename Preview */
.em-export-filename-preview {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--color-bg-secondary, #f9fafb);
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.em-export-filename-preview span {
    display: block;
    font-size: 0.8em;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 4px;
}

.em-export-filename-preview code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--color-primary, #667eea);
}

/* Export Modal Footer */
.em-export-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--color-bg-secondary, #f9fafb);
}

.em-export-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
}

/* Export Processing State */
.em-export-processing {
    display: none;
    text-align: center;
    padding: 20px;
}

.em-export-processing.active {
    display: block;
}

.em-export-processing-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #667eea);
    border-radius: 50%;
    animation: em-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes em-spin {
    to { transform: rotate(360deg); }
}

.em-export-processing-text {
    font-size: 0.9em;
    color: var(--color-text-secondary, #374151);
}

/* Hide export form when processing */
.em-export-modal-body.processing .em-export-form {
    display: none;
}

.em-export-modal-body.processing .em-export-processing {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENT MANAGER PRO FEATURES - RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .em-filters-panel {
        width: 100%;
        max-width: none;
    }

    .em-filters-panel-body {
        padding: 16px;
    }

    .em-filter-date-row {
        flex-direction: column;
        gap: 8px;
    }

    .em-filter-date-separator {
        display: none;
    }

    .em-export-modal-content {
        max-width: calc(100% - 32px);
    }

    .em-export-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .em-filters-panel-header,
    .em-filters-panel-footer {
        padding: 16px 20px;
    }

    .em-export-modal-header,
    .em-export-modal-body,
    .em-export-modal-footer {
        padding: 16px 20px;
    }

    .em-export-modal-footer {
        flex-direction: column-reverse;
    }

    .em-export-modal-footer .btn {
        width: 100%;
    }
}

/* ========================================================================== */
/* NEW EVENT DETAILS CARD - Tabbed Interface */
/* ========================================================================== */

/* Overlay container */
#event-details-card-overlay {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-overlay);
    z-index: 1100;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

#event-details-card-overlay.show {
    display: flex;
}

/* Main card container */
.event-details-card {
    background: var(--color-bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 650px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    cursor: default;
    overflow: hidden;
    position: relative;
}

/* Card content wrapper - needs explicit height constraint for scrolling */
#event-details-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Header section */
.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

/* Title row with inline edit icon */
.event-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.event-card-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small edit icon next to name */
.event-card-name-edit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.6;
}

.event-card-name-edit-icon:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    opacity: 1;
}

.event-card-name-edit-icon svg {
    width: 16px;
    height: 16px;
}

/* Hide name edit icon when notes tab is active */
#event-details-card-overlay[data-active-tab="notes"] .event-card-name-edit-icon {
    display: none !important;
}

.event-card-edit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-edit-btn:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

.event-card-edit-btn svg {
    width: 16px;
    height: 16px;
}

/* Status toggle in header */
.event-card-header-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.event-card-header-toggle .edc-status-toggle {
    gap: 6px;
}

.event-card-header-toggle .edc-status-slider {
    width: 32px;
    height: 18px;
}

.event-card-header-toggle .edc-status-slider::before {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
}

.event-card-header-toggle .edc-status-checkbox:checked + .edc-status-slider::before {
    transform: translateX(14px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENT CARD SIDEBAR COMPACT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Compact header for sidebar */
.event-card-header--compact {
    padding: 12px 16px;
}

.event-card-header--compact .event-card-title {
    font-size: 1.1em;
}

/* Compact tabs for sidebar - horizontal scroll on mobile */
.event-card-tabs--compact {
    padding: 0 16px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.event-card-tabs--compact::-webkit-scrollbar {
    display: none;
}

.event-card-tab--compact {
    padding: 8px 12px;
    font-size: 0.85em;
}

/* Sidebar content area adjustments */
.event-card-content--sidebar {
    padding: 16px;
}

/* Sidebar action bar - contains edit/save/cancel buttons */
.event-sidebar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 16px;
    border-bottom: 1px solid var(--color-border-light, #e3e3e3);
    background: transparent;
    gap: 8px;
}

.event-sidebar-actions--create {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.event-sidebar-actions--create .event-card-name-input--sidebar {
    flex: 1;
    min-width: 0;
    max-width: 350px;
}

.event-sidebar-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.event-card-name-input--sidebar {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light, #ddd);
    border-radius: 6px;
    font-size: 1em;
}

.event-card-name-input--sidebar:focus {
    outline: none;
    border-color: var(--color-primary, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Tabs section - styled to match account modal */
.event-card-tabs {
    display: flex;
    gap: 10px;
    padding: 0 28px;
    border-bottom: 2px solid var(--color-border-light);
    background: transparent;
    flex-shrink: 0;
}

.event-card-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-text-muted);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.event-card-tab:hover {
    color: var(--color-primary);
}

.event-card-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Body/content section - scrollable */
.event-card-body {
    flex: 1 1 0;
    padding: 24px 28px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Details tab styles */
.event-card-detail-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* Two-column layout for details and notes */
.event-card-detail-section.event-card-details-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Left column - metadata */
.edc-details-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* Right column - notes */
.edc-details-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Icon row styling */
.event-card-detail-row--with-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card-detail-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-text-secondary);
}

.event-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* Status toggle styling for event details card */
.edc-status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.edc-status-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.edc-status-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(156, 163, 175, 0.4);
    border-radius: 20px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.edc-status-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.edc-status-checkbox:checked + .edc-status-slider {
    background: #22c55e;
}

.edc-status-checkbox:checked + .edc-status-slider::before {
    transform: translateX(16px);
}

.edc-status-checkbox:focus-visible + .edc-status-slider {
    outline: 2px solid var(--color-primary, #6366f1);
    outline-offset: 2px;
}

.edc-status-toggle:hover .edc-status-slider {
    background: rgba(156, 163, 175, 0.6);
}

.edc-status-toggle:hover .edc-status-checkbox:checked + .edc-status-slider {
    background: #16a34a;
}

/* Edit icon in top right of Details tab */
.event-card-details-edit-btn {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-details-edit-btn:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.event-card-details-edit-btn svg {
    width: 16px;
    height: 16px;
}

.event-card-detail-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card-detail-label {
    font-size: 0.85em;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    text-transform: none;
    letter-spacing: var(--letter-spacing-ui);
}

.event-card-detail-value {
    font-size: 1em;
    color: var(--color-text-primary);
}

.event-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-card-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 20px;
    font-size: 0.85em;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.event-card-notes-row {
    margin-top: 8px;
}

.event-card-notes {
    font-size: 0.95em;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

/* Notes tab styling */
.event-card-notes-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.edc-notes-view-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    position: relative;
}

.edc-notes-content {
    flex: 1;
    font-size: 0.95em;
    color: var(--color-text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
}

.edc-notes-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--color-text-muted);
    font-size: 0.95em;
}

.edc-notes-edit-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    position: relative;
}

.edc-notes-edit-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
}

.edc-notes-view-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    min-height: 32px;
}

.edc-notes-full-textarea {
    flex: 1;
    min-height: 200px;
}

.edc-notes-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.edc-notes-textarea {
    min-height: 150px;
}

.edc-notes-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.edc-notes-separator {
    color: var(--color-border-light);
}

.edc-notes-char-count,
.edc-notes-word-count,
.edc-notes-modified {
    white-space: nowrap;
}

/* Placeholder content styles */
.event-card-placeholder-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.event-card-placeholder-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.event-card-placeholder {
    font-size: 1.1em;
    color: var(--color-text-muted);
    margin: 0 0 8px;
}

.event-card-placeholder-hint {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin: 0;
}

/* Links list styles */
.event-card-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.event-card-link-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.event-card-link-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-card-link-label {
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card-link-url {
    font-size: 0.85em;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card-link-open {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.event-card-link-open:hover {
    transform: scale(1.2);
}

/* Connected events list */
.event-card-connected-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

/* Empty/placeholder value text */
.event-card-empty-value {
    color: var(--color-text-muted);
    font-style: italic;
    opacity: 0.8;
}

/* Close button for card - matches standard modal close button */
.event-card-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: var(--color-border-dark);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

.event-card-close-btn:hover {
    color: var(--color-text-primary);
}

/* ========================================
   EVENT CARD EDIT MODE STYLES
   ======================================== */

/* Edit mode header */
.event-card-header-edit {
    flex-wrap: wrap;
    gap: 12px;
}

.event-card-name-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    font-size: 1.3em;
    font-weight: 600;
    border: 2px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transition: border-color 0.2s;
}

.event-card-name-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg-primary);
}

.event-card-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.event-card-save-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-save-btn:hover {
    background: var(--color-primary-dark, #4a5fd9);
    transform: translateY(-1px);
}

.event-card-save-btn svg {
    width: 16px;
    height: 16px;
}

.event-card-cancel-btn {
    padding: 10px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-cancel-btn:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border-medium);
}

/* Create button (for create mode) */
.event-card-create-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-create-btn:hover {
    background: linear-gradient(135deg, #218838, #1db389);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.event-card-create-btn svg {
    width: 16px;
    height: 16px;
}

/* Create mode header styling - inline layout with input and buttons on same row */
.event-card-header.event-card-header-create {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
}

.event-card-header.event-card-header-create .event-card-name-input {
    flex: 0 1 350px !important;
    min-width: 150px !important;
    max-width: 350px;
    width: 350px;
}

.event-card-header.event-card-header-create .event-card-header-actions {
    flex-shrink: 0;
    margin-left: auto;
}

/* Create mode placeholder for disabled tabs */
.edc-create-mode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    min-height: 200px;
}

.edc-placeholder-icon {
    color: var(--color-text-muted);
    margin-bottom: 16px;
    opacity: 0.6;
}

.edc-placeholder-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 8px 0;
}

.edc-placeholder-message {
    font-size: 0.95em;
    color: var(--color-text-secondary);
    margin: 0 0 20px 0;
    max-width: 280px;
}

.edc-placeholder-btn {
    padding: 10px 20px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edc-placeholder-btn:hover {
    background: var(--color-primary-dark, #4a5fd9);
    transform: translateY(-1px);
}

/* Disabled tabs in edit mode */
.event-card-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.event-card-tab.disabled:hover {
    background: none;
    color: var(--color-text-muted);
}

/* Edit section container */
.event-card-edit-section {
    gap: 20px;
}

/* Edit actions at top of details tab */
.edc-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border-light);
}

/* Required field indicator */
.edc-required {
    color: #e74c3c;
    margin-left: 2px;
}

/* Date inputs row */
.edc-date-inputs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.edc-select {
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    cursor: pointer;
    transition: border-color 0.2s;
}

.edc-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.edc-date-month {
    min-width: 90px;
}

.edc-date-day {
    min-width: 70px;
}

.edc-date-year {
    width: 80px;
}

.edc-input {
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    transition: border-color 0.2s;
}

.edc-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Time inputs row */
.edc-time-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.edc-time-separator {
    font-weight: 600;
    color: var(--color-text-muted);
}

.edc-time-hour, .edc-time-minute {
    min-width: 65px;
}

.edc-time-ampm {
    min-width: 60px;
}

.edc-clear-time-btn {
    padding: 6px 10px;
    background: none;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    color: var(--color-text-muted);
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.edc-clear-time-btn:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

/* Chip input container for timelines/tags */
.edc-chip-input-container {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.edc-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.edc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 6px 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 20px;
    font-size: 0.9em;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.edc-chip-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edc-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
}

.edc-chip-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.edc-chip-input-wrapper {
    display: flex;
    gap: 6px;
    max-width: 312px;
}

.edc-chip-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    min-width: 120px;
}

.edc-chip-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.edc-chip-add-btn {
    padding: 8px 14px;
    background: var(--color-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.edc-chip-add-btn:hover {
    background: var(--color-primary-dark, #4a5fd9);
}

/* Notes textarea */
.edc-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
}

.edc-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg-primary);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .event-details-card {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .event-card-header {
        padding: 20px 20px 14px;
    }
    
    .event-card-header-edit {
        padding: 16px 16px 12px;
    }
    
    .event-card-name-input {
        font-size: 1.1em;
        padding: 8px 12px;
    }
    
    .event-card-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .event-card-title {
        font-size: 1.3em;
    }
    
    .event-card-tabs {
        padding: 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .event-card-tab {
        padding: 12px 14px;
        font-size: 0.85em;
    }
    
    .event-card-body {
        padding: 20px;
    }
    
    .event-card-edit-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .edc-date-inputs,
    .edc-time-inputs {
        flex-wrap: wrap;
    }
    
    .edc-chip-input-wrapper {
        flex-wrap: wrap;
    }
    
    .edc-chip-input {
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    .edc-chip-add-btn {
        flex: 0 0 auto;
    }
}

/* ========================================
   EVENT CARD ATTACHMENTS TAB STYLES
   ======================================== */

/* Attachments tab outer container */
.edc-attachments-tab {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-primary, #ffffff);
    border: 1px solid var(--color-border-light, #e0e0e0);
    border-radius: 12px;
    padding: 16px;
    gap: 12px;
}

/* Attachments header title */
.edc-attachments-header {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--color-text-primary, #333);
    text-align: left;
    margin-bottom: 4px;
}

/* Sub-tabs row (photos / documents / links) */
.edc-attachments-subtabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light, #e0e0e0);
}

/* Individual sub-tab button */
.edc-attachments-subtab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-secondary, #666);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.edc-attachments-subtab-btn:hover {
    background: var(--color-bg-secondary, #f5f5f5);
    color: var(--color-text-primary, #333);
}

/* Active sub-tab */
.edc-attachments-subtab-btn.attachments-subtab-active {
    background: var(--color-primary-light, #e8eaff);
    color: var(--color-primary, #5c6bc0);
    font-weight: 600;
}

/* Attachments content area */
.edc-attachments-content {
    margin-top: 8px;
    min-height: 100px;
}

/* Remove redundant styling from nested photo/doc/link tabs inside attachments */
.edc-attachments-content .edc-photos-tab,
.edc-attachments-content .edc-docs-tab,
.edc-attachments-content .edc-links-tab {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

/* Responsive adjustments for attachments tab */
@media (max-width: 480px) {
    .edc-attachments-tab {
        padding: 12px;
        border-radius: 8px;
    }
    
    .edc-attachments-subtabs {
        gap: 4px;
    }
    
    .edc-attachments-subtab-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

/* ========================================
   EVENT CARD PHOTOS TAB STYLES
   ======================================== */

/* Photos tab container */
.edc-photos-tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Photos header with add button and count */
.edc-photos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Add photos button */
.edc-add-photos-btn,
.edc-add-documents-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edc-add-photos-btn:hover:not(:disabled),
.edc-add-documents-btn:hover:not(:disabled) {
    background: var(--color-primary-dark, #4a5fd9);
    transform: translateY(-1px);
}

.edc-add-photos-btn:disabled,
.edc-add-documents-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edc-btn-icon {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1;
}

/* Photos count badge */
.edc-photos-count {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Uploading indicator */
.edc-photos-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.95em;
}

/* Spinner animation */
.edc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: edc-spin 0.8s linear infinite;
}

@keyframes edc-spin {
    to { transform: rotate(360deg); }
}

/* Photo grid layout */
.edc-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* Individual photo item */
.edc-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-secondary);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.edc-photo-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Photo thumbnail */
.edc-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.edc-photo-item:hover img {
    transform: scale(1.05);
}

/* Remove button on photo */
.edc-photo-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 2;
}

.edc-photo-item:hover .edc-photo-remove-btn {
    opacity: 1;
}

.edc-photo-remove-btn:hover {
    background: rgba(231, 76, 60, 0.9);
    transform: scale(1.1);
}

/* Photo info overlay */
.edc-photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 8px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.2s;
}

.edc-photo-item:hover .edc-photo-info {
    opacity: 1;
}

.edc-photo-name {
    display: block;
    font-size: 0.75em;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments for photos */
@media (max-width: 600px) {
    .edc-photos-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .edc-add-photos-btn,
    .edc-add-documents-btn {
        justify-content: center;
    }
    
    .edc-photos-count {
        text-align: center;
    }
    
    .edc-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .edc-photo-remove-btn {
        opacity: 1; /* Always show on mobile */
        width: 24px;
        height: 24px;
        font-size: 1.1em;
    }
    
    .edc-photo-info {
        opacity: 1; /* Always show on mobile */
    }
}

/* ========================================
   EVENT CARD DOCUMENTS TAB STYLES
   ======================================== */

/* Documents tab container */
.edc-docs-tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Documents header with add button and count */
.edc-docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

/* Add documents button */
.edc-add-docs-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edc-add-docs-btn:hover:not(:disabled) {
    background: var(--color-primary-dark, #4a5fd9);
    transform: translateY(-1px);
}

.edc-add-docs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Documents count badge */
.edc-docs-count {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* Uploading indicator for documents */
.edc-docs-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.95em;
}

/* Upgrade notice for free users */
.edc-docs-upgrade-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.9em;
}

.edc-upgrade-icon {
    font-size: 1.1em;
}

.edc-upgrade-text {
    font-weight: 500;
}

/* Documents list container */
.edc-docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual document item */
.edc-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    transition: background 0.2s;
}

.edc-doc-item:hover {
    background: var(--color-bg-tertiary);
}

/* Document icon */
.edc-doc-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

/* Document info container */
.edc-doc-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Document name/link */
.edc-doc-name {
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.edc-doc-name:hover {
    color: var(--color-primary-dark, #4a5fd9);
    text-decoration: underline;
}

/* Document metadata (size, type) */
.edc-doc-meta {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Remove document button */
.edc-doc-remove-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.1em;
    padding: 6px 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-doc-item:hover .edc-doc-remove-btn {
    opacity: 1;
}

.edc-doc-remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    opacity: 1;
}

/* Responsive adjustments for documents */
@media (max-width: 600px) {
    .edc-docs-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .edc-add-docs-btn {
        justify-content: center;
    }
    
    .edc-docs-count {
        text-align: center;
    }
    
    .edc-docs-upgrade-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .edc-doc-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .edc-doc-icon {
        font-size: 1.3em;
        width: 28px;
    }
    
    .edc-doc-name {
        font-size: 0.95em;
    }
    
    .edc-doc-remove-btn {
        opacity: 1; /* Always show on mobile */
    }
}

/* ========================================
   EVENT CARD LINKS TAB STYLES
   ======================================== */

/* Links tab container */
.edc-links-tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Links row - styled like timelines/tags */
.edc-links-row {
    margin-bottom: 8px;
}

/* Link input wrapper - wider than timeline/tags to fit two inputs */
.edc-link-input-wrapper {
    max-width: 100% !important;
    display: flex;
    gap: 6px;
}

/* URL input - takes more space */
.edc-link-url-field {
    flex: 1.5;
    min-width: 100px;
}

/* Label input - smaller */
.edc-link-label-field {
    flex: 1;
    min-width: 80px;
}

/* Add link section at top - legacy, kept for compatibility */
.edc-links-add-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

/* Inputs row */
.edc-links-inputs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Link input fields - legacy */
.edc-link-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.edc-link-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(91, 111, 223, 0.15);
}

.edc-link-input::placeholder {
    color: var(--color-text-muted);
}

/* Label input slightly smaller */
.edc-link-label-input {
    flex: 0.6;
    min-width: 140px;
}

/* Add link button - styled like Add Photos button */
.edc-add-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.edc-add-link-btn:hover:not(:disabled) {
    background: var(--color-primary-dark, #4a5fd9);
    transform: translateY(-1px);
}

.edc-add-link-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edc-link-btn-icon {
    font-size: 1.1em;
}

.edc-link-btn-text {
    font-weight: 600;
}

/* Links list container */
.edc-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual link item */
.edc-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    transition: background 0.2s;
}

.edc-link-item:hover {
    background: var(--color-bg-tertiary);
}

/* Link icon */
.edc-link-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

/* Link info container */
.edc-link-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Link label (clickable) */
.edc-link-label {
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.edc-link-label:hover {
    color: var(--color-primary-dark, #4a5fd9);
    text-decoration: underline;
}

/* Link URL (secondary text) */
.edc-link-url {
    font-size: 0.8em;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Link action buttons */
.edc-link-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Open link button */
.edc-link-open-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.2em;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-link-open-btn:hover {
    opacity: 1;
    background: var(--color-bg-tertiary);
}

/* Edit link button */
.edc-link-edit-btn {
    background: none;
    border: none;
    font-size: 1em;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-link-item:hover .edc-link-edit-btn {
    opacity: 1;
}

.edc-link-edit-btn:hover {
    background: rgba(91, 111, 223, 0.1);
    opacity: 1;
}

/* Remove link button */
.edc-link-remove-btn {
    background: none;
    border: none;
    font-size: 1em;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-link-item:hover .edc-link-remove-btn {
    opacity: 1;
}

.edc-link-remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    opacity: 1;
}

/* Cancel link edit button - styled like chip add btn */
.edc-cancel-link-edit-btn {
    padding: 8px 14px;
    background: #dc3545;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 6px;
}

.edc-cancel-link-edit-btn:hover {
    background: #c82333;
}

/* Links count */
.edc-links-count {
    font-size: 0.85em;
    color: var(--color-text-muted);
    text-align: right;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-light);
}

/* Responsive adjustments for links */
@media (max-width: 600px) {
    .edc-links-inputs {
        flex-direction: column;
    }
    
    .edc-link-input,
    .edc-link-label-input {
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    .edc-add-link-btn {
        align-self: stretch;
        justify-content: center;
        padding: 10px;
        background: var(--color-bg-secondary);
        border-radius: 8px;
    }
    
    .edc-link-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .edc-link-label {
        font-size: 0.95em;
    }
    
    .edc-link-remove-btn {
        opacity: 1; /* Always show on mobile */
    }
}

/* ========================================
   EVENT CARD CONNECTED EVENTS TAB STYLES
   (Note: "Connected Events" is the UI term for linkedEventIds in Firestore)
   ======================================== */

/* Connected events tab container */
.edc-connected-tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Search section */
.edc-connected-search-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
    position: relative;
}

/* Search input wrapper */
.edc-connected-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Search input */
.edc-connected-search-input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.edc-connected-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(91, 111, 223, 0.15);
}

.edc-connected-search-input::placeholder {
    color: var(--color-text-muted);
}

/* Dropdown arrow */
.edc-connected-dropdown-arrow {
    position: absolute;
    right: 12px;
    color: var(--color-text-muted);
    font-size: 0.7em;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    user-select: none;
}

.edc-connected-dropdown-arrow:hover {
    color: var(--color-text-primary);
}

/* Clear search button */
.edc-connected-search-clear {
    position: absolute;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.3em;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.edc-connected-search-clear:hover {
    color: var(--color-text-primary);
}

/* Search results dropdown */
.edc-connected-search-results {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: scroll;
    margin-top: 8px;
}

/* No results message */
.edc-connected-no-results {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9em;
}

/* More results indicator */
.edc-connected-more-results {
    padding: 10px 14px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85em;
    font-style: italic;
    border-top: 1px solid var(--color-border-light);
}

/* Individual search result */
.edc-connected-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    transition: background 0.15s;
}

.edc-connected-search-result:last-child {
    border-bottom: none;
}

.edc-connected-search-result:hover {
    background: var(--color-bg-secondary);
}

/* Result info */
.edc-connected-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edc-connected-result-name {
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edc-connected-result-meta {
    font-size: 0.8em;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add/Connect button in search results */
.edc-connected-result-add-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--color-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.edc-connected-result-add-btn:hover {
    background: var(--color-primary-dark, #4a5fd9);
}

/* Saving indicator */
.edc-connected-saving {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.95em;
}

/* Connected events list */
.edc-connected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual connected event item */
.edc-connected-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gradient-primary);
    border-radius: 8px;
    color: white;
    transition: all 0.2s;
}

.edc-connected-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Clickable content area */
.edc-connected-item-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* Event info */
.edc-connected-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edc-connected-item-name {
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edc-connected-item-meta {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action buttons container */
.edc-connected-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Open connected event button */
.edc-connected-open-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-connected-open-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

/* Remove connection button */
.edc-connected-remove-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    border-radius: 4px;
}

.edc-connected-item:hover .edc-connected-remove-btn {
    opacity: 1;
}

.edc-connected-remove-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* Connected events count */
.edc-connected-count {
    font-size: 0.85em;
    color: var(--color-text-muted);
    text-align: right;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-light);
}

/* Filtered out notice for connected events */
.edc-connected-filtered-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: rgba(var(--color-warning-rgb, 255, 193, 7), 0.1);
    border: 1px solid rgba(var(--color-warning-rgb, 255, 193, 7), 0.3);
    border-radius: 8px;
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

.edc-connected-filtered-icon {
    font-size: 1.1em;
}

.edc-connected-filtered-text {
    flex: 1;
}

/* Filtered connected event item styling */
.edc-connected-item-filtered {
    opacity: 0.5;
    filter: grayscale(40%);
}

.edc-connected-item-filtered:hover {
    opacity: 0.7;
    filter: grayscale(20%);
}

/* Filtered badge */
.edc-filtered-badge {
    display: inline-block;
    font-size: 0.7em;
    padding: 2px 6px;
    margin-left: 6px;
    background: var(--color-text-muted);
    color: var(--color-bg-primary);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Responsive adjustments for connected events */
@media (max-width: 600px) {
    .edc-connected-search-input {
        padding: 10px 36px 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .edc-connected-search-results {
        max-height: 200px;
    }
    
    .edc-connected-search-result {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .edc-connected-result-add-btn {
        padding: 8px 14px;
        font-size: 0.9em;
    }
    
    .edc-connected-item {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .edc-connected-item-name {
        font-size: 0.95em;
    }
    
    .edc-connected-remove-btn {
        opacity: 1; /* Always show on mobile */
    }
}
