green  { color: rgb(65, 255, 15); }
yellow { color: rgb(230, 230, 0); }
red    { color: rgb(255, 25, 25); }

/* ------------------------------------------------------
   LAYOUT CONTAINERS
------------------------------------------------------ */

/* outer wrapper */
#interface {
    width: fit-content;
    margin-inline: auto;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* main card */
#main {
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;

    border-radius: 5px;
    border: 1px solid rgb(140, 140, 140);
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.4);

    color: white;
    font-family: 'Segoe UI Variable';
}

/* ------------------------------------------------------
   SUGGESTION BAR (scrollable tag row)
------------------------------------------------------ */

/* bar background */
#suggestion {
    background: rgb(180, 180, 180);
    height: 50px;
    position: relative;
}

/* fade indicators */
#suggestion .fade {
    position: absolute;
    top: 0;
    z-index: 10;

    width: 12px;
    height: 100%;
}

#suggestion .fade.right {
    right: 0;
    background: linear-gradient(
        to left,
        rgb(180, 180, 180) 15%,
        transparent 80%
    );
}

#suggestion .fade.left {
    left: 0;
    background: linear-gradient(
        to right,
        rgb(180, 180, 180),
        transparent
    );
}

/* ------------------------------------------------------
   BUBBLE TAGS (inside suggestion bar)
------------------------------------------------------ */

#bubbles {
    height: 100%;

    display: flex;
    align-items: center;
    gap: 8px;

    padding-inline: 12px;

    overflow-x: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#bubbles::-webkit-scrollbar { display: none; }

.bubble {
    cursor: pointer;
    user-select: none;

    color: white;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.5;

    background: rgb(40, 40, 40);
    border-radius: 5px;

    padding-inline: 8px;
    padding-top: 2px;
    padding-bottom: 6px;

    z-index: 2;
    transition: all 25ms ease;
}

.bubble:active { transform: scale(0.95); }

.bubble.selected {
    color: rgb(90, 225, 255);
}

.bubble .score {
    font-size: 14px;
    opacity: 0.6;
}

/* ------------------------------------------------------
   TEXTAREA
------------------------------------------------------ */

#textarea,
.marker {
    font-family: "Source Code Pro";
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 0.5px;
    line-height: 1.75;

    padding-inline: 16px;
    padding-top: 8px;
    padding-bottom: 38px;
}

#textarea {
    min-width: 450px;
    min-height: 250px;
    margin: 0;

    border: none;
    outline: none;
    color: white;

    background: transparent;
    position: relative;
    z-index: 5;
}

.marker {
    position: absolute;
    inset: 0;
    white-space: pre-wrap;
    pointer-events: none;
    color: transparent;

    background: linear-gradient(
        to top,
        rgb(75, 75, 75) 0%,
        rgb(40, 40, 40) 25px,
        rgb(40, 40, 40) 100%
    );
}

.wrapper {
    position: relative;
}

/* -------------------------------------------------------
   DOT REPLACEMENT
-------------------------------------------------------- */

.dot {
    position: relative;
    display: inline;
}

.dot::after {
    content: "•";
    position: absolute;
    inset: 0;
    text-align: center;
    color: rgba(255, 30, 30, 0.4);
    transform: translateY(-5px);
}

/* -------------------------------------------------------
   MARK HIGHLIGHTS
-------------------------------------------------------- */

.mark {
    border-radius: 1px;
}

.mark[data-color="0"] {
   background: rgba(232, 100, 255, 0.3);
   outline: black 1.5px solid;
   z-index: 0;
}

.mark[data-color="1"] {
   background: rgba(100, 255, 180, 0.3);
   outline: black 1.5px solid;
   z-index: 1;
}

.mark[data-color="2"] {
    background: rgba(100, 190, 255, 0.3);
    outline: black 1.5px solid;
    z-index: 2;
}


/* ------------------------------------------------------
   SETTINGS BAR (bottom overlay)
------------------------------------------------------ */

#settings {
    position: absolute;
    bottom: 0;
    left: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    width: calc(100% - 24px - 13px);

    padding-inline: 12px;
    padding-top: 10px;
    padding-bottom: 5px;
    z-index: 20;
}

.setting {
    font-size: 14px;
    font-style: italic;
    user-select: none;
    letter-spacing: 0.5px;

    color: rgba(255, 255, 255, 0.8);
}

.setting select {
    background: none;
    border: none;
    cursor: pointer;

    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 400;
    font-style: italic;

    padding-right: 5px;
}

.setting select option {
    color: black;
    font-style: normal;
}

/* ------------------------------------------------------
   ACTION BUTTONS
------------------------------------------------------ */

#buttons {
    display: flex;
    gap: 3px;
}

#buttons button {
    cursor: pointer;
    user-select: none;

    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;
    line-height: 1.5;

    background: rgb(75, 75, 75);
    border-radius: 15px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);

    padding-inline: 10px;
    padding-top: 4px;
    padding-bottom: 8px;
    margin-left: 5px;
}

#buttons button.active {
    background: rgb(210, 210, 210);
    color: black;
}

#buttons button.active:hover   { color: rgb(255, 40, 55); }
#buttons button:hover   { color: rgb(90, 225, 255); }

#buttons button:not(#generate-btn.active)
    :active  { transform: scale(0.95); }

#generate-btn.active { color: rgb(255, 40, 55) !important; }
