﻿/* General Styles */
.calendar {
    background: #fff;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.current-month {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.prev-month,
.next-month {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

    .prev-month:hover,
    .next-month:hover {
        color: #333;
    }

/* Weekdays Header */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

    .weekdays div {
        color: #666;
        font-size: 12px;
        padding: 8px;
        text-align: center;
        font-weight: 500;
    }

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(40px, 1fr));
    border: 1px solid #eee;
    background: #eee;
    gap: 1px;
}

/* Calendar Days */
.calendar-day {
    background: white;
    min-height: 100px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-number {
    font-size: 12px;
    color: #333;
    margin-bottom: 8px;
}

/* Other Month Days */
.other-month {
    background: #fafafa;
}

    .other-month .day-number {
        color: #999;
    }

/* Note Container */
.note-container {
    position: relative;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .note-container.buy {
        background-color: #e6f4ea;
    }

    .note-container.sell {
        background-color: #fee8e8;
    }

    .note-container.general {
        background-color: #e8eafd;
    }

    .note-container:hover {
        background-color: #f1f3f4;
    }

/* Note Title & Content */
.note-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.buy .note-title {
    color: #22c55e;
}

.sell .note-title {
    color: #d93025;
}

.note-content {
    font-size: 12px;
    font-weight: 400;
    color: #5f6368;
    margin-top: 0;
    line-height: 1.4;
    overflow-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Reminder Indicator */
.reminder-indicator {
    position: absolute;
    top: 10px;
    right: 4px;
}

    .reminder-indicator i {
        font-size: 12px;
        color: #22c55e;
    }

.buy .reminder-indicator i {
    color: #137333;
}

.sell .reminder-indicator i {
    color: #d93025;
}

/* Additional Notes */
.additional-notes {
    background: #22c55e;
    color: white;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    width: 100%;
}

    .additional-notes:hover {
        background: #1ea051;
    }

/* Note Modal */
.note-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.note-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

    .note-modal-header .note-title {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
    }

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.note-body {
    color: #333;
    line-height: 1.5;
    font-size: 14px;
}

.note-reminder-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #22c55e;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

    .note-reminder-info i {
        color: #22c55e;
    }

/* Notes List Modal */
.notes-list-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.notes-list-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.notes-list-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

    .notes-list-modal-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
    }

.close-notes-list-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

/* Note List Items */
.note-list-item {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
}

    .note-list-item.buy {
        background-color: #e6f4ea;
    }

    .note-list-item.sell {
        background-color: #fee8e8;
    }

.note-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.note-list-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.buy .note-list-title {
    color: #137333;
}

.sell .note-list-title {
    color: #d93025;
}

.note-list-reminder {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #22c55e;
}

.buy .note-list-reminder {
    color: #137333;
}

.sell .note-list-reminder {
    color: #d93025;
}

.note-list-content {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .calendar {
        padding: 12px;
    }

    .calendar-day {
        min-height: 80px;
    }

    .note-title {
        font-size: 12px;
    }

    .note-content {
        font-size: 10px;
    }

    .current-month {
        font-size: 16px;
    }
    .calendar-grid {
        grid-template-columns: repeat(4, minmax(60px, 1fr));
    }

    .weekdays {
        grid-template-columns: repeat(4, 1fr);
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .note-container {
        padding: 4px;
        font-size: 10px;
    }
    .note-reminder-info {
        margin-top: 2px;
        padding-top: 2px;
    }
    .reminder-indicator {
        top: 18px;
    }
    .note-content {
        font-size: 9px;
        line-height: 1.2;
        max-width: 40px;
    }

    .day-number {
        font-size: 10px;
    }
    .additional-notes {
        padding: 3px;
        font-size: 8px;
    }
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr); /* İki sütun düzen */
    }

    .weekdays {
        grid-template-columns: repeat(3, 1fr); /* Haftalık başlık da iki sütun */
    }

    .calendar-day {
        min-height: 50px;
        padding: 2px;
    }

    .day-number {
        font-size: 9px;
    }

        .note-title {
            font-size: 8px;
        }

    .calendar-grid {
        gap: 1px;
    }
}
