/* =========================================
   NOTEBOOK GUESTBOOK
========================================= */

.guestbook {
    position: relative;
    width: 500px;
    padding: 30px 25px 30px 45px;
    margin: 40px auto;
    
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 31px,
            rgba(160, 90, 50, 0.18) 32px
        ),
        var(--cream);

    border: 2px solid var(--brown-dark);
    border-radius: 8px;

    box-shadow:
        6px 6px 0 var(--brown-dark);
    top: 1px;
}


/* =========================================
   RED MARGIN LINE
========================================= */

.guestbook::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    left: 32px;

    width: 2px;

    background: rgba(160, 90, 50, 0.35);
}


/* =========================================
   SPIRAL BINDING
========================================= */

.guestbook::after {
    content: "";

    position: absolute;

    top: 35px;
    bottom: 15px;

    left: -12px;

    width: 20px;

    background:
        repeating-linear-gradient(
            to bottom,
            var(--brown-dark) 0 2px,
            transparent 8px 50px
        );
}


.guestbook h2 {
    margin-bottom: 8px;

    text-align: center;

    font-size: 1.5rem;
}


.guestbook-intro {
    margin-bottom: 25px;

    text-align: center;

    font-size: 0.8rem;

    color: var(--brown);
}


.guestbook-content {
    min-height: 200px;

    padding: 15px;

    background: var(--orange-light);

    border-radius: 10px;
}


.guestbook-content p {
    font-size: 0.8rem;

    color: var(--brown);

    text-align: center;
}


/* =========================================
   GUESTBOOK FORM
========================================= */

#guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}


#guestbook-entries {
    overflow-y: auto;

    max-height: 400px;

    display: flex;
    flex-direction: column;

    gap: 30px;

    padding-right: 8px;

    padding: 10px 0;

    background: transparent;

    border-bottom:
        1px solid rgba(160, 90, 50, 0.2);
}

#guestbook-form input,
#guestbook-form textarea {
    width: 100%;

    padding: 14px 16px;

    font-family: var(--body-font);
    font-size: 0.85rem;

    color: var(--brown-dark);
    background: var(--cream);

    border: 2px solid var(--brown-dark);
    border-radius: 12px;

    outline: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


#guestbook-form textarea {
    min-height: 120px;
    resize: vertical;
}


/* Placeholder text */

#guestbook-form input::placeholder,
#guestbook-form textarea::placeholder {
    color: var(--brown);
    opacity: 0.6;
}


/* When typing */

#guestbook-form input:focus,
#guestbook-form textarea:focus {
    background: var(--orange-light);
}


/* =========================================
   SUBMIT BUTTON
========================================= */

#guestbook-form button {
    padding: 14px 20px;

    font-family: var(--heading-font);
    font-size: 0.9rem;
    letter-spacing: 1px;

    color: var(--cream);
    background: var(--brown-dark);

    border: 2px solid var(--brown-dark);
    border-radius: 12px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.2s ease;
}


#guestbook-form button:hover {
    transform: translateY(-3px);

    background: var(--brown);
}


#guestbook-form button:active {
    transform: translateY(2px);
}

/* =========================================
   AUTOFILL
========================================= */

#guestbook-form input:-webkit-autofill,
#guestbook-form input:-webkit-autofill:hover,
#guestbook-form input:-webkit-autofill:focus,
#guestbook-form textarea:-webkit-autofill,
#guestbook-form textarea:-webkit-autofill:hover,
#guestbook-form textarea:-webkit-autofill:focus {

    -webkit-text-fill-color: var(--brown-dark);

    -webkit-box-shadow:
        0 0 0 1000px var(--cream) inset;

    box-shadow:
        0 0 0 1000px var(--cream) inset;

    caret-color: var(--brown-dark);

    transition:
        background-color 9999s ease-out 0s;
}

/* =========================================
   GUESTBOOK SCROLLBAR
========================================= */

#guestbook-entries::-webkit-scrollbar {
    width: 8px;
}


/* The background track */

#guestbook-entries::-webkit-scrollbar-track {
    background: var(--orange-light);
    border-radius: 10px;
}


/* The draggable part */

#guestbook-entries::-webkit-scrollbar-thumb {
    background: var(--brown);
    border-radius: 10px;

    border: 2px solid var(--orange-light);
}


/* Hover */

#guestbook-entries::-webkit-scrollbar-thumb:hover {
    background: var(--brown-dark);
}