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

/* ---------- Header Section ---------- */
.viewnote-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #73726e;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.15s ease;
}

    .back-link:hover {
        color: #37352f;
        text-decoration: none;
    }

.back-icon {
    font-size: 1rem;
}

.header-content {
    margin-bottom: 1.5rem;
}

.note-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #37352f;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.note-description {
    font-size: 1.125rem;
    color: #73726e;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid #e9e9e7;
    border-bottom: 1px solid #e9e9e7;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #37352f;
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

    .rating-stars .star {
        font-size: 1rem;
        color: #d3d1cb;
    }

        .rating-stars .star.filled {
            color: #fbbf24;
        }

.rating-text {
    font-size: 0.875rem;
    color: #73726e;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #37352f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
}

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

.download-icon {
    font-size: 1rem;
}

/* ---------- PDF Viewer ---------- */
.pdf-viewer-wrapper {
    margin-bottom: 3rem;
    border: 1px solid #e9e9e7;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fafaf9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pdf-viewer {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

/* ---------- Rating Section ---------- */
.rating-section {
    max-width: 600px;
    margin: 0 auto;
}

.rating-card {
    background-color: #ffffff;
    border: 1px solid #e9e9e7;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.rating-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 0.5rem;
}

.rating-card-subtitle {
    font-size: 0.95rem;
    color: #73726e;
    margin-bottom: 1.5rem;
}

/* ---------- Interactive Rating ---------- */
.interactive-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

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

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

.btn-submit-rating {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #37352f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-submit-rating:hover {
        background-color: #2c2a26;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.current-rating-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #73726e;
    margin-bottom: 0;
}

/* ---------- Login to Rate Button ---------- */
.btn-rate-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #fafaf9;
    color: #37352f;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-rate-login:hover {
        background-color: #f0f0ef;
        border-color: #d3d1cb;
        transform: translateY(-1px);
    }

.login-icon {
    font-size: 1rem;
}

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

    /* Back link */
    .back-link {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Header */
    .note-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .note-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    /* Meta section - stack vertically */
    .note-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 0;
    }

    .rating-display {
        width: 100%;
        justify-content: space-between;
    }

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

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

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

    /* Header actions - stack buttons */
    .header-actions {
        width: 100%;
        flex-direction: column;
        margin-top: 0.75rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    /* PDF Viewer */
    .pdf-viewer-wrapper {
        margin-bottom: 2rem;
        border-radius: 8px;
    }

    .pdf-viewer {
        height: 400px; /* Shorter on mobile */
    }

    /* Rating Section */
    .rating-section {
        max-width: 100%;
    }

    .rating-card {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .rating-card-title {
        font-size: 1.125rem;
    }

    .rating-card-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    /* Interactive Rating */
    .interactive-rating {
        gap: 1rem;
    }

    .star-rating {
        gap: 0.375rem;
    }

        .star-rating .star {
            font-size: 1.5rem; /* Slightly smaller on mobile */
        }

    .btn-submit-rating {
        width: 100%;
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }

    .btn-rate-login {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }

    .current-rating-text {
        font-size: 0.8rem;
    }
}

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

    .note-title {
        font-size: 1.25rem;
    }

    .pdf-viewer {
        height: 350px; /* Even shorter on very small screens */
    }

    .star-rating .star {
        font-size: 1.25rem; /* Smaller stars for small screens */
        gap: 0.25rem;
    }
}