/* Monthly skin specific styles - namespace to avoid conflicts */

.heatmap-section.heatmap-monthly .heatmap-head {
    display: flex;
    justify-content: space-between;
    margin: 4px 4px;
    padding: 0px 4px;
}

.heatmap-section.heatmap-monthly .heatmap-title {
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    color: #333;
}

.darkmode .heatmap-section.heatmap-monthly .heatmap-title {
    color: #ddd;
}

.heatmap-section.heatmap-monthly .heatmap-year {
    position: relative;
    display: inline-block;
    min-width: 80px;
}

.heatmap-section.heatmap-monthly .heatmap-year-button {
    display: flex;
    justify-content: end;
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    align-items: center;
    color: #333;
    cursor: pointer;
}

.darkmode .heatmap-section.heatmap-monthly .heatmap-year-button {
    color: #ddd;
}

.heatmap-section.heatmap-monthly .heatmap-year-list {
    display: none;
    justify-content: center;
    position: absolute;
    background-color: #fafafa;
    justify-content: end;
    width: 66px;
    max-height: 160px;
    z-index: 1;
    padding: 8px;
    border-style: solid;
    border-width: 1px;
    border-color: #ddd;
    border-radius: 8px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    text-align: center;
    overflow-y: auto;
}

.darkmode .heatmap-section.heatmap-monthly .heatmap-year-list {
    background-color: #343434;
    border-color: #ddd;
}

.heatmap-section.heatmap-monthly .heatmap-year:hover .heatmap-year-list {
    display: block;
}

.heatmap-section.heatmap-monthly .heatmap-year-list a {
    display: block;
    padding: 2px;
}

.heatmap-section.heatmap-monthly .heatmap-year-list a:hover {
    color: skyblue;
}

.heatmap-section.heatmap-monthly .heatmap-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-radius: 12px;
    background-color: #fafafa;
    overflow: visible !important;
}

.darkmode .heatmap-section.heatmap-monthly .heatmap-wrapper {
    background-color: #343434;
}

.heatmap-section.heatmap-monthly .heatmap-slider {
    width: 100%;
    padding: 10px 10px 10px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
}

.heatmap-section.heatmap-monthly .heatmap-slider::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.heatmap-section.heatmap-monthly .heatmap-container-monthly {
    display: flex;
    gap: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 11px 0 0 0;
    scrollbar-width: none;
}

.heatmap-section.heatmap-monthly .heatmap-container-monthly::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Monthly calendar container */
.heatmap-section.heatmap-monthly .monthly-calendar {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    box-sizing: border-box;
}

.heatmap-section.heatmap-monthly .monthly-header {
    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #333;
    margin-bottom: 8px;
    width: 100%;
}

.darkmode .heatmap-section.heatmap-monthly .monthly-header {
    color: #ddd;
}

.heatmap-section.heatmap-monthly .monthly-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 30px;
    margin-bottom: 2px;
    width: 80%;
    max-width: 280px;
}

.heatmap-section.heatmap-monthly .monthly-weekday-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    text-align: center;
    color: #666;
    font-weight: 600;
    padding: 4px 0;
}

.darkmode .heatmap-section.heatmap-monthly .monthly-weekday-label {
    color: #aaa;
}

.heatmap-section.heatmap-monthly .monthly-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    width: 80%;
    max-width: 280px;
}

.heatmap-section.heatmap-monthly .monthly-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-height: 0;
}

.heatmap-section.heatmap-monthly .monthly-day-empty {
    aspect-ratio: 1;
    background-color: transparent;
    min-height: 0;
}

/* Out of range dates (for 365 days view) */
.heatmap-section.heatmap-monthly .monthly-day.out-of-range {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.heatmap-section.heatmap-monthly .monthly-day.out-of-range .tooltip {
    display: none;
}

/* Day level colors - consistent with default skin */
.heatmap-section.heatmap-monthly .monthly-day.level-0 { 
    background-color: #ebedf0; 
    color: #666;
    text-shadow: none;
}

.heatmap-section.heatmap-monthly .monthly-day.level-1 { background-color: #c6e48b; }
.heatmap-section.heatmap-monthly .monthly-day.level-2 { background-color: #7bc96f; }
.heatmap-section.heatmap-monthly .monthly-day.level-3 { background-color: #239a3b; }
.heatmap-section.heatmap-monthly .monthly-day.level-4 { background-color: #196127; }

.darkmode .heatmap-section.heatmap-monthly .monthly-day.level-0 { 
    background-color: #161b22; 
    color: #888;
}
.darkmode .heatmap-section.heatmap-monthly .monthly-day.level-1 { background-color: #0e4429; }
.darkmode .heatmap-section.heatmap-monthly .monthly-day.level-2 { background-color: #006d32; }
.darkmode .heatmap-section.heatmap-monthly .monthly-day.level-3 { background-color: #26a641; }
.darkmode .heatmap-section.heatmap-monthly .monthly-day.level-4 { background-color: #39d353; }

.heatmap-section.heatmap-monthly .monthly-day.active {
    box-shadow: 0 0 0 2px #239a3b;
}

.darkmode .heatmap-section.heatmap-monthly .monthly-day.active {
    box-shadow: 0 0 0 2px #26a641;
}

.heatmap-section.heatmap-monthly .monthly-day .tooltip {
    visibility: hidden;
    width: 60px;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    position: absolute;
    z-index: 1000;
    border-radius: 6px;
    padding: 5px 10px;
    bottom: 130%;
    left: 50%;
    margin-left: -30px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}

.heatmap-section.heatmap-monthly .monthly-day:hover .tooltip {
    visibility: visible;
}

/* Month dots navigation - inspired by youtube widget */
.heatmap-section.heatmap-monthly .heatmap-month-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 4px 8px;
    justify-content: center;
}

.heatmap-section.heatmap-monthly .month-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(51, 51, 51, 0.2);
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.darkmode .heatmap-section.heatmap-monthly .month-dot {
    background: rgba(221, 221, 221, 0.25);
}

.heatmap-section.heatmap-monthly .month-dot.is-active {
    background: rgba(51, 51, 51, 0.75);
}

.darkmode .heatmap-section.heatmap-monthly .month-dot.is-active {
    background: rgba(221, 221, 221, 0.85);
}

/* Current month highlight - simple design */
.heatmap-section.heatmap-monthly .month-dot.is-current-month {
    background: rgba(51, 51, 51, 0.5);
    border: 0px solid rgba(51, 51, 51, 0.8);
    transform: scale(1.10);
}

.darkmode .heatmap-section.heatmap-monthly .month-dot.is-current-month {
    background: rgba(221, 221, 221, 0.5);
    border: 0px solid rgba(221, 221, 221, 0.9);
    transform: scale(1.10);
}

/* When current month is also active */
.heatmap-section.heatmap-monthly .month-dot.is-current-month.is-active {
    background: rgba(51, 51, 51, 0.85);
    border: 0px solid rgba(51, 51, 51, 1);
}

.darkmode .heatmap-section.heatmap-monthly .month-dot.is-current-month.is-active {
    background: rgba(221, 221, 221, 0.95);
    border: 0px solid rgba(221, 221, 221, 1);
}

.heatmap-section.heatmap-monthly .month-dot:hover {
    background: rgba(51, 51, 51, 0.5);
}

.darkmode .heatmap-section.heatmap-monthly .month-dot:hover {
    background: rgba(221, 221, 221, 0.5);
}

/* Color label */
.heatmap-section.heatmap-monthly .color-label-container {
    display: flex;
    justify-content: start;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 18px;
    gap: 4px;
}

.heatmap-section.heatmap-monthly .color-label-cell {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    position: relative;
}

.heatmap-section.heatmap-monthly .color-label-cell.level-0 { background-color: #ebedf0; }
.heatmap-section.heatmap-monthly .color-label-cell.level-1 { background-color: #c6e48b; }
.heatmap-section.heatmap-monthly .color-label-cell.level-2 { background-color: #7bc96f; }
.heatmap-section.heatmap-monthly .color-label-cell.level-3 { background-color: #239a3b; }
.heatmap-section.heatmap-monthly .color-label-cell.level-4 { background-color: #196127; }

.darkmode .heatmap-section.heatmap-monthly .color-label-cell.level-0 { background-color: #161b22; }
.darkmode .heatmap-section.heatmap-monthly .color-label-cell.level-1 { background-color: #0e4429; }
.darkmode .heatmap-section.heatmap-monthly .color-label-cell.level-2 { background-color: #006d32; }
.darkmode .heatmap-section.heatmap-monthly .color-label-cell.level-3 { background-color: #26a641; }
.darkmode .heatmap-section.heatmap-monthly .color-label-cell.level-4 { background-color: #39d353; }

.heatmap-section.heatmap-monthly .color-label-cell .tooltip {
    visibility: hidden;
    width: 60px;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    position: absolute;
    z-index: 1000;
    border-radius: 6px;
    border-style: solid;
    border-width: 1px;
    padding: 5px 10px;
    bottom: 130%;
    left: 50%;
    margin-left: -30px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}

.heatmap-section.heatmap-monthly .color-label-cell:hover .tooltip {
    visibility: visible;
}

.heatmap-section.heatmap-monthly .color-label-text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    margin: 0px 2px;
    color: #333;
}

.darkmode .heatmap-section.heatmap-monthly .color-label-text {
    color: #ddd;
}

.heatmap-section.heatmap-monthly .dropdown-caret {
    border-bottom-color: #0000;
    border-left-color: #0000;
    border-right-color: #0000;
    border-style: solid;
    border-width: 4px 4px 0;
    display: inline-block;
    margin-left: 4px;
}

/* Overlay for guest users */
.heatmap-section.heatmap-monthly .heatmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
    border-radius: 12px;
}

.heatmap-section.heatmap-monthly .heatmap-login {
    position: absolute;
    display: flex;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 3;
    text-align: center;
}

.heatmap-section.heatmap-monthly .heatmap-login a {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100px;
}

.heatmap-section.heatmap-monthly .heatmap-login a:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Documents container */
.heatmap-section.heatmap-monthly .heatmap-documents-container {
    width: 100%;
    padding: 0px;
    margin: 10px auto 40px;
}

/* Documents list header */
.heatmap-section.heatmap-monthly .documents-list-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-left: 4px solid #7bc96f;
    margin-bottom: 8px;
}

.darkmode .heatmap-section.heatmap-monthly .documents-list-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 100%);
    border-left-color: #26a641;
}

.heatmap-section.heatmap-monthly .documents-list-date {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.darkmode .heatmap-section.heatmap-monthly .documents-list-date {
    color: #aaa;
}

.heatmap-section.heatmap-monthly .documents-list-count {
    font-size: 12px;
    color: #999;
}

.darkmode .heatmap-section.heatmap-monthly .documents-list-count {
    color: #888;
}

/* Documents list items */
.heatmap-section.heatmap-monthly .documents-list-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Individual document item - compact version for monthly skin */
.heatmap-section.heatmap-monthly .documents-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.darkmode .heatmap-section.heatmap-monthly .documents-item {
    border-color: #444;
}

.heatmap-section.heatmap-monthly .documents-item:hover {
    border-color: #7bc96f;
    box-shadow: 0 2px 8px rgba(123, 201, 111, 0.2);
    background-color: #f9f9f9;
}

.darkmode .heatmap-section.heatmap-monthly .documents-item:hover {
    border-color: #26a641;
    box-shadow: 0 2px 8px rgba(38, 166, 65, 0.2);
    background-color: #2a2a2a;
}

.heatmap-section.heatmap-monthly .documents-item-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    text-decoration: none;
    color: inherit;
    background-color: transparent;
    transition: background-color 0.2s;
}

.darkmode .heatmap-section.heatmap-monthly .documents-item-link {
    background-color: transparent;
}

.heatmap-section.heatmap-monthly .documents-item-link:hover {
    background-color: transparent;
}

.darkmode .heatmap-section.heatmap-monthly .documents-item-link:hover {
    background-color: transparent;
}

/* Document module title (board name) */
.heatmap-section.heatmap-monthly .documents-module-title {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background-color: #ebedf0;
    color: #666;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.darkmode .heatmap-section.heatmap-monthly .documents-module-title {
    background-color: #333;
    color: #aaa;
}

/* Document title - compact for monthly skin */
.heatmap-section.heatmap-monthly .documents-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #222;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.darkmode .heatmap-section.heatmap-monthly .documents-item-title {
    color: #f0f0f0;
}

/* Empty state */
.heatmap-section.heatmap-monthly .documents-list-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.heatmap-section.heatmap-monthly .documents-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.heatmap-section.heatmap-monthly .documents-empty-text {
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 320px) {
    .heatmap-section.heatmap-monthly .monthly-weekdays,
    .heatmap-section.heatmap-monthly .monthly-days {
        max-width: 200px;
        gap: 2px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-day {
        font-size: 9px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-header {
        font-size: 12px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-weekday-label {
        font-size: 9px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-calendar {
        padding: 0 5px;
    }
}

@media (min-width: 321px) and (max-width: 480px) {
    .heatmap-section.heatmap-monthly .monthly-weekdays,
    .heatmap-section.heatmap-monthly .monthly-days {
        max-width: 240px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-day {
        font-size: 10px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-header {
        font-size: 13px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-weekday-label {
        font-size: 10px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-calendar {
        padding: 0 5px;
    }
}

/* Wider screens - more spacing */
@media (min-width: 481px) {
    .heatmap-section.heatmap-monthly .monthly-weekdays,
    .heatmap-section.heatmap-monthly .monthly-days {
        max-width: 280px;
        gap: 4px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-day {
        font-size: 12px;
        border-radius: 5px;
    }
    
    .heatmap-section.heatmap-monthly .monthly-weekday-label {
        font-size: 12px;
    }
}
