.note-detail-page {
    max-width: 1400px;
    height: 780px;

    margin: 30px auto;

    display: grid;
    grid-template-columns: 1fr 1fr;

    background: #fff;

    border: 1px solid #e6e6e6;
    border-radius: 16px;

    overflow: hidden;
}


/* =========================
   LEFT SIDE - MEDIA
========================= */

.note-media {
    width: 100%;
    height: 780px;

    background: #f7f7f7;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    overflow: hidden;
}


.note-media img,
.note-media video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center top;
}


/* =========================
   RIGHT SIDE
========================= */

.note-right {
    width: 100%;
    height: 780px;

    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-left: 1px solid #e6e6e6;

    box-sizing: border-box;
}


/* =========================
   SCROLLABLE CONTENT
========================= */

.note-scroll {
    height: 705px;

    min-width: 0;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-gutter: stable;
}


/* Optional cleaner scrollbar */

.note-scroll::-webkit-scrollbar {
    width: 7px;
}

.note-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.note-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.note-scroll::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* =========================
   NOTE CONTENT
========================= */

.note-content {
    padding: 32px;
}


/* =========================
   USER
========================= */

.note-user {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}


.note-user-info {
    display: flex;
    flex-direction: column;
}


.note-user-info strong {
    font-size: 16px;
    font-weight: 700;
}


.note-user-info span {
    margin-top: 4px;

    font-size: 13px;

    color: #888;
}


/* =========================
   SUBSCRIBE BUTTON
========================= */

.subscribe-button {
    flex-shrink: 0;

    border: none;

    background: #212529;
    color: #fff;

    padding: 9px 20px;

    border-radius: 22px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 600;

    transition: opacity 0.2s ease;
}


.subscribe-button:hover {
    opacity: 0.85;
}


/* =========================
   TITLE
========================= */

.note-title {
    font-size: 26px;
    font-weight: 700;

    line-height: 1.3;

    margin: 0 0 18px;

    word-break: break-word;
}


/* =========================
   DESCRIPTION
========================= */

.note-description {
    font-size: 16px;

    line-height: 1.7;

    color: #444;

    word-break: break-word;
}


/* =========================
   LIKE / VIEW
========================= */

.note-actions {
    display: flex;
    align-items: center;

    gap: 25px;

    margin-top: 25px;

    color: #777;
}


.note-action-button {
    border: none;

    background: transparent;

    padding: 0;

    cursor: pointer;

    color: #777;

    font-size: 15px;
}


/* =========================
   COMMENTS
========================= */

.note-comments {
    margin: 0 32px;

    padding: 25px 0 30px;

    border-top: 1px solid #eee;
}


.note-comments h4 {
    margin: 0 0 20px;

    font-size: 22px;
    font-weight: 700;
}


.comment-list {
    width: 100%;
}


.comment {
    padding: 15px 0;

    border-bottom: 1px solid #eee;
}


.comment:last-child {
    border-bottom: none;
}


.comment strong {
    font-size: 14px;
    font-weight: 700;
}


.comment p {
    margin: 5px 0 0;

    color: #555;

    line-height: 1.5;

    word-break: break-word;
}


.no-comments {
    color: #888;

    margin: 0;
}


/* =========================
   FIXED COMMENT BAR
========================= */

.note-comment-bar {
    height: 75px;

    flex: 0 0 75px;

    padding: 15px 20px;

    border-top: 1px solid #e6e6e6;

    background: #fff;

    box-sizing: border-box;
}


/* =========================
   COMMENT FORM
========================= */

.comment-form {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    margin: 0;
}


.comment-form textarea {
    flex: 1;

    height: 44px;
    min-height: 44px;
    max-height: 44px;

    resize: none;

    border: 1px solid #ddd;
    border-radius: 22px;

    padding: 10px 14px;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    box-sizing: border-box;
}


.comment-form textarea:focus {
    border-color: #999;
}


.comment-form button {
    height: 44px;

    flex-shrink: 0;

    border: none;

    background: #212529;
    color: #fff;

    border-radius: 22px;

    padding: 0 20px;

    cursor: pointer;

    font-weight: 600;
}


.comment-form button:hover {
    opacity: 0.85;
}


.login-comment-message {
    margin: 12px 0;

    color: #777;

    text-align: center;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1100px) {

    .note-detail-page {
        margin: 20px;

        grid-template-columns: 1fr 1fr;
    }

    .note-content {
        padding: 24px;
    }

    .note-comments {
        margin: 0 24px;
    }

    .note-title {
        font-size: 23px;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .note-detail-page {
        width: 100%;
        height: auto;

        margin: 0;

        display: block;

        border-left: none;
        border-right: none;

        border-radius: 0;

        overflow: visible;
    }


    /* MEDIA */

    .note-media {
        width: 100%;
        height: auto;

        min-height: 0;

        background: #f7f7f7;
    }


    .note-media img,
    .note-media video {
        width: 100%;
        height: auto;

        max-width: 100%;
        max-height: none;

        object-fit: contain;
    }


    /* RIGHT */

    .note-right {
        width: 100%;
        height: auto;

        min-height: 0;

        border-left: none;
        border-top: 1px solid #e6e6e6;

        overflow: visible;
    }


    /* MOBILE DOES NOT NEED INTERNAL SCROLL */

    .note-scroll {
        height: auto;

        overflow: visible;
    }


    .note-content {
        padding: 20px;
    }


    .note-user {
        margin-bottom: 20px;
    }


    .note-title {
        font-size: 22px;
    }


    .note-description {
        font-size: 15px;
    }


    .note-comments {
        margin: 0 20px;

        padding: 20px 0;
    }


    /* STICK COMMENT FORM TO BOTTOM */

    .note-comment-bar {
        width: 100%;
        height: auto;

        flex: none;

        position: sticky;
        bottom: 0;

        z-index: 20;

        padding: 12px 15px;

        background: #fff;

        border-top: 1px solid #e6e6e6;
    }


    .comment-form textarea {
        height: 42px;
        min-height: 42px;
        max-height: 42px;
    }


    .comment-form button {
        height: 42px;

        padding: 0 16px;
    }

}


/* =========================
   SMALL PHONES
========================= */

@media (max-width: 480px) {

    .note-content {
        padding: 16px;
    }


    .note-comments {
        margin: 0 16px;
    }


    .note-user {
        gap: 10px;
    }


    .subscribe-button {
        padding: 8px 14px;

        font-size: 13px;
    }


    .note-title {
        font-size: 20px;
    }


    .note-actions {
        gap: 18px;
    }


    .note-comment-bar {
        padding: 10px;
    }


    .comment-form {
        gap: 7px;
    }


    .comment-form button {
        padding: 0 13px;

        font-size: 13px;
    }

}