/* fredoka-300 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 300;
    src: url('./fonts/fredoka-v14-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fredoka-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/fredoka-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fredoka-500 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 500;
    src: url('./fonts/fredoka-v14-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fredoka-600 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 600;
    src: url('./fonts/fredoka-v14-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fredoka-700 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 700;
    src: url('./fonts/fredoka-v14-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* permanent-marker-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Permanent Marker';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/permanent-marker-v16-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* lato-300 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    src: url('./fonts/lato-v24-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* lato-300italic - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Lato';
    font-style: italic;
    font-weight: 300;
    src: url('./fonts/lato-v24-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* lato-700 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    src: url('./fonts/lato-v24-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* lato-700italic - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Lato';
    font-style: italic;
    font-weight: 700;
    src: url('./fonts/lato-v24-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/* Reset some default styles for consistency */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: inside;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
strong {
    font-weight: bold;
}

/* Set a playful, futuristic font */
body {
    font-family: 'Fredoka', sans-serif;
    font-weight: 300;
}

/* Define background and text colors */
body {
    min-height: 100vh;
    background-color: #00bfff;
    color: #333;
    padding: 5px;
    line-height: 1.3;
}

/* Header styles */
header {
    background-color: #00bfff;
    color: #fff;
    text-align: center;
    padding: 5px;
}

header h1 {
    font-size: 36px;
    font-weight: bold;
}

/* Navigation styles */
nav {
    background-color: #00bfff;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 5px 0;
}

nav li {
    margin: 0 5px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Section styles */
main, section {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 20px auto;
}

@media(max-width: 600px) {
    main, section {
        padding: 10px 6px;
    }
}

main h2, section h2 {
    font-size: 24px;
    color: #00bfff;
    font-weight: 600;
}

main p, section p {
    font-size: 16px;
    margin-bottom: 0.5rem;
}

/* "Try it now" button styles */
a.cta {
    display: inline-block;
    padding: 10px;
    background-color: #00bfff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

a.cta:hover {
    background-color: #0080ff;
}

a {
    padding: 0.2rem;
    color: inherit;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

a:hover {
    background-color: #0080ff;
}

small {
    font-size: 75%;
}

/* Footer styles */
footer {
    text-align: center;
    background-color: #00bfff;
    color: #fff;
    padding: 10px 0;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    header h1 {
        font-size: 28px;
    }

    nav ul {
        flex-wrap: wrap;
        text-align: center;
    }

    nav li {
        margin: 10px 0;
    }

    main, section {
        margin: 10px 0;
    }
}

.generator-article {
    margin: 20px 0;
}

.generator-input-group {
}

.generator-label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.generator-input {
    color: rgb(55 65 81);
    line-height: 1.25;
    padding: 0.5rem 0.75rem 0.5rem 0.75rem;
    border: 1px solid grey;
    border-radius: 5px;
    margin-bottom: 16px;
    box-sizing: border-box;
    width: 100%;
}

fieldset {
    border: 1px solid grey;
    border-radius: 5px;
}

.generator-input-with-addons {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 16px;
}

.generator-input-with-addons .generator-input {
    flex-grow: 1;
    align-self: stretch;
    margin: 0;
    width: unset;
    border-radius: 5px 0 0 5px;
    border-right: none;
}

.generator-input-with-addons .generator-input-addon {
    flex-grow: 0;
    border-radius: 0;
    border-left: none;
    transition: background-color 0.3s ease;
}

.generator-input-with-addons button.generator-input-addon:disabled {
    background-color: gray;
}

.generator-input-with-addons button.generator-input-addon:hover {
    background-color: #0080ff;
    cursor: pointer;
}

.generator-input-with-addons button.generator-input-addon:disabled:hover {
    cursor: progress;
    background-color: gray;
}

.generator-input-with-addons .generator-input-addon:last-child {
    flex-grow: 0;
    border-radius: 0 5px 5px 0;
}

.generator-collapse {
    margin-bottom: 16px;
    transition: max-height 0.5s ease-out;
    max-height: 3rem;
    overflow: hidden;
}

.generator-collapse-heading {
    cursor: pointer;
}

.generator-submit-row {
    display: flex;
    flex-direction: row;
    margin-bottom: 16px;
}

.generator-submit, button {
    background-color: deepskyblue;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    color: white;
    transition: background-color 0.3s ease;
}

.generator-submit:disabled {
    background-color: gray;
}

.generator-submit:hover, button:hover {
    background-color: #0080ff;
    cursor: pointer;
}

.generator-submit:disabled:hover, button:disabled:hover {
    background-color: gray;
    cursor: not-allowed;
}

.generator-submit:disabled:hover {
    cursor: progress;
}

.lds-dual-ring.hidden:after {
    display: none;
}

.generator-copy-button {
    float: right;
}

.generator-history-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    border: 1px solid gray;
    padding: 4px 20px 4px 8px;
    border-radius: 4px;
}

.post-it, .paper {
    position:relative;
    overflow:hidden;
    padding:2rem;
    border: none;
    box-shadow:
            inset 0 -40px 40px rgba(0,0,0,0.08),
            inset 0 25px 10px rgba(0,0,0,0.02),
            0 5px 4px rgba(0,0,0,0.2);
    margin: 16px 10px 20px;
}

.post-it {
    font-family: 'Permanent Marker';
    background:#ffa;
    border-radius:0 0 0 30px/45px;
}

.post-it:before {
    content:"";
    display:block;
    position:absolute;
    width:20px;
    height:25px;
    box-shadow:
            3px -2px 10px rgba(0,0,0,0.2),
            inset 15px -15px 15px rgba(0,0,0,0.3);
    left:0;
    bottom:0;
    z-index:2;
    transform:skewX(25deg);
}

.post-it:before {
    background:#ffa;
}

.post-it a {
    border-radius: 0.8em 0.3em;
    background: transparent;
    text-decoration: none;
    padding: 0 0.4rem 0 0.2rem;
}

.post-it a:hover, .post-it a:focus {
    background: linear-gradient(
            104deg,
            rgba(130, 255, 173,0) 0.9%,
            rgba(130, 255, 173,2.5) 2.4%,
            rgba(130, 255, 173,1) 5.8%,
            rgba(130, 255, 173,0.2) 93%,
            rgba(130, 255, 173,1.4) 96%,
            rgba(130, 255, 1732,0) 98%
        ),
        linear-gradient(183deg,
            rgba(130, 255, 173,0) 0%,
            rgba(130, 255, 173,0.3) 7.9%,
            rgba(130, 255, 173,0) 15%
    );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.paper {
    font-family: 'Lato';
    color: black;
    border: 1px solid lightgrey;
    padding: 1rem 3rem 2rem;
}

.paper header {
    margin-bottom: 0.8rem;
}

.paper h1, .paper h2, .paper h3, .paper h4, .paper h5 {
    color: black;
    font-weight: bold;
}

.paper h1 {
    font-size: 28px;
    margin-top: 1rem;
    margin-bottom: 0.8rem;
}

.paper h2 {
    font-size: 24px;
    margin-top: 1rem;
    margin-bottom: 0.8rem;
}

.paper h3 {
    font-size: 20px;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
}

.paper h4 {
    font-size: 18px;
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
}

.paper h5 {
    font-size: 16px;
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
}

.paper header {
    background: none;
    color: black;
    text-align: left;
    font-size: 85%;
    margin-top: 0.8rem;
}

@media(max-width: 600px) {
    .paper {
        padding: 0.5rem 1.5rem 1.5rem;
        margin-left: 0;
        margin-right: 0;
    }
}

.column-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
}

@media(max-width: 810px) {
    .column-grid {
        grid-template-columns:1fr;
    }
}

.lds-dual-ring {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 24px;
    height: 24px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid rgb(156 163 175);
    border-color: rgb(156 163 175) transparent rgb(156 163 175) transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* 1. Define color variables for different score ranges.
     This makes it easy to change the color scheme later.
*/
:root {
    --score-low-bg: #fee2e2;
    --score-low-text: #b91c1c;
    --score-medium-bg: #fef9c3;
    --score-medium-text: #a16207;
    --score-high-bg: #dcfce7;
    --score-high-text: #166534;
}

/* 2. Basic styling for the score badge.
     This creates the circular shape, centers the text, and sets the font style.
*/
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    min-width: 2.5rem; /* 40px */
    height: 2.5rem;   /* 40px */
    padding: 0 0.5rem;
    border-radius: 9999px; /* Creates a pill/circle shape */
    color: var(--text-color, #000); /* Default text color */
    background-color: var(--bg-color, #eee); /* Default background */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 3. Apply colors based on the data-score attribute value.
*/

/* Low scores: 1, 2, 3 */
.score-badge[data-score='1'],
.score-badge[data-score='2'],
.score-badge[data-score='3'] {
    --bg-color: var(--score-low-bg);
    --text-color: var(--score-low-text);
}

/* Medium scores: 4, 5, 6, 7 */
.score-badge[data-score='4'],
.score-badge[data-score='5'],
.score-badge[data-score='6'],
.score-badge[data-score='7'] {
    --bg-color: var(--score-medium-bg);
    --text-color: var(--score-medium-text);
}

/* High scores: 8, 9, 10 */
.score-badge[data-score='8'],
.score-badge[data-score='9'],
.score-badge[data-score='10'] {
    --bg-color: var(--score-high-bg);
    --text-color: var(--score-high-text);
}

.score-section {
    padding: 1rem 0;
    display: none;
}

.feedback-item {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
}