/* =====================================================
   ETERNA GUESTBOOK
   SOFT BLUE — MOBILE LIST VIEW
===================================================== */


/* =====================================================
   COLOR VARIABLES
===================================================== */

:root {

    --blue: #B5C9D3;

    --blue-light: #EAF2F5;

    --blue-soft: #F6FAFB;

    --blue-dark: #58727F;

    --blue-text: #344850;

    --white: #FFFFFF;

    --border: #DCE7EB;

    --muted: #91A0A6;

    --star: #D4A84F;

}


/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
}


/* =====================================================
   BODY
===================================================== */

body {

    margin: 0;

    padding: 12px;

    background: transparent;

    color: var(--blue-text);

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

}


/* =====================================================
   MAIN CONTAINER
===================================================== */

#guestbook-container {

    width: 100%;

    max-width: 480px;

    margin: 0 auto;

}


/* =====================================================
   REVIEWS SECTION
===================================================== */

#reviews-section {

    width: 100%;

}


/* =====================================================
   GUESTBOOK LIST
===================================================== */

#guestbook-list {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 10px;

    /* Paparkan lebih kurang 3 review */
    max-height: 340px;

    /* Customer boleh scroll sendiri */
    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 4px;

    scrollbar-width: thin;
    scrollbar-color: var(--blue) transparent;
}

#guestbook-list::-webkit-scrollbar {
    width: 4px;
}

#guestbook-list::-webkit-scrollbar-track {
    background: transparent;
}

#guestbook-list::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 10px;
}


/* =====================================================
   LOADING / EMPTY TEXT
===================================================== */

.loading-text {

    text-align: center;

    color: var(--muted);

    font-size: 12px;

    padding: 20px 0;

}


/* =====================================================
   REVIEW CARD
===================================================== */

.entry {

    width: 100%;

    background:
        linear-gradient(
            145deg,
            #FFFFFF 0%,
            #F8FBFC 100%
        );

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 14px 15px;

    box-shadow:
        0 3px 12px rgba(70, 100, 110, 0.05);

    animation: reviewFade 0.35s ease;

}


/* =====================================================
   CARD ANIMATION
===================================================== */

@keyframes reviewFade {

    from {

        opacity: 0;

        transform: translateY(5px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


/* =====================================================
   TOP ROW
===================================================== */

.entry-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 6px;

}


/* =====================================================
   NAME
===================================================== */

.entry .name {

    margin: 0;

    color: var(--blue-dark);

    font-size: 13px;

    font-weight: 600;

    line-height: 1.3;

}


/* =====================================================
   RATING VIEW
===================================================== */

.rating-view {

    flex-shrink: 0;

    color: var(--star);

    font-size: 15px;

    letter-spacing: 1px;

    line-height: 1;

}


/* =====================================================
   MESSAGE
===================================================== */

.entry .message {

    margin: 0;

    color: #53656C;

    font-size: 12px;

    font-weight: 400;

    line-height: 1.65;

    white-space: pre-wrap;

    word-break: break-word;

}


/* =====================================================
   DATE
===================================================== */

.entry .date {

    margin-top: 8px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 400;

    text-align: right;

}


/* =====================================================
   REVIEW FORM
===================================================== */

#review-form {

    margin-top: 28px;

    padding-top: 22px;

    border-top: 1px solid var(--border);

}


/* =====================================================
   FORM HEADING
===================================================== */

.form-heading {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 18px;

}


.form-title {

    flex-shrink: 0;

    color: var(--blue-dark);

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    font-weight: 600;

    letter-spacing: 0.3px;

}


.form-line {

    flex: 1;

    height: 1px;

    background: var(--border);

}


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

form {

    display: flex;

    flex-direction: column;

    gap: 7px;

}


/* =====================================================
   LABEL
===================================================== */

form label {

    margin-top: 4px;
    color: var(--blue-dark);
    font-size: 17px;
    font-family: 'Cormorant Garamond', serif;
    text-transform: uppercase;
    font-weight: 600;

}


/* =====================================================
   INPUT + TEXTAREA
===================================================== */

input[type="text"],
textarea {

    width: 100%;

    border: 1px solid var(--border);

    border-radius: 9px;

    outline: none;

    background: var(--blue-soft);

    color: var(--blue-text);

    /*
       16px penting untuk mobile
       supaya browser tidak auto zoom
    */

    font-family: 'Poppins', sans-serif;

    font-size: 16px;

    font-weight: 400;

    padding: 10px 11px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


/* =====================================================
   PLACEHOLDER
   CORMORANT GARAMOND
===================================================== */

input::placeholder,
textarea::placeholder {

    color: #93A1A7;

    font-family: 'Poppins', serif;

    font-size: 13px;

    font-weight: 300;

    letter-spacing: 0.2px;

    opacity: 1;

}


/* =====================================================
   FOCUS
===================================================== */

input:focus,
textarea:focus {

    background: var(--white);

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(175, 197, 208, 0.18);

}


/* =====================================================
   TEXTAREA
===================================================== */

textarea {

    min-height: 88px;

    max-height: 150px;

    resize: vertical;

    line-height: 1.5;

}

/* =====================================================
   RATING INPUT
===================================================== */

.rating {

    display: flex;

    flex-direction: row-reverse;

    justify-content: flex-end;

    align-items: center;

    gap: 2px;

    margin: 1px 0 5px;

}


.rating input {

    display: none;

}


.rating label {

    margin: 0;

    padding: 0 2px;

    color: #D9E2E6;

    cursor: pointer;

    font-family: Arial, sans-serif;

    font-size: 29px;

    line-height: 1;

    transition:
        color 0.18s ease,
        transform 0.18s ease;

}


.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label {

    color: var(--star);

    transform: scale(1.05);

}


/* =====================================================
   SUBMIT BUTTON
===================================================== */

#submit-btn {

    width: 100%;

    min-height: 43px;

    margin-top: 7px;

    padding: 10px 16px;

    border: none;

    border-radius: 9px;

    background: var(--blue);

    color: var(--white);

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    cursor: pointer;

    font-family: 'Poppins', sans-serif;

    font-size: 14px;

    font-weight: 500;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


#submit-btn:hover {

    background: #496570;

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(70, 100, 110, 0.15);

}


#submit-btn:active {

    transform: scale(0.98);

}


#submit-btn:disabled {

    opacity: 0.55;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;

}


/* =====================================================
   STATUS MESSAGE
===================================================== */

#status-msg {

    min-height: 18px;

    margin: 3px 0 0;

    color: var(--blue-dark);

    font-size: 10px;

    font-weight: 500;

    text-align: center;

}


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

@media (max-width: 480px) {

    body {

        padding: 8px;

    }


    #guestbook-container {

        max-width: 100%;

    }


    .entry {

        padding: 13px 14px;

        border-radius: 13px;

    }


    .entry-top {

        margin-bottom: 5px;

    }


    .entry .name {

        font-size: 12px;

    }


    .rating-view {

        font-size: 13px;

    }


    .entry .message {

        font-size: 11.5px;

        line-height: 1.65;

    }


    .entry .date {

        font-size: 8.5px;

        margin-top: 7px;

    }


    #review-form {

        margin-top: 24px;

        padding-top: 20px;

    }


    .form-heading {

        margin-bottom: 16px;

    }


    .form-title {

        font-size: 15px;

    }


    form {

        gap: 6px;

    }


    form label {

        font-size: 15px;

    }


    input[type="text"],
    textarea {

        font-size: 16px;

        padding: 10px;

    }


    input::placeholder,
    textarea::placeholder {

        font-size: 13px;

    }


    textarea {

        min-height: 82px;

    }


    .rating label {

        font-size: 28px;

    }


    #submit-btn {

        min-height: 42px;

        font-size: 12px;

    }

}

@media (max-width: 480px) {

    #guestbook-list {
        max-height: 330px;

        overflow-y: auto;

        padding-right: 3px;

        scrollbar-width: none;
    }

    #guestbook-list::-webkit-scrollbar {
        display: none;
    }

}