/* Advanced Calendar View Styles */
.advanced-calendar-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ICS Event Styles */
.fc-event[data-ics-event="true"] {
    opacity: 0.9;
    border-radius: 4px;
}

/* Only apply calendar emoji to ICS events in non-list views */
.fc-daygrid-event[data-ics-event="true"]:before,
.fc-timegrid-event[data-ics-event="true"]:before {
    content: "📅";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    opacity: 0.7;
}

.fc-event[data-ics-event="true"]:hover {
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ICS Event Info Modal */
.ics-event-description {
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.9em;
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--background-secondary);
    border-radius: 4px;
}

/* ICS Context Menu */
.ics-event-context-menu {
    font-size: 0.9em;
}

.ics-context-menu-item:hover {
    background-color: var(--background-modifier-hover) !important;
}

/* Timeblock Help Text */
.advanced-calendar-view__help-text {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--background-secondary);
    border-radius: 4px;
    border-left: 3px solid var(--color-accent);
}

/* Event Type Specific Styles */

/* Timeblock Events */
.fc-timeblock-event,
.fc-event[data-event-type="timeblock"] {
    opacity: 0.9;
    border-radius: 6px;
    border-width: 2px !important;
    border-style: solid !important;
}

.fc-timeblock-event:hover,
.fc-event[data-event-type="timeblock"]:hover {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Task Events */
.fc-task-event {
    border-radius: 4px;
    border-width: 1px !important;
}

.fc-task-event:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ICS Events - only in non-list views */
.fc-daygrid-event.fc-ics-event,
.fc-timegrid-event.fc-ics-event {
    border-radius: 4px;
    border-width: 2px !important;
    border-style: solid !important;
}

.fc-daygrid-event.fc-ics-event:hover,
.fc-timegrid-event.fc-ics-event:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Recurring Events */
.fc-recurring-event {
    border-style: dashed !important;
}

/* Completed Events */
.fc-completed-event {
    opacity: 0.7;
}

/* Timeblock Modal Styles */
.timeblock-creation-modal .modal-content {
    max-width: 500px;
}

.timeblock-date-display {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--background-secondary);
    border-radius: 6px;
    text-align: center;
}

.timeblock-time-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.timeblock-modal-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.timeblock-help-text {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--background-secondary);
    border-radius: 4px;
    line-height: 1.4;
}

.timeblock-help-text code {
    background: var(--background-primary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Attachment Selection Styles */
.timeblock-attachments-list {
    margin-top: 0.5rem;
    min-height: 2rem;
}

.timeblock-attachments-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9em;
    padding: 0.5rem;
    text-align: center;
    background: var(--background-secondary);
    border-radius: 4px;
}

.timeblock-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--background-secondary);
    border-radius: 4px;
    border: 1px solid var(--background-modifier-border);
}

.timeblock-attachment-item:hover {
    background: var(--background-modifier-hover);
}

.timeblock-attachment-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.timeblock-attachment-name {
    font-weight: 500;
    color: var(--text-normal);
    display: block;
}

.timeblock-attachment-path {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 0.2rem;
    word-break: break-all;
}

.timeblock-attachment-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2em;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.timeblock-attachment-remove:hover {
    background: var(--background-modifier-error);
    color: var(--text-on-accent);
}

/* Attachment Suggestion Modal Styles */
.attachment-suggestion {
    padding: 0.5rem;
}

.attachment-name {
    font-weight: 500;
    color: var(--text-normal);
}

.attachment-path {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Timeblock Info Modal */
.timeblock-description {
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.9em;
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--background-secondary);
    border-radius: 4px;
}

.timeblock-attachments {
    margin-top: 0.5rem;
}

.timeblock-attachment-item {
    margin-bottom: 0.25rem;
}

.timeblock-attachment-item .internal-link {
    color: var(--link-color);
    text-decoration: none;
    cursor: pointer;
}

.timeblock-attachment-item .internal-link:hover {
    text-decoration: underline;
}

/* ICS Subscription Settings */
.ics-subscription-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--background-modifier-border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.settings-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.settings-status-indicator.enabled {
    background-color: var(--text-success);
}

.settings-status-indicator.enabled.error {
    background-color: var(--text-error);
}

.settings-status-indicator.disabled {
    background-color: var(--text-muted);
}

.ics-subscription-info {
    flex: 1;
    min-width: 0;
}

.ics-subscription-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ics-subscription-url {
    font-size: 0.85em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.ics-subscription-meta {
    font-size: 0.8em;
    color: var(--text-muted);
}

.ics-subscription-error {
    font-size: 0.8em;
    color: var(--text-error);
    margin-top: 0.25rem;
}

.ics-subscription-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Use consistent button system */
.ics-subscription-actions button {
    background: transparent;
    color: var(--text-normal);
    border: none;
    box-shadow: none;
    font-size: 0.8em;
}

.ics-subscription-actions button:hover {
    background: var(--tn-interactive-hover);
}

.ics-subscription-toggle.enabled {
    color: var(--text-success);
    border-color: var(--text-success);
}

.ics-subscription-toggle.disabled {
    color: var(--text-muted);
    border-color: var(--text-muted);
}

.ics-subscription-delete {
    color: var(--text-error) !important;
    border-color: var(--text-error) !important;
}

.ics-subscription-delete:hover {
    background: var(--text-error) !important;
    color: white !important;
}

/* ICS Subscription Forms */
.ics-add-subscription-form,
.ics-edit-form {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--background-modifier-border);
    border-radius: 4px;
    background: var(--background-secondary);
}

.ics-form-row,
.ics-edit-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ics-form-row-multi,
.ics-edit-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ics-form-group,
.ics-edit-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
}

.ics-form-label,
.ics-edit-label {
    min-width: 80px;
    font-weight: 500;
    flex-shrink: 0;
}

.ics-form-input,
.ics-edit-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--background-modifier-border);
    border-radius: 3px;
    background: var(--background-primary);
    color: var(--text-normal);
}

.ics-form-color,
.ics-edit-color {
    width: 40px;
    height: 30px;
    border: 1px solid var(--background-modifier-border);
    border-radius: 3px;
    cursor: pointer;
}

.ics-form-number,
.ics-edit-number {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--background-modifier-border);
    border-radius: 3px;
    background: var(--background-primary);
    color: var(--text-normal);
}

.ics-form-checkbox-label,
.ics-edit-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.ics-form-checkbox,
.ics-edit-checkbox {
    margin: 0;
}

/* Use consistent button system */
.ics-form-button,
.ics-edit-button {
    background: transparent;
    color: var(--text-normal);
    border: none;
    box-shadow: none;
    margin-right: 0.5rem;
}

.ics-form-button:hover,
.ics-edit-button:hover {
    background: var(--tn-interactive-hover);
}

.ics-form-button.mod-cta,
.ics-edit-button.mod-cta {
    background: var(--interactive-accent);
    color: var(--text-on-accent);
    border: none;
    box-shadow: none;
}

.ics-form-button.mod-cta:hover,
.ics-edit-button.mod-cta:hover {
    background: var(--interactive-accent-hover);
    box-shadow: none;
}

.ics-edit-buttons {
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.ics-subscription-editing {
    background: var(--background-secondary);
    border-color: var(--interactive-accent);
}

.advanced-calendar-view__container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.advanced-calendar-view__header {
    padding: 0.5rem 1rem;
    background: var(--background-primary);
    flex-shrink: 0;
}

.advanced-calendar-view__main-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.advanced-calendar-view__main-row .filter-bar-container {
    flex: 1;
    min-width: 300px;
}

.advanced-calendar-view__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.advanced-calendar-view__schedule-tasks-btn {
    padding: 0.4rem 0.8rem;
    background: var(--interactive-accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.advanced-calendar-view__schedule-tasks-btn:hover {
    background: var(--interactive-accent-hover);
}

.advanced-calendar-view__calendar-container {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--background-modifier-border);
    border-radius: var(--tn-radius-md);
    min-height: 0;
}

/* FullCalendar overrides - Minimalist & Clean */
.advanced-calendar-view .fc {
    height: 100%;
    width: 100%;
    font-family: var(--font-interface);
}

/* Ensure calendar table expands to fill container width */
.advanced-calendar-view .fc-view-harness {
    width: 100%;
}

.advanced-calendar-view .fc-scrollgrid {
    width: 100% !important;
}

.advanced-calendar-view .fc-scrollgrid-sync-table {
    width: 100% !important;
}

/* Remove outer borders only */
.advanced-calendar-view .fc-theme-standard .fc-scrollgrid {
    border: none;
}

/* Light dividers for clean look */
.advanced-calendar-view .fc-col-header-cell {
    border-bottom: 1px solid var(--background-modifier-border);
    border-top: 1px solid var(--background-modifier-border);
}

.advanced-calendar-view .fc-daygrid-day {
    border-right: 1px solid var(--background-modifier-border-hover);
    border-bottom: 1px solid var(--background-modifier-border-hover);
}

.advanced-calendar-view .fc-timegrid-slot {
    border-bottom: 1px solid var(--background-modifier-border-hover);
}

.advanced-calendar-view .fc-timegrid-col {
    border-right: 1px solid var(--background-modifier-border-hover);
}

/* Header toolbar styling */
.advanced-calendar-view .fc-header-toolbar {
    padding: 0;
    border-bottom: 1px solid var(--background-modifier-border);
    background: transparent;
}

/* Calendar title styling - smaller and minimalist */
.advanced-calendar-view .fc-toolbar-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0;
    padding: 0.3rem 0.6rem;
}

.advanced-calendar-view .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.advanced-calendar-view .fc-toolbar.fc-header-toolbar {
    margin-bottom: 0;
}

/* Remove all borders from FullCalendar buttons */
.advanced-calendar-view .fc-button,
.advanced-calendar-view .fc-button-primary,
.advanced-calendar-view .fc-button-secondary,
.advanced-calendar-view .fc-prev-button,
.advanced-calendar-view .fc-next-button,
.advanced-calendar-view .fc-today-button,
.advanced-calendar-view .fc-dayGridMonth-button,
.advanced-calendar-view .fc-timeGridWeek-button,
.advanced-calendar-view .fc-timeGridDay-button,
.advanced-calendar-view .fc-listWeek-button {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Hover states for all FC buttons */
.advanced-calendar-view .fc-button:hover:not(:disabled),
.advanced-calendar-view .fc-button-primary:hover:not(:disabled),
.advanced-calendar-view .fc-button-secondary:hover:not(:disabled),
.advanced-calendar-view .fc-prev-button:hover:not(:disabled),
.advanced-calendar-view .fc-next-button:hover:not(:disabled) {
    background: var(--tn-interactive-hover);
    color: var(--text-normal);
    border: none !important;
    box-shadow: none !important;
}

.advanced-calendar-view .fc-button-primary:disabled {
    background: transparent;
    color: var(--text-faint);
    opacity: 0.5;
}

/* Active state for FC buttons (currently selected view) */
.advanced-calendar-view .fc-button-active,
.advanced-calendar-view .fc-button.fc-button-active {
    background: var(--interactive-accent) !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-on-accent) !important;
}

/* Use consistent button system for today button */
.advanced-calendar-view .fc-today-button {
    background: var(--interactive-accent);
    border: none;
    box-shadow: none;
    color: var(--text-on-accent);
}

.advanced-calendar-view .fc-today-button:hover:not(:disabled) {
    background: var(--interactive-accent-hover);
    box-shadow: none;
}

/* Clean today styling */
.advanced-calendar-view .fc-daygrid-day.fc-day-today {
    background: color-mix(in srgb, var(--interactive-accent) 8%, var(--background-primary)) !important;
    border: 2px solid var(--interactive-accent);
    position: relative;
}

.advanced-calendar-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    font-weight: 600;
    color: var(--interactive-accent) !important;
}

/* Fix today styling specifically for multi-month (year) view */
.advanced-calendar-view .fc-multimonth-daygrid .fc-daygrid-day.fc-day-today {
    background: color-mix(in srgb, var(--interactive-accent) 8%, var(--background-primary)) !important;
    border: 2px solid var(--interactive-accent) !important;
}

.advanced-calendar-view .fc-multimonth-daygrid .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    font-weight: 600;
    color: var(--interactive-accent) !important;
}

.advanced-calendar-view .fc-daygrid-day.fc-day-today::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: var(--interactive-accent);
    border-radius: 50%;
    z-index: 1;
}

/* Header cells */
.advanced-calendar-view .fc-col-header-cell {
    background: var(--background-primary) !important;
    color: var(--text-muted) !important;
    font-weight: 400;
    font-size: 0.75rem;
    /* text-transform: lowercase; */
    letter-spacing: 0;
    padding: 0.5rem 0.5rem;
}

/* Day cells - ensure proper theme colors */
.advanced-calendar-view .fc-daygrid-day {
    background: var(--background-primary) !important;
    color: var(--text-normal) !important;
}

/* Multi-month (year view) styling - minimalist */
.advanced-calendar-view .fc-multimonth-daygrid .fc-daygrid-day {
    background: var(--background-primary) !important;
    color: var(--text-normal) !important;
}

/* Multi-month month headers */
.advanced-calendar-view .fc-multimonth-header {
    background: transparent !important;
    color: var(--text-normal) !important;
    border-bottom: 1px solid var(--divider-color);
}

.advanced-calendar-view .fc-multimonth-title {
    background: transparent !important;
    color: var(--text-normal) !important;
    font-weight: 500;
    padding: 0.5rem;
}

/* Multi-month day headers (Mon, Tue, etc.) */
.advanced-calendar-view .fc-multimonth .fc-col-header-cell {
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Day numbers */
.advanced-calendar-view .fc-daygrid-day-number {
    color: var(--text-normal) !important;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0.5rem;
}

/* List view day headers - minimalist */
.advanced-calendar-view .fc-list-day-cushion {
    background: transparent !important;
    color: var(--text-normal) !important;
    font-weight: 500;
    border-bottom: 1px solid var(--divider-color);
    padding: 0.5rem 0.25rem;
}

.advanced-calendar-view .fc-list-day {
    background: transparent !important;
}

/* Clean event styling */
.advanced-calendar-view .fc-event {
    border-radius: 6px;
    border: 1px solid;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.advanced-calendar-view .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.advanced-calendar-view .fc-event-title {
    font-weight: 500;
    line-height: 1.3;
	text-decoration: inherit;
}

/* Time grid specific styles */
.advanced-calendar-view .fc-timegrid-slot {
    height: 3rem;
}

.advanced-calendar-view .fc-timegrid-slot-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem;
}

.advanced-calendar-view .fc-timegrid-axis {
    width: 4rem;
}


/* More events link */
.advanced-calendar-view .fc-more-link {
    color: var(--interactive-accent);
    font-size: 0.75rem;
    font-weight: 500;
}

.advanced-calendar-view .fc-more-link:hover {
    color: var(--interactive-accent-hover);
}

/* Current time indicator (red line) */
.advanced-calendar-view .fc-timegrid-now-indicator-line {
    border-color: #ff0000;
    border-width: 1px;
}

.advanced-calendar-view .fc-timegrid-now-indicator-arrow {
    border-color: #ff0000;
}

/* Mobile collapse toggle - hidden by default */
.advanced-calendar-view__mobile-toggle {
    display: none;
    padding: 0.5rem 1rem;
}

.advanced-calendar-view__collapse-btn {
    background: var(--interactive-normal);
    color: var(--text-normal);
    border: 1px solid var(--background-modifier-border);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-calendar-view__collapse-btn:hover {
    background: var(--interactive-hover);
}

/* Responsive design */
@media (max-width: 1200px) {
    .advanced-calendar-view__main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .advanced-calendar-view__main-row .filter-bar-container {
        min-width: unset;
    }
    
    .advanced-calendar-view__controls {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    /* Show mobile toggle on small screens */
    .advanced-calendar-view__mobile-toggle {
        display: block;
    }
    
    /* Hide main row by default on mobile when collapsed */
    .advanced-calendar-view__main-row.collapsed {
        display: none;
    }
    
    .advanced-calendar-view__main-row.expanded {
        display: flex;
    }
    
    .advanced-calendar-view__controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    
    .advanced-calendar-view__schedule-tasks-btn {
        align-self: center;
    }
    
    .advanced-calendar-view__calendar-container {
        padding: 0.5rem;
    }
    
    /* Reduce header padding on mobile */
    .advanced-calendar-view__header {
        padding: 0.25rem 0.5rem;
    }
}

/* Today highlighting disabled */
.hide-today-highlight .fc-unthemed td.fc-today {
    background: inherit;
}

.hide-today-highlight .fc-daygrid-day.fc-day-today {
    background: inherit !important;
    border: none !important;
}

.hide-today-highlight .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    font-weight: 400;
    color: var(--text-normal);
}

.hide-today-highlight .fc-daygrid-day.fc-day-today::before {
    display: none;
}

.hide-today-highlight .fc-timegrid-col.fc-day-today {
    background: inherit !important;
    border: none !important;
}

/* ICS Refresh Button - Match exact styling of other FullCalendar buttons */
.advanced-calendar-view .fc-refreshICS-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.advanced-calendar-view .fc-refreshICS-button .fc-icon,
.advanced-calendar-view .fc-refreshICS-button .fc-button-label {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    line-height: 1.2;
    display: inline;
    visibility: visible;
}

/* Hover state - match other buttons exactly */
.advanced-calendar-view .fc-refreshICS-button:hover:not(:disabled) {
    background: var(--tn-interactive-hover) !important;
    color: var(--text-normal) !important;
    border: none !important;
    box-shadow: none !important;
}

.advanced-calendar-view .fc-refreshICS-button:hover:not(:disabled) .fc-icon,
.advanced-calendar-view .fc-refreshICS-button:hover:not(:disabled) .fc-button-label {
    color: var(--text-normal) !important;
}

/* Active/Focus state - match other buttons */
.advanced-calendar-view .fc-refreshICS-button:active,
.advanced-calendar-view .fc-refreshICS-button:focus {
    background: var(--tn-interactive-hover) !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--text-normal) !important;
}

/* Disabled state - match other buttons */
.advanced-calendar-view .fc-refreshICS-button:disabled {
    background: transparent !important;
    color: var(--text-faint) !important;
    opacity: 0.5 !important;
    border: none !important;
    box-shadow: none !important;
}

/* ===== CLEAN LIST VIEW STYLING - NO INHERITANCE ===== */

/* Base styling for ALL list events - completely independent from calendar views */
.fc-list-event {
    /* Reset any inherited styling from calendar views */
    opacity: 1 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Consistent light hover background for ALL list events */
.fc-list-event:hover {
    background-color: var(--background-modifier-hover) !important;
}

/* Fix time element color on hover in list view */
.fc-list-event:hover .fc-list-event-time {
    color: inherit !important;
    background-color: transparent !important;
}

.fc-list-event .fc-list-event-time {
    /* Consistent time styling for all events */
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
    vertical-align: top;
}

.fc-list-event .fc-list-event-title {
    /* Base title styling - clean and consistent */
    padding: 8px 12px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    display: table-cell;
    vertical-align: top;
}


.fc-list-event .fc-list-event-dot {
    /* Standard dot styling for all events */
    border: inherit !important;
    background: inherit !important;
}

/* ===== TASK-SPECIFIC ENHANCEMENTS ===== */

/* Task events get ONLY functional enhancements - NO visual styling differences */
.fc-list-event.fc-list-task-card .fc-list-event-title {
    /* Keep base styling identical to ICS events - no background, borders, or shadows */
    background-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Remove task-specific hover - now handled by base .fc-list-event:hover */

/* Hide default FullCalendar dot for tasks since we have custom indicators */
.fc-list-event.fc-list-task-card .fc-list-event-dot {
    display: none;
}

/* Style the status dot in graphic column */
.fc-list-event-status-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

/* Prevent graphic column from getting hover background */
.fc-list-event:hover .fc-list-event-graphic {
    background-color: transparent !important;
}

/* Task title row with indicators on same line */
.fc-list-task-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 4px;
}

/* Metadata spacing without separators */
.fc-list-task-metadata > span {
    display: block;
    margin: 2px 0;
}

/* Status and priority dots */
.fc-list-task-status-dot,
.fc-list-task-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background-color: transparent;
    flex-shrink: 0;
}

.fc-list-task-priority-dot {
    cursor: pointer;
}

.fc-list-task-priority-dot {
    background-color: var(--priority-color, currentColor);
}

/* Recurring indicator styling */
.fc-list-task-recurring-indicator {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.7;
    cursor: pointer;
}

.fc-list-task-recurring-indicator:hover {
    opacity: 1;
}

.fc-list-task-status-dot {
    border-color: var(--current-status-color, var(--text-muted));
}

/* Recurring indicator */
.fc-list-task-recurring-indicator {
    font-size: 12px;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Task title */
.fc-list-task-title {
    font-weight: 500 !important;
    color: var(--text-normal) !important;
    font-size: 14px !important;
    flex-grow: 1;
}

/* Task metadata */
.fc-list-task-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.fc-list-task-metadata > span {
    background-color: var(--background-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.fc-list-task-projects {
    background-color: rgba(var(--color-blue-rgb, 13 110 253), 0.1) !important;
    color: var(--color-blue) !important;
}

.fc-list-task-contexts {
    background-color: rgba(var(--color-green-rgb, 25 135 84), 0.1) !important;
    color: var(--color-green) !important;
}

.fc-list-task-tags {
    background-color: rgba(var(--color-purple-rgb, 102 16 242), 0.1) !important;
    color: var(--color-purple) !important;
}

.fc-list-task-time-estimate {
    background-color: rgba(var(--color-orange-rgb, 255 159 67), 0.1) !important;
    color: var(--color-orange) !important;
}

.fc-list-task-metadata-separator {
    color: var(--text-faint);
    font-weight: 300;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .fc-list-task-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .fc-list-task-title-row {
        gap: 4px;
    }
}

/* Animation for newly added events */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fc-list-event.fc-list-task-card[data-newly-added] {
    animation: slideInUp 0.3s ease-out;
}
