.container {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.calendar-wrapper {
    display: flex;
    gap: 20px;
    position: relative;
    width: 100%;
}

.month-names {
    display: grid;
    gap: 2px;
    grid-template-rows: repeat(
        auto-fill,
        40px
    ); /* Match day height + padding */
    align-content: start;
    margin-top: 70px;
}

.month-name-header-space {
    height: 41px; /* Match weekday header height (25px) + padding (8px * 2) */
}

.month-name {
    padding: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.month-name .year {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.month-name:hover .year,
.month-name.january .year {
    opacity: 1;
}

.month-name.show-year .year {
    opacity: 1;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 40px; /* Match the height of day cells */
    gap: 2px;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
}

.weekday-header {
    text-align: center;
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
    padding: 8px 0;
}

.day {
    padding: 8px;
    text-align: center;
    height: 24px; /* Increased height */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day:hover {
    background-color: #e9ecef;
}

.day.other-month {
    color: #ccc;
}

.day.selected {
    background-color: #228be6;
    color: white;
    border: none;
}

.annotation-form,
#annotationsList {
    display: none; /* Hide from view but keep functionality */
    position: absolute; /* Remove from document flow */
    visibility: hidden; /* Extra assurance it's hidden */
}

.annotation-form input,
.annotation-form button {
    padding: 5px;
}

.annotation-item {
    margin: 5px 0;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #212529;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background-color: #e9ecef;
}

.calendar-section {
    display: flex;
    gap: 20px;
    flex: 1;
}

.calendar-container {
    flex: 0 0 auto;
}

.annotations-column {
    flex: 0 0 250px; /* Slightly wider for better readability */
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* background-color: #f8f9fa; */
    padding: 8px;
    border-radius: 8px;
    margin-top: 65px;
}

.annotation-header-space {
    height: 35px; /* Match weekday header height */
}

.annotation-week {
    height: 40px; /* Match new day cell height (24px + 2 * 8px padding) */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-annotation {
    font-size: 0.9em;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #f8f9fa;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    gap: 8px;
}

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

.annotation-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.annotation-title {
    font-weight: 500;
    margin-right: 4px;
}

.annotation-days {
    color: #868e96;
    font-size: 0.9em;
}

/* Remove these classes as they're no longer needed */
.annotations-grid,
.annotation-cell {
    display: none;
}

.quick-annotation-form {
    position: absolute;
    background: #f8f9fa;
    padding: 15px;
    border: none;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    box-sizing: border-box;
}

.quick-annotation-form input[type="text"] {
    padding: 8px;
    background: white;
    border: none;
    border-radius: 4px;
}

.color-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.predefined-colors {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px;
    margin-left: 8px;
    flex: 1;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome/Safari */
.predefined-colors::-webkit-scrollbar {
    display: none;
}

.custom-color {
    flex-shrink: 0;
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.custom-color.selected {
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.color-circle {
    min-width: 24px;
    min-height: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.color-circle:hover {
    transform: scale(1.1);
}

.color-circle.selected {
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.custom-color input[type="color"] {
    position: absolute;
    width: 48px; /* Double the container size */
    height: 48px; /* Double the container size */
    padding: 0;
    border: none;
    cursor: pointer;
    transform: translate(-12px, -12px); /* Center the larger input */
}

.custom-color input[type="color"].selected {
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

.buttons-row {
    display: flex;
    gap: 8px;
    flex-direction: row-reverse;
}

.buttons-row button,
.edit-buttons-row button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: white;
    flex: 1;
    transition: all 0.2s ease;
    color: #000;
}

/* Style specifically for save buttons */
.buttons-row button:first-child,
.edit-buttons-row button:first-child {
    background-color: #000000;
    color: white;
}

.buttons-row button:first-child:hover,
.edit-buttons-row button:first-child:hover {
    background-color: #333333;
}

.buttons-row button:last-child:hover,
.edit-buttons-row button:last-child:hover {
    background-color: #e9ecef;
}

.annotation-start {
    cursor: move;
}

.date-annotation {
    cursor: grab;
}

.date-annotation:active {
    cursor: grabbing;
}

.day.drag-over {
    background-color: rgba(0, 0, 0, 0.1);
}

.calendar-grid.drag-active {
    background-color: #e2e8f0;
    transition: background-color 0.2s ease;
}

.day.drag-over {
    background-color: #cbd5e1 !important;
    cursor: move;
}

.date-annotation.dragging {
    opacity: 0.5;
    cursor: move;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px);
    }
    75% {
        transform: translateX(2px);
    }
}

.day.shake-animation {
    animation: shake 0.5s ease-in-out infinite;
}

.day-popover {
    position: absolute;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 4px;
    z-index: 1000;
    display: flex;
    gap: 4px;
}

.day-popover button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.day-popover button:hover {
    background: #e9ecef;
}

.day.move-preview {
    background-color: rgba(0, 0, 0, 0.15) !important;
    transition: background-color 0.2s ease;
}

.date-annotation .edit-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.date-annotation:hover .edit-btn {
    display: block;
}

.date-annotation .edit-btn:hover {
    background-color: #e9ecef;
}

.date-annotation.editing {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-form {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.edit-form input[type="text"] {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.edit-form input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.navbar {
    position: sticky;
    top: 0;
    background-color: white;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    border-bottom: 1px solid #f1f1f1;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 500;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    letter-spacing: -0.02em;
}

.clear-all-btn {
    padding: 8px 16px;
    background: none;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.clear-all-btn:hover {
    color: #666666;
}

.navbar-actions {
    display: flex;
    gap: 8px;
}

.new-calendar-btn {
    padding: 8px 16px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.new-calendar-btn:hover {
    background-color: #333333;
}

.calendar-switcher {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: none; /* Hide by default */
}

.calendar-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-tab {
    padding: 8px 16px;
    background: #f8f9fa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    font-weight: 400;
}

.calendar-tab.active {
    background: #f8f9fa;
    color: #000000;
    font-weight: 600;
}

.calendar-tab:hover:not(.active) {
    background: #e9ecef;
}

/* Show calendar switcher when multiple calendars exist */
.calendar-switcher.show-switcher {
    display: block;
}

.calendar-tab {
    position: relative;
}

.tab-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tab-buttons {
    display: none;
    gap: 4px;
}

.calendar-tab:hover .tab-buttons {
    display: flex;
}

.tab-edit-btn,
.tab-delete-btn,
.tab-save-btn,
.tab-cancel-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
}

.tab-edit-btn:hover,
.tab-delete-btn:hover,
.tab-save-btn:hover,
.tab-cancel-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.calendar-name-input {
    background: none;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 4px;
    font-size: 0.9em;
    width: 100px;
}

.calendar-name-input:focus {
    outline: none;
    border-bottom-color: #000;
}

.calendar-tab.editing {
    pointer-events: none;
}

.calendar-tab.editing .tab-content {
    pointer-events: all;
}

.load-more-button {
    width: 100%;
    margin: 20px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #000000;
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-more-button:hover {
    background-color: #e9ecef;
}

.footer {
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 1px solid #f1f1f1;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    letter-spacing: -0.02em;
}

.footer-slogan {
    color: #666666;
    font-size: 0.9rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    color: #000000;
}

.footer-column a {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #000000;
}

.footer-bottom {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid #f1f1f1;
    text-align: center;
    color: #666666;
    font-size: 0.8rem;
}

.day.current-date {
    background-color: #000000;
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day.past-date {
    color: #989898;
}

.days-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.days-btn {
    border: none;
    background: none;
    color: #000;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.days-btn:hover:not(.disabled) {
    background-color: #e9ecef;
}

.days-btn.disabled {
    color: #ced4da;
    cursor: not-allowed;
}

.days-count {
    min-width: 60px;
    text-align: center;
    font-size: 0.9em;
    color: #000;
    user-select: none;
}

.edit-annotation-form {
    padding: 15px;
    gap: 10px;
}

.edit-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.edit-controls-row .custom-color {
    flex-shrink: 0;
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.edit-controls-row .custom-color input[type="color"] {
    position: absolute;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    cursor: pointer;
    transform: translate(-12px, -12px);
}

.edit-annotation-form .days-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.edit-annotation-form input[type="text"] {
    padding: 8px;
    background: white;
    border: none;
    border-radius: 4px;
}

.edit-buttons-row {
    display: flex;
    gap: 8px;
    flex-direction: row-reverse;
}

.edit-buttons-row button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    transition: all 0.2s ease;
}

.edit-buttons-row button:hover {
    background-color: #e9ecef;
}

.load-previous-year-button {
    width: 100%;
    margin: 0 0 20px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #000000;
    font-weight: 500;
    transition: all 0.2s ease;
}

.load-previous-year-button:hover {
    background-color: #e9ecef;
}
