﻿/* ---------- Notes Container ---------- */
.notes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #37352f;
}

/* ---------- Header ---------- */
.notes-header {
    margin-bottom: 2.5rem;
}

.notes-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #37352f;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.notes-subtitle {
    font-size: 1.1rem;
    color: #73726e;
    margin: 0;
    font-weight: 400;
}

/* ---------- Filters ---------- */
.notes-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.btn-clear-filters {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #73726e;
    background-color: #ffffff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .btn-clear-filters:hover {
        background-color: #fafaf9;
        border-color: #d3d1cb;
        color: #37352f;
    }

.clear-icon {
    font-size: 1rem;
    line-height: 1;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #37352f;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    color: #37352f;
    background-color: #ffffff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .filter-select:hover {
        border-color: #d3d1cb;
    }

    .filter-select:focus {
        border-color: #37352f;
        box-shadow: 0 0 0 3px rgba(55, 53, 47, 0.1);
    }

/* ---------- Notes Grid ---------- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ---------- Note Card ---------- */
.note-card {
    background-color: #ffffff;
    border: 1px solid #e9e9e7;
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .note-card:hover {
        border-color: #d3d1cb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.note-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #37352f;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.note-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #fafaf9;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #37352f;
}

.rating-stars {
    font-size: 0.875rem;
}

.note-description {
    font-size: 0.95rem;
    color: #73726e;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0ef;
    flex-wrap: wrap;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: #73726e;
    font-weight: 500;
}

.author-icon {
    font-size: 0.75rem;
}

.meta-divider {
    color: #d3d1cb;
    font-size: 0.8rem;
}

.note-date {
    font-size: 0.8rem;
    color: #9b9a97;
}

/* ---------- Note Actions ---------- */
.note-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-note {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-view {
    background-color: #37352f;
    color: #ffffff;
}

    .btn-view:hover {
        background-color: #2c2a26;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        color: #ffffff;
        text-decoration: none;
    }

.btn-download {
    background-color: #ffffff;
    color: #37352f;
    border-color: #e9e9e7;
}

    .btn-download:hover {
        background-color: #fafaf9;
        border-color: #d3d1cb;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        color: #37352f;
        text-decoration: none;
    }

/* ---------- Rating Section ---------- */
.note-rating-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0ef;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

    .star-rating .star {
        font-size: 1.25rem;
        color: #d3d1cb;
        cursor: pointer;
        transition: all 0.15s ease;
        user-select: none;
    }

        .star-rating .star:hover,
        .star-rating .star.active {
            color: #fbbf24;
            transform: scale(1.1);
        }

.btn-submit-rating {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: #37352f;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .btn-submit-rating:hover {
        background-color: #2c2a26;
        transform: translateY(-1px);
    }

.btn-rate {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #fafaf9;
    color: #37352f;
    border: 1px solid #e9e9e7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-rate:hover {
        background-color: #f0f0ef;
        border-color: #d3d1cb;
    }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .notes-container {
        padding: 1.5rem 1rem;
    }

    /* Header */
    .notes-header {
        margin-bottom: 1.5rem;
    }

    .notes-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .notes-subtitle {
        font-size: 0.95rem;
    }

    /* Filters - stack vertically */
    .notes-filters {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
        align-items: stretch;
    }

    .filter-group {
        max-width: 100%;
        min-width: 100%;
    }

    .filter-label {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }

    .filter-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Clear filters button */
    .filter-actions {
        width: 100%;
    }

    .btn-clear-filters {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Notes grid - single column */
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Note cards */
    .note-card {
        padding: 1.25rem;
        gap: 0.875rem;
    }

    .note-card-header {
        gap: 0.75rem;
    }

    .note-title {
        font-size: 1rem;
        line-height: 1.4;
    }

    .note-rating {
        padding: 0.25rem 0.5rem;
    }

    .rating-value {
        font-size: 0.75rem;
    }

    .rating-stars {
        font-size: 0.75rem;
    }

    .note-description {
        font-size: 0.875rem;
        line-height: 1.5;
        -webkit-line-clamp: 3; /* Show 3 lines on mobile */
    }

    /* Note meta */
    .note-meta {
        padding-top: 0.375rem;
        gap: 0.375rem;
    }

    .note-author,
    .note-date {
        font-size: 0.75rem;
    }

    .author-icon {
        font-size: 0.7rem;
    }

    /* Note actions - stack on very small screens */
    .note-actions {
        gap: 0.5rem;
        margin-top: 0.375rem;
    }

    .btn-note {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Rating section */
    .note-rating-section {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-top: 0.5rem;
    }

    .star-rating {
        gap: 0.375rem;
    }

        .star-rating .star {
            font-size: 1.125rem;
        }

    .btn-submit-rating {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-rate {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .notes-container {
        padding: 1rem 0.75rem;
    }

    .notes-title {
        font-size: 1.5rem;
    }

    .notes-subtitle {
        font-size: 0.875rem;
    }

    /* Make action buttons stack on tiny screens */
    .note-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-note {
        width: 100%;
    }

    /* Smaller stars on tiny screens */
    .star-rating .star {
        font-size: 1rem;
    }

    /* Rating section - full width button */
    .note-rating-section {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-submit-rating {
        width: 100%;
    }
}

/* Tablet - keep two columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .notes-container {
        padding: 2.5rem 1.5rem;
    }

    .filter-group {
        min-width: 180px;
        max-width: 250px;
    }
}