@import '../root.css';

main {
    width: 95%;
    max-width: 750px;
}

.header-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.header-row h1 {
    color: var(--text1);
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 0;
}

#back-button {
    display: inline-block;
    color: var(--text2);
    margin-bottom: 1px;
    transform: rotate(-90deg);
    transition: color 0.2s ease;
}

#back-button:hover {
    color: var(--text1);
}

.calendar-container {
    background-color: var(--bg2);
    border-radius: 8px;
    height: calc(100vh - 200px - 185px);
    overflow: hidden;
}

.calendar-grid {
    background-color: var(--bg2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    flex-shrink: 0;
}

.calendar-days-scroll {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    /* scrollbar-color: #444 var(--bg1); */
    scrollbar-width: none;
}

.calendar-days-scroll::-webkit-scrollbar {
    width: 6px;
    display: none;
}

.calendar-days-scroll.is-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .calendar-days-scroll::-webkit-scrollbar-track {
    background: var(--bg1);
    border-radius: 3px;
}

.calendar-days-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.calendar-days-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
} */

.day-header {
    background-color: var(--bg2);
    text-align: center;
    padding: 15px 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text2);
    border: none;
}

.calendar-day {
    background-color: #222;
    min-height: 75px;
    min-width:  75px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    border: none;
}

.calendar-dot-important, .calendar-dot-busy {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.calendar-dot-important {
    background: #ce3331;
}

.calendar-dot-busy {
    background: #d29922;
}

.calendar-day:hover {
    background-color: #333;
}

.calendar-day.selected {
    background-color: #0078D7;
}

.day-number {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 14px;
    font-weight: bold;
}

.memo-preview {
    margin-top: 20px;
    font-size: 12px;
    word-break: break-word;
    line-height: 1.2;
    overflow-y: hidden;
    max-height: 60px;
}

.memo-container {
    margin-top: 20px;
    background-color: var(--bg2);
    border-radius: 8px;
    padding: 20px;
    height: 225px;
    overflow-y: auto;
}

.memo-container h2 {
    color: var(--text1);
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.memo-content {
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap; /* 保留换行符 */
}

.memo-content u {
    text-decoration: none;
    border-bottom: 1px dashed
}

.no-memo {
    color: #888;
    font-style: italic;
}

/* Busy 标签 */
.label-busy {
    display: inline-block;
    background: #a4740d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Important 标签 */
.label-important {
    display: inline-block;
    background: #ce3331;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 8px;
}