/* /styles/calendar.css */
/* Calendar component styles - COMPLETE FILE with EDIT button styling and RAID DAY VISUAL DISTINCTION */

/* Calendar wrapper fills remaining space */
.calendar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 16px;
    padding: 4px;
    margin-top: 0.2rem;
    position: relative;
    z-index: 1;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(6, 1fr);
    gap: 3px;
    background: #0f172a;
    border-radius: 0;
    overflow: hidden;
    padding: 8px;
    width: 100%;
    height: 100%;
    margin-top: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Day headers */
.day-header {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #60a5fa;
    border: 1px solid #0f172a;
    font-size: 0.9rem;
}

/* Calendar day cells - UPDATED WITH RAID DAY DISTINCTION */
.calendar-day {
    padding: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #0f172a;
    display: flex;
    flex-direction: column;
    min-height: 0;
    cursor: pointer;
    overflow: hidden;
    max-height: 100%;
    border-radius: 0;
}

/* NON-RAID DAYS - Darker background with lock icon (APPLIES TO ALL DATES) */
.calendar-day.non-raid-day {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    opacity: 0.7;
}

.calendar-day.non-raid-day:hover {
    background: linear-gradient(145deg, #1e293b, #334155);
    opacity: 0.8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #1e293b;
}

/* RAID DAYS - Lighter background (ONLY FOR FUTURE DATES) */
.calendar-day:not(.non-raid-day):not(.past-date) {
    background: linear-gradient(145deg, #334155, #475569);
    opacity: 1;
    border-color: rgba(59, 130, 246, 0.3);
}

.calendar-day:not(.non-raid-day):not(.past-date):hover {
    background: linear-gradient(145deg, #475569, #64748b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

/* PAST RAID DAYS - Use darker background like non-raid days */
.calendar-day:not(.non-raid-day).past-date {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    opacity: 0.6;
}

.calendar-day:not(.non-raid-day).past-date:hover {
    background: linear-gradient(145deg, #1e293b, #334155);
    opacity: 0.7;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #1e293b;
}

/* Other month dates - PRESERVE RAID DAY STYLING BUT REDUCE OPACITY */
.calendar-day.other-month {
    opacity: 0.4;
}

/* Non-raid days from other months - even darker */
.calendar-day.other-month.non-raid-day {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    opacity: 0.3;
}

/* Raid days from other months - maintain lighter background */
.calendar-day.other-month:not(.non-raid-day) {
    background: linear-gradient(145deg, #334155, #475569);
    opacity: 0.4;
}

.calendar-day.past-date {
    opacity: 0.6;
    cursor: default;
}

/* Past dates that are also other month */
.calendar-day.past-date.other-month {
    opacity: 0.3;
}

/* DAY ICONS - Background icons for visual distinction */
.day-icon {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

/* Lock icon for non-raid days */
.calendar-day.non-raid-day .day-icon {
    color: #64748b;
    opacity: 0.1;
}

/* Crossed swords for raid days */
.calendar-day:not(.non-raid-day) .day-icon {
    color: #60a5fa;
    opacity: 0.2;
}

/* Past dates - even more subtle icons */
.calendar-day.past-date .day-icon {
    opacity: 0.05;
}

/* Other month dates - very subtle icons but still visible */
.calendar-day.other-month .day-icon {
    opacity: 0.08;
}

/* Day header row with number only */
.day-header-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

/* Day numbers */
.day-number {
    font-weight: 600;
    color: white;
    font-size: 1rem;
    z-index: 10;
    position: relative;
}

/* Non-raid day numbers - more muted */
.calendar-day.non-raid-day .day-number {
    color: #64748b;
}

/* Raid day numbers - bright and clear */
.calendar-day:not(.non-raid-day) .day-number {
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Other month numbers - further muted but maintain raid day distinction */
.calendar-day.other-month .day-number {
    opacity: 0.6;
}

.calendar-day.other-month.non-raid-day .day-number {
    color: #475569;
    opacity: 0.8;
}

.calendar-day.other-month:not(.non-raid-day) .day-number {
    color: #cbd5e1;
    opacity: 0.8;
}

/* Callouts container - FIXED OVERFLOW AND LAYOUT */
.callouts-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    max-height: 100%;
    justify-content: flex-start;
    position: relative;
    z-index: 10;
}

/* Individual callout items - FIXED SIZE */
.callout-item {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    background: none;
    border: none;
    flex-shrink: 0;
    line-height: 1.2;
    min-height: 22px;
    max-height: 22px;
    display: flex;
    align-items: center;
    z-index: 10;
    position: relative;
}

/* LATE callouts - Yellow text */
.callout-late {
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* OUT callouts - Red text */
.callout-out {
    color: #ef4444;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* More callouts indicator - FIXED TO BOTTOM */
.more-callouts {
    color: #9ca3af;
    font-size: 0.7rem;
    text-align: center;
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    min-height: 16px;
    max-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 50px;
    margin: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(2px);
    z-index: 15;
}

.more-callouts:hover {
    background: rgba(156, 163, 175, 0.3);
    color: #d1d5db;
}

/* Vertical ADD button - ONLY ON RAID DAYS */
.add-btn-vertical {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.4rem 0.25rem;
    border-radius: 6px 0 0 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.8;
    letter-spacing: 0;
    min-height: 45px;
    max-height: 45px;
    justify-content: center;
    z-index: 20;
}

.add-btn-vertical:hover {
    transform: translateY(-50%) translateX(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
}

.add-btn-vertical span {
    display: block;
    margin: 0;
    padding: 1px 0;
    font-size: 0.7rem;
}

/* Vertical EDIT button - Orange styling for existing callouts */
.edit-btn-vertical {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border: none;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.4rem 0.25rem;
    border-radius: 6px 0 0 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.8;
    letter-spacing: 0;
    min-height: 45px;
    max-height: 45px;
    justify-content: center;
    z-index: 20;
}

.edit-btn-vertical:hover {
    transform: translateY(-50%) translateX(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
}

.edit-btn-vertical span {
    display: block;
    margin: 0;
    padding: 1px 0;
    font-size: 0.7rem;
}

/* HIDE ADD/EDIT BUTTONS ON NON-RAID DAYS */
.calendar-day.non-raid-day .add-btn-vertical,
.calendar-day.non-raid-day .edit-btn-vertical {
    display: none;
}

/* HIDE ADD/EDIT BUTTONS ON PAST DATES */
.calendar-day.past-date .add-btn-vertical,
.calendar-day.past-date .edit-btn-vertical {
    display: none;
}

/* Calendar Info Row: aligns info blocks with calendar columns */
.calendar-info-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    width: 100%;
    margin: 0 auto 0.05rem auto;
    position: relative;
    z-index: 2;
    gap: 0;
    min-height: 2.2rem;
}

.season-info-block,
.raid-days-block,
.color-legend-block {
    position: static;
    margin: 0 auto;
    width: max-content;
    z-index: 2;
}

/* Remove old absolute positioning classes if present */
.season-info-block.center-over-wednesday,
.raid-days-block.center-over-tuesday,
.color-legend-block.center-over-thursday {
    position: static !important;
    left: unset !important;
    transform: unset !important;
    margin-top: 0 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-day {
        padding: 0.25rem;
    }
    
    .day-header {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .callout-item {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        min-height: 20px;
        max-height: 20px;
    }
    
    .add-btn-vertical,
    .edit-btn-vertical {
        font-size: 0.7rem;
        padding: 0.3rem 0.2rem;
        min-height: 40px;
        max-height: 40px;
    }
    
    .add-btn-vertical span,
    .edit-btn-vertical span {
        font-size: 0.6rem;
    }
    
    .more-callouts {
        right: 40px;
        font-size: 0.65rem;
    }
    
    .day-icon {
        font-size: 1.5rem;
        top: 12px;
    }
}