/* Recollection Dates Status Styling */
/* Created: September 25, 2025 */

/* Base recollection date styling */
.recollection-date {
    position: relative;
    display: inline-block;
    font-weight: 500;
}

/* Active dates - normal styling */
.recollection-date.status-active {
    color: var(--color-text-primary, #374151);
    font-weight: 500;
}

/* Cancelled dates - red diagonal strikethrough */
.recollection-date.status-cancelled {
    color: #dc2626;
    text-decoration: line-through;
    position: relative;
}

.recollection-date.status-cancelled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc2626;
    transform: rotate(-45deg);
    transform-origin: center;
    z-index: 1;
}

/* TBA dates - italic styling */
.recollection-date.status-tba {
    color: var(--color-warning, #f59e0b);
    font-style: italic;
    font-weight: 600;
}

/* Moved dates - show original struck out + new date */
.recollection-date.status-moved {
    color: var(--color-text-primary, #374151);
    position: relative;
}

.recollection-date.status-moved .original-date {
    text-decoration: line-through;
    color: var(--color-text-muted, #6b7280);
    margin-right: 8px;
}

.recollection-date.status-moved .new-date {
    color: var(--color-success, #16a34a);
    font-weight: 600;
}

/* Annotated dates - normal styling with footnote support */
.recollection-date.status-annotated {
    color: var(--color-text-primary, #374151);
    font-weight: 500;
}

/* Empty cells - muted styling */
.recollection-date.status-empty {
    color: var(--color-text-muted, #6b7280);
    font-weight: 300;
}

/* Table cell styling for status-based backgrounds */
.recollection-table td.status-active {
    background: #f0fdf4;
}

.recollection-table td.status-cancelled {
    background: #fef2f2;
}

.recollection-table td.status-tba {
    background: #fffbeb;
}

.recollection-table td.status-moved {
    background: #f0fdf4;
}

.recollection-table td.status-annotated {
    background: #f0fdf4;
}

.recollection-table td.status-empty {
    background: #f9fafb;
}

/* Footnote link styling - filled circle with number inside */
.footnote-link-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    background-color: var(--color-brand, #97AC98);
    color: white;
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: 600;
    vertical-align: super;
    line-height: 1;
    margin-left: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.footnote-link-circle:hover {
    background-color: var(--color-brand-dark, #7a8d7b);
    transform: scale(1.1);
}

.footnote-link-circle:focus {
    outline: 2px solid var(--color-brand, #97AC98);
    outline-offset: 2px;
    border-radius: 50%;
}

/* Footnotes section styling */
#recollection-footnotes {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.recollection-footnotes-section {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.recollection-footnotes-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.recollection-footnotes-section ol {
    list-style: none;
    padding-left: 0;
    counter-reset: footnote-counter;
}

.recollection-footnotes-section .footnote-item {
    margin-bottom: 0.75rem;
    padding-left: 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.recollection-footnotes-section .footnote-number-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    min-width: 1.5em;
    background-color: var(--color-brand, #97AC98);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

.recollection-footnotes-section .footnote-text {
    color: #374151;
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recollection-date.status-moved .original-date {
        margin-right: 4px;
        font-size: 0.9em;
    }
    
    .recollection-date.status-moved .new-date {
        font-size: 0.9em;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .recollection-date.status-cancelled {
        color: #000;
        background: #ff0000;
    }
    
    .recollection-date.status-tba {
        color: #000;
        background: #ffff00;
    }
    
    .recollection-date.status-moved .new-date {
        color: #000;
        background: #00ff00;
    }
}

/* Print styles */
@media print {
    .recollection-date.status-cancelled::after {
        display: none;
    }
    
    .recollection-date.status-cancelled {
        text-decoration: line-through;
    }
    
    .recollection-date.status-moved .original-date {
        text-decoration: line-through;
    }
}
