/*csslint bulletproof-font-face: false*/


/* #region CSS PROPERTY ORDER GUIDE */

/* ==================================================
FORMAT FOR CSS

keep stuff in this order:

.example {

    1. positioning
    position:
    top:
    right:
    bottom:
    left:
    z-index:

    2. layout
    display:
    flex-direction:
    justify-content:
    align-items:
    gap:
    overflow:

    3. size
    width:
    min-width:
    max-width:
    height:
    min-height:
    max-height:

    4. spacing
    margin:
    padding:

    5. text
    font-family:
    font-size:
    font-weight:
    line-height:
    letter-spacing:
    word-spacing:
    text-align:
    color:

    6. appearance
    background:
    border:
    border-radius:
    box-shadow:
    opacity:

    7. transformations
    transform:
    transform-origin:

    8. interaction + animation
    cursor:
    pointer-events:
    visibility:
    transition:
    animation:
}

================================================== */

/* #endregion */


/* #region CUSTOM HANDWRITING FONT */

/* ==================================================
custom handwriting font
================================================== */

@font-face {
    font-family: "Bela Handwriting";
    src: url("../fonts/O4tolo-Regular.ttf") format("truetype");

    font-weight: normal;
    font-style: normal;
}

/* #endregion */


/* #region DIARY PAGE SETUP */

/* ==================================================
diary page setup
================================================== */

.diary-page {
    min-height: 100vh;

    margin: 0;

    font-family: "Bela Handwriting", sans-serif;
    color: white;

    background-color: black;
}

/* #endregion */


/* #region DIARY HEADER */

/* ==================================================
diary header
================================================== */

.diary-header {
    text-align: center;
}


/* ==================================================
drawn site title
================================================== */

.diary-title-pic {
    display: block;

    width: 80%;
    max-width: 800px;
    height: auto;

    margin: 30px auto 10px;
}


/* ==================================================
diary site subtitle text
================================================== */

.diary-header p {
    margin: 0;

    font-family: "Courier New", Courier, monospace;
    font-size: 20px;
    line-height: 1.2;
}

/* #endregion */


/* #region DIARY ENTRIES */

/* ==================================================
diary entries
================================================== */


/* #region diary entry container */

/* container for all diary entries */
/* max-width changes the white box width! */
.diary-entries {
    width: calc(100% - 40px);
    max-width: 1000px;

    margin: 70px auto 120px;
}

/* #endregion */


/* #region individual diary entry */

/* individual diary entry */
.diary-entry {
    position:relative;

    padding: 28px;

    border: 2px solid white;
}

/* space between entries */
.diary-entry + .diary-entry {
    margin-top: 30px;
}

/* #endregion */


/* #region diary entry text */

/* diary entry TEXT OVERALL */
.entry-text {
    width: 100%;

    box-sizing: border-box;

    font-size: 30px;
    line-height: 1.75;
    letter-spacing: 0.75px;
    word-spacing: 1.5px;
    text-align: left;
}


/* diary entry paragraph text */
.entry-text p {
    margin: 0 0 18px;

    text-indent: 2em;

    overflow-wrap: break-word;
}


/* removes extra bottom space from final paragraph */
.entry-text p:last-child {
    margin-bottom: 0;
}


/* diary entry link text */
.entry-text a {
    color: #ff0000;
}


/* diary entry link hover */
.entry-text a:hover {
    color: #ff7878;
}

/* #endregion */


/* #region diary entry top section */

/* top section of each entry */
.entry-top {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    min-height: 250px;

    padding-left: 230px;
    padding-right: 30px;

    box-sizing: border-box;
}


/* title container */
.entry-info {
    width: 100%;

    padding-top: 45px;

    box-sizing: border-box;

    text-align: center;
}


/* large centered title inside container */
.entry-info h2 {
    margin: 0;

    font-size: 50px;
    font-weight: bold;
    line-height: 1.1;

    overflow-wrap: break-word;
}

/* diary entry soundbar */
.entry-audio {
    display: block;

    width: 220px;
    height: 30px;

    margin: 15px auto 0;

    filter: grayscale(100%) invert(100%);
}

/* date in top right corner */
.entry-info time {
    position: absolute;
    top: 0;
    right: 0px;

    font-family: "Courier New", Courier, monospace;
    font-size: 20px;
}

/* #endregion */

/* #endregion */


/* #region LIVE REACTION BOX */

/* ==================================================
live reaction box
================================================== */


/* live reaction box */
.live-reaction {
    position: absolute;
    top: 0;
    left: 0;

    flex-shrink: 0;
    overflow: visible;

    width: 220px;
    height: 200px;

    text-align: center;
}


/* image inside live reaction box */
.reaction-image {
    position: absolute;
    top: 58%;
    left: 50%;
    z-index: 2;

    width: auto;
    max-width: 75%;

    height: auto;
    max-height: 70%;

    object-fit: contain;

    transform: translate(-50%, -50%);
}


/* live reaction frame */
.live-reaction-frame {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

/* #endregion */

/* clickable image preview */
.image-preview {
    display: block;

    width: 400px;
    max-width: 100%;
    height: auto;

    margin: 30px auto;

    cursor: pointer;
}


/* #region SCROLLING MOOD TICKER */

/* ==================================================
scrolling mood ticker
================================================== */


/* mood rectangle */
.mood-ticker {
    position: absolute;
    top: 100%;
    left: 0;

    overflow: hidden;

    width: 100%;
    height: 40px;

    box-sizing: border-box;

    font-family: "Courier New", Courier, monospace;
    font-size: 20px;
    line-height: 36px;
    white-space: nowrap;
    color: white;

    background: black;
    border: 2px solid black;

    transform: translateY(10px);
}


/* scrolling mood text */
.mood-ticker > span {
    display: inline-block;

    padding-left: 100%;

    white-space: nowrap;

    animation: mood-scroll 15s linear infinite;
}


/* automatically glowing MOOD word */
/* javascript automatically gives the word MOOD this class */
.mood-label {
    display: inline;

    padding: 0;

    color: white;

    text-shadow:
        0 0 5px red,
        0 0 10px red,
        0 0 18px red;

    transform: none;

    animation: none;
}


/* moves mood text right to left */
@keyframes mood-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* #endregion */


/* #region DIARY ENTRY IMAGES */

/* ==================================================
diary entry add image
================================================== */


/*
HTML CODE FOR LEFT FLOAT IMAGE:

<img class="entry-image left"
     src="../images/moods/my-picture.png"
     alt="">
*/


/*
HTML CODE FOR RIGHT FLOAT IMAGE:

<img class="entry-image right"
     src="../images/moods/my-picture.png"
     alt="">
*/


/*
PUT IMAGE BEFORE THE PARAGRAPH YOU WANT IT TO FLOAT NEXT TO.

forr EXAMPLE:

<div class="entry-text">

    <img class="entry-image left"
         src="../images/moods/my-picture.png"
         alt="">

    <p>
        This is my diary entry. Text will flow next to the image
        and then continue under it once it reaches the bottom.
    </p>

</div>
*/


/* journal entry images */
.entry-image {
    width: 250px;
    max-width: 100%;
    height: auto;
}

/* image in center after paragraph no wrapping */
.entry-image.center {
    display: block;
    float: none;
    clear: both;

    margin: 70px auto;
}

/*
image on left, text wraps on right

margin:
top right bottom left
*/
.entry-image.left {
    float: left;

    margin: 0 20px 15px 25px;
}


/*
image on right, text wraps on left

margin:
top right bottom left
*/
.entry-image.right {
    float: right;

    margin: 0 60px 15px 20px;
}


/* keeps floated images inside the diary entry */
.entry-text::after {
    content: "";

    display: block;

    clear: both;
}

/* #endregion */


/* #region TEXT CUSTOMIZATION */

/* ==================================================
TEXT CUSTOMIZATION!!!!!!!!!!!!!!!!!!!
================================================== */

/* line between diary paragraphs */
.diary-line {
    display: block;
    clear: both;

    width: 90%;
    height: 2px;

    margin: 35px auto;

    background-color: white;
}

/* #region red glow */

/*
GLOW RED

HTML:
<p class="glow-red">Text glow RED.</p>

for one word:
<span class="glow-red">RED</span>
*/

.glow-red {
    color: white;

    text-shadow:
        0 0 5px red,
        0 0 10px red,
        0 0 20px red;
}

/* #endregion */


/* #region pulsing red glow */

/*
GLOW RED THEN BACK TO WHITE

HTML:
<p class="redglow-pulse">Dr. CACA...</p>

for one word:
<span class="redglow-pulse">CACA</span>
*/

.redglow-pulse {
    color: white;

    animation: red-glow 2s ease-in-out infinite;
}


/* makes red glow appear and disappear */
@keyframes red-glow {

    0%,
    100% {
        color: white;
        text-shadow: none;
    }

    50% {
        color: #ffcccc;

        text-shadow:
            0 0 5px red,
            0 0 12px red,
            0 0 22px red;
    }
}

/* #endregion */


/* #region rainbow text */

/*
RAINBOW!!

HTML:
<p class="rainbow-text">HAHAHAHA</p>

for one word:
<span class="rainbow-text">HAHAHAHA</span>
*/

.rainbow-text {
    color: transparent;

    background: linear-gradient(
        90deg,
        red,
        orange,
        yellow,
        lime,
        cyan,
        blue,
        violet
    );

    background-clip: text;
    -webkit-background-clip: text;
}

/* #endregion */


/* #region moving rainbow glow */

/*
MOVING RAINBOW GLOW

HTML:
<p class="rainbow-glow">CACA</p>

for one word:
<span class="rainbow-glow">CACA</span>
*/

.rainbow-glow {
    color: transparent;

    background: linear-gradient(
        90deg,
        red,
        orange,
        yellow,
        lime,
        cyan,
        blue,
        violet,
        red
    );

    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;

    animation:
        rainbow-move 10s linear infinite,
        rainbow-pulse 5s ease-in-out infinite;
}


/* scrolls rainbow horizontally */
@keyframes rainbow-move {

    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}


/* makes the rainbow glow breathe */
@keyframes rainbow-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 2px #ff4d6d);
    }

    50% {
        filter:
            drop-shadow(0 0 6px #00ffff)
            drop-shadow(0 0 9px #ff00ff);
    }
}

/* #endregion */


/* #region moving mexican flag glow */

/*
MOVING MEXICAN FLAG GLOW

HTML:
<p class="mexico-glow">VIVA MÉXICO</p>

for one word:
<span class="mexico-glow">MÉXICO</span>
*/

.mexico-glow {
    color: transparent;

    background: linear-gradient(
        90deg,
        green,
        white,
        red,
        white,
        green
    );

    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;

    animation:
        mexico-move 8s linear infinite,
        mexico-pulse 3s ease-in-out infinite;
}


/* moves the colors across the text */
@keyframes mexico-move {

    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* #endregion */

/* #endregion */


/* #region DROPDOWN LIST IMAGE ICON */

/* ==================================================
dropdown list image icon
================================================== */


/* remove default dropdown list arrow */
details summary {
    list-style: none;

    cursor: pointer;
}


/* removes default arrow in browser */
details summary::-webkit-details-marker {
    display: none;
}


/* custom eye dropdown icon cLOSED */
details summary::before {
    content: "";

    display: inline-block;

    width: 45px;
    height: 30px;

    margin-right: 8px;

    background-image: url("../images/icons/eye-open-icon.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


/* custom eye dropdown icon poPENED */
details[open] summary::before {
    background-image: url("../images/icons/eye-open-red-icon.png");
}

/* #endregion */


/* #region MOBILE DIARY PAGE */

/* ==================================================
mobile diary page
================================================== */

/*
changes diary layout on smaller screens

@media = these rules only apply when browser
is 768px wide or smaller

desktop diary stays exactly the same
*/

@media (max-width: 768px) {


    /* #region mobile diary page setup */

    /* ==================================================
    mobile diary page setup
    ================================================== */

    /*
    prevents anything from creating
    horizontal scrolling on phones
    */

    .diary-page {
        overflow-x: hidden;

        width: 100%;
        min-height: 100vh;
    }

    /* #endregion */




    /* #region mobile diary header */

    /* ==================================================
    mobile diary header
    ================================================== */

    /*
    gives header room from edges of phone
    */

    .diary-header {
        padding: 0 15px;

        box-sizing: border-box;
    }


    /* diary title image */

    .diary-title-pic {
        width: 95%;
        max-width: 500px;

        height: auto;

        margin: 20px auto 10px;
    }


    /* diary subtitle */

    .diary-header p {
        font-size: 16px;
        line-height: 1.3;
    }

    /* #endregion */




    /* #region mobile diary entries */

    /* ==================================================
    mobile diary entries
    ================================================== */

    /*
    lets diary boxes use almost entire phone width
    */

    .diary-entries {
        width: calc(100% - 20px);
        max-width: 100%;

        margin: 40px auto 80px;
    }


    /* individual diary box */

    .diary-entry {
        padding: 15px;
    }


    /* space between entries */

    .diary-entry + .diary-entry {
        margin-top: 20px;
    }

    /* #endregion */




    /* #region mobile entry top */

    /* ==================================================
    mobile entry top
    ================================================== */

    /*
    desktop version leaves 230px on left
    for live reaction box

    mobile stacks reaction box + title vertically
    instead of placing them beside each other
    */

    .entry-top {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;

        min-height: 0;

        padding-left: 0;
        padding-right: 0;
    }

    /* #endregion */




    /* #region mobile live reaction */

    /* ==================================================
    mobile live reaction
    ================================================== */

    /*
    removes desktop absolute positioning

    reaction box now becomes part of normal page flow
    and sits above diary title
    */

    .live-reaction {
        position: relative;
        top: auto;
        left: auto;

        width: 160px;
        height: 145px;

        margin: 0 auto 55px;
    }


    /* reaction image */

    .reaction-image {
        max-width: 75%;
        max-height: 70%;
    }


    /* mood ticker */

    .mood-ticker {
        height: 32px;

        font-size: 14px;
        line-height: 28px;

        transform: translateY(8px);
    }


    /* #endregion */




    /* #region mobile entry info */

    /* ==================================================
    mobile entry info
    ================================================== */

    /*
    title + date now use normal page flow

    date is no longer pinned to top-right corner
    */

    .entry-info {
        width: 100%;

        padding-top: 0;

        text-align: center;
    }


    /* diary entry title */

    .entry-info h2 {
        font-size: 28px;
        line-height: 1.15;
    }


    /* diary entry date */

    .entry-info time {
        position: static;

        display: block;

        margin-top: 12px;

        font-size: 14px;
        line-height: 1.3;
    }

    /* #endregion */




    /* #region mobile diary text */

    /* ==================================================
    mobile diary text
    ================================================== */

    /*
    smaller text makes long entries easier
    to read on narrow phone screens
    */

    .entry-text {
        width: 100%;

        font-size: 20px;
        line-height: 1.55;
        letter-spacing: 0.3px;
        word-spacing: 0.5px;
    }


    /* diary paragraphs */

    .entry-text p {
        margin: 0 0 16px;

        text-indent: 1.25em;
    }

    /* #endregion */




    /* #region mobile diary entry images */

    /* ==================================================
    mobile diary entry images
    ================================================== */

    /*
    removes desktop floating on phones

    images sit centered between text instead
    of squeezing paragraphs into narrow columns
    */

    .entry-image.left,
    .entry-image.right {
        float: none;

        display: block;

        width: auto;
        max-width: 80%;

        height: auto;

        margin: 15px auto;
    }

    /* #endregion */




    /* #region mobile dropdown icons */

    /* ==================================================
    mobile dropdown icons
    ================================================== */

    /*
    slightly smaller eye icon on phones
    */

    details summary::before {
        width: 35px;
        height: 24px;

        margin-right: 6px;
    }

    /* #endregion */


}

/* #endregion */