/* Calendar Widget Styles */
#calendarWidget {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 0.5px solid var(--toolbar-btn-hover);
    font-family: 'Sono', sans-serif;
}

.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header button {
    background: none;
    border: none;
    color: var(--toolbar-btn-color);
    font-size: 16px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sono', sans-serif;
}

.calendar-header button:hover {
    background-color: var(--toolbar-btn-hover);
}

#currentMonthYear {
    font-family: 'Sono', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--editor-text);
    opacity: 0.6;
    text-align: center;
}

.calendar-days {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.calendar-days::-webkit-scrollbar {
    display: none;
}

.day-item {
    min-width: 45px;
    width: 45px;
    height: 45px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.day-item:hover {
    background-color: var(--toolbar-btn-hover);
}

.day-item.selected {
    background-color: var(--toolbar-btn-hover);
    border-color: var(--toolbar-btn-active);
}

.day-item.today {
    font-weight: bold;
}

.day-item.future {
    opacity: 0.2;
}

.day-item.past {
    opacity: 0.6;
}

.day-name {
    font-size: 10px;
    color: var(--toolbar-btn-color);
    text-transform: uppercase;
    margin-bottom: 2px;
    font-family: 'Sono', sans-serif;
    font-weight: 300;
}

.day-number {
    font-size: 16px;
    color: var(--editor-text);
    font-family: 'Sono', sans-serif;
    font-weight: 500;
}

/* Remove day indicator styles */
.day-indicator {
    display: none;
}

.quote-container {
    text-align: center;
    padding: 15px 20px;
    font-style: italic;
    color: var(--toolbar-btn-color);
    font-size: 14px;
    margin-top: 10px;
    border-top: 1px solid var(--toolbar-btn-hover);
    display: none;
    font-family: 'Sono', sans-serif;
    font-weight: 300;
}

/* Future date message styling */
.future-date-message {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    padding: 12px 20px;
    max-width: 80%;
    background-color: var(--toolbar-btn-hover);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: 'Sono', sans-serif;
    text-align: center;
    color: var(--editor-text);
    border: 1px solid var(--popup-border);
}

.future-date-message i {
    margin-right: 10px;
    color: var(--toolbar-btn-active);
    font-size: 16px;
}

.future-date-message p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
}

/* Theme specific overrides */
.theme-dark .day-item.today .day-number {
    color: #5d9afd;
}

.theme-sepia .day-item.today .day-number {
    color: #9a6f38;
}

.theme-nord .day-item.today .day-number {
    color: #5e81ac;
}

.theme-solarized .day-item.today .day-number {
    color: #2aa198;
}

/* Contributions mini-map styling */
#contributionsMap {
    position: fixed;
    height: auto;
    bottom: 20px;
    left: 20px;
    width: 80px;
    background-color: var(--toolbar-bg);
    border-radius: 8px;
    box-shadow: 0 0px 10px var(--toolbar-btn-hover);
    padding: 12px;
    font-family: 'Sono', sans-serif;
    z-index: 990;
    border: 1px solid var(--popup-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contributions-header {
    margin-bottom: 12px;
}

.contributions-header h3 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--editor-text);
    font-weight: 400;
    text-align: center;
}

.contributions-legend, 
.legend-label, 
.legend-cells, 
.legend-cell, 
.legend-cell.level-0, 
.legend-cell.level-1, 
.legend-cell.level-2, 
.legend-cell.level-3, 
.legend-cell.level-4,
.contributions-grid,
.contribution-cells-container,
.days-of-week-header,
.corner-cell,
.day-header,
.week-row,
.month-label-row,
.contribution-cell,
#contributionTooltipContainer {
    display: none;
}

.contributions-stats {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 1rem;
    
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--editor-text);
}

.stat-label {
    font-size: 10px;
    color: var(--editor-text);
    opacity: 0.7;
    text-align: center;
}

/* Contributions grid styles for full year GitHub-style layout */
.contributions-grid {
    overflow-y: auto;
    max-height: calc(100% - 120px);
    padding-right: 10px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.contributions-grid::-webkit-scrollbar {
    display: none;
}

.contributions-grid-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Days of week header */
.days-of-week-header {
    display: flex;
    margin-bottom: 8px;
}

.corner-cell {
    width: 30px;
    min-width: 30px;
}

.day-header {
    flex: 1;
    text-align: center;
    font-size: 10px;
    color: var(--editor-text);
    font-weight: 500;
    padding: 2px 0;
}

/* Week rows */
.week-row {
    display: flex;
    height: 20px;
    align-items: center;
}

.week-number {
    width: 30px;
    min-width: 30px;
    text-align: right;
    padding-right: 8px;
    font-size: 9px;
    color: var(--editor-text);
    opacity: 0.7;
}

/* Month label rows */
.month-label-row {
    display: flex;
    height: 20px;
    align-items: center;
    margin-top: 6px;
}

.month-label {
    width: 30px;
    min-width: 30px;
    font-size: 10px;
    color: var(--editor-text);
    opacity: 0.8;
    font-weight: 500;
    text-align: right;
    padding-right: 8px;
}

/* Contribution cells */
.contribution-cell {
    flex: 1;
    height: 12px;
    margin: 0 1px;
    border-radius: 2px;
    position: relative;
    box-sizing: border-box; /* Ensure border doesn't change size */
    transition: transform 0.1s ease;
}

.contribution-cell.empty {
    background-color: var(--color-level-0);
    opacity: 0.5;
}

.contribution-cell:hover {
    transform: scale(1.2);
    z-index: 5;
}

.contribution-cell.level-0 {
    background-color: var(--color-level-0);
}

.contribution-cell.level-1 {
    background-color: var(--color-level-1);
}

.contribution-cell.level-2 {
    background-color: var(--color-level-2);
}

.contribution-cell.level-3 {
    background-color: var(--color-level-3);
}

.contribution-cell.level-4 {
    background-color: var(--color-level-4);
}

/* External tooltip container */
#contributionTooltipContainer {
    position: absolute;
    background-color: var(--popup-bg);
    color: var(--popup-text);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    pointer-events: none;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--popup-border);
}

#contributionTooltipContainer::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--popup-bg) transparent transparent transparent;
} 