/* notes.css - v25.0 Colored Backgrounds */

.notes-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.notes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* === Grid View (格狀) === */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding-bottom: 20px;
    align-content: start;
}

.notes-grid .note-card {
    /* 背景色由 JS 控制，這裡只設形狀 */
    padding: 20px;
    border-radius: 12px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border: 1px solid rgba(255, 255, 255, 0.1);
    /* 輕微邊框 */
    /* border-left 由 JS 控制 */

    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    /* 確保文字是白的 */
}

.notes-grid .note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
    /* 懸停時稍微變亮 */
}

.notes-grid .note-header {
    margin-bottom: 10px;
}

.notes-grid .note-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.notes-grid .note-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    white-space: pre-wrap;
    line-height: 1.5;
    max-height: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-grid .note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* === List View (條列) === */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-bottom: 20px;
}

.notes-list .note-card {
    /* 背景色由 JS 控制 */
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    transition: filter 0.2s;
    color: #ffffff;
}

.notes-list .note-card:hover {
    filter: brightness(1.1);
}

.notes-list .note-content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.notes-list .note-title {
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.notes-list .note-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.notes-list .note-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
    opacity: 0.8;
    flex-shrink: 0;
    border: none;
    padding: 0;
    margin-top: 0;
}

/* 通用元件 */
.note-time {
    font-size: 0.8rem;
    opacity: 0.7;
}

.note-del-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 50%;
    transition: 0.2s;
}

.note-del-btn:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
}