/* assets\css\style.css */
/* Global Styles */

*,
*::after,
*::before {
    box-sizing: inherit;
}

html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    display: block;
    overflow: auto;

    /* min-height: 100vh; */
    /* display: flex;
    flex-direction: column;
    flex-wrap: wrap; */
    /* justify-content: space-between; */
}

html {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    overflow-x: hidden;
    padding-top: 2.4rem;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: space-between;
    /* padding-bottom: 5rem; */

    /* display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    height: 100vh;
    */
}

html {
    height: 100%;
}

body {
    min-height: 100%;
}

.d-block-xs {
    display: block;
}

.d-flex-xs {
    display: flex;
}

.d-grid-xs {
    display: grid;
}


.flx-wrap-xs {
    flex-wrap: wrap;
}

.jc-center-xs {
    justify-content: center;
}

.pl-1x-xs {
    padding-left: 1rem;
}

.pr-1x-xs {
    padding-right: 1rem;
}

.mt-0-xs {
    margin-top: 0;
}

.mb-0-xs {
    margin-bottom: 0;
}

.pos-relative-xs {
    position: relative;
}

.pos-sticky-xs {
    position: sticky;
}

.t-0-xs {
    top: 0;
}

.l-0-xs {
    left: 0;
}

.z-1-xs {
    z-index: 1;
}

.z-2-xs {
    z-index: 2;
}

.lst-none-xs {
    list-style-type: none;
}

.p-0-xs {
    padding: 0;
}

.container {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    width: 100%;
}

/* Button Styles */
button,
.button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.button:hover {
    background-color: #0056b3;
}

/* Navigation Styles */
nav {
    background-color: #333;
    color: #fff;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: text-decoration 0.3s ease;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Header Styles */
header {
    background-color: #007bff;
    color: #fff;
    padding: 10px;
}

/* Footer Styles */
footer {
    background-color: #007bff;
    color: #fff;
    text-align: center;
    padding: 10px;
    /* position: fixed; */
    bottom: 0;
    width: 100%;

    /* position: sticky;
    bottom: 0;
    left: 0;
    right: 0; */
}

footer p {margin: 0;}

#editor-container {
    margin: 0 0 20px;
    padding: 20px;
    max-width: 800px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

#editor-container #project-title {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    border: none;
    background: rgba(0, 123, 255, .08);
    font-style: italic;
    margin-bottom: 20px;
}

#blocks-container .block {
    margin: 40px 0;
    /* padding: 10px; */
    /* border: 1px solid #ddd; */
    background: #fdfdfd;
    position: relative;
}

#blocks-container .block:first-of-type {
    margin-top: 0;
}

#blocks-container .block:last-of-type {
    margin-bottom: 0;
}

.delete-block {
    position: absolute;
    right: 0;
    top: 0;
}

.syllable {
    display: flex;
    justify-content: center;
}

.syllable label {
    display: flex;
    align-items: center;
    max-width: 50%;
}

.lines .line-wrapper {
    background-color: rgba(0, 123, 255, .08);
    margin-bottom: 2px;

    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.lines .line-wrapper:nth-child(2n+2) {
    background-color: rgba(0, 123, 255, .04);
}

.lines .line-wrapper input,
.lines .line-wrapper .syllable-count,
.syllable-min,
.syllable-max {
    vertical-align: middle;
    line-height: 1.5;
}

.lines .line-wrapper input,
.syllable-min,
.syllable-max {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(0, 123, 255, .08);
    padding: 0.25rem 1rem;
    font-size: 1.15rem;
    letter-spacing: .02em;
}

.lines .line-wrapper .syllable-count,
.syllable-min,
.syllable-max {
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: .5rem;
}

.syllable {
    margin-bottom: 10px;
    gap: 1rem;
}

.syllable-min,
.syllable-max {
    border: 3px solid rgba(0, 123, 255, .08);
    width: 4em;
    text-align: center;
    padding: 0;
    text-align-last: center;
}

.block h3 {
    margin: 0 0 10px;
    text-align: center;
    font-weight: bold;
    background: rgba(0, 123, 255, .08);
    position: relative;
}

.block h3 .icon {
    position: absolute;
    top: 50%;
    left: 1em;
    height: calc(100% - 1em);
}

.block h3 .icon {
    max-height: 100%;
    transform: translate(0%, -50%);
    color: #007bff;
}

#save-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
    z-index: 1000;
}

h1 {
    text-align: center;
}

.rock-salt-regular,
.block h3 {
    font-family: "Rock Salt", cursive;
    font-weight: 400;
    font-style: normal;
}

.button .rock-salt-regular {
    font-weight: 900;
    font-size: 1.01em;
    letter-spacing: .05em;
}

#block-controls {
    margin: 20px 0;
    display: flex;
    gap: 1rem;
}

#block-controls button {
    width: 50%;
}

.add-line {
    width: 100%;
}

.lines {
    counter-reset: bar;
}

.line-wrapper::before {
    counter-increment: bar;
    content: counter(bar, decimal-leading-zero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: .5rem;
    color: rgba(0, 123, 255, .5);
}

.syllable-green {
    color: #28a745;
}

.syllable-red {
    color: red;
}

.syllable-blue {
    color: #0056b3;
}

#notes {
    resize: none;
}

button:disabled {
    opacity: 0.5;
    filter: grayscale(1);
}

.list-link {
    background-color: #007bff;
    aspect-ratio: 1;
}

.ar-1-xs {
    aspect-ratio: 1;
}

.gap-1x-xs {
    gap: 1rem;
}

.ai-center-xs {
    align-items: center;
}

.h-100p-xs {
    height: 100%;
}

.c-white-xs {
    color: #fff;
}

.fw-600-xs {
    font-weight: 600;
}

.td-none-xs {
    text-decoration: none;
}

@media screen and (min-width: 641px) {
    .grid--2-l {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 981px) {
    .grid--3-xl {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (min-width: 1481px) {
    .grid--4-xxl {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Highlight beim Draggen */
.block.dragging {
    opacity: 0.5;
    background-color: #f0f0f0;
    border: 2px dashed #aaa;
    transform: scale(1.02);
    /* Leichte Vergrößerung */
}

/* Normale Blöcke */
.block {
    transition: transform 0.2s, box-shadow 0.2s;
}

.block:not(.dragging):hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.block h3 {
    cursor: grab;
}

.block h3:active {
    cursor: grabbing;
}

/* Platzhalter beim Draggen */
.block-placeholder {
    height: 50px;
    background-color: #e0e0e0;
    border: 2px dashed #bbb;
    margin: 5px 0;
    transition: background-color 0.2s;
}

.icon {
    aspect-ratio: 1;
    height: 1.5em;
    width: 1.5em;
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
}

.button .text {
    vertical-align: middle;
}

.button .icon+.text {
    margin-left: .5em;
}

#project-list {
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 8px;
    background: #f8f9fa url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iY3VycmVudENvbG9yIiBjbGFzcz0ic2l6ZS02Ij4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi41MyAxNi4yOGEuNzUuNzUgMCAwIDEtMS4wNiAwbC03LjUtNy41YS43NS43NSAwIDAgMSAxLjA2LTEuMDZMMTIgMTQuNjlsNi45Ny02Ljk3YS43NS43NSAwIDEgMSAxLjA2IDEuMDZsLTcuNSA3LjVaIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIC8+Cjwvc3ZnPgo=') no-repeat right 10px center;
    /* Icon als Hintergrund */
    appearance: none;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    background-size: auto 2em;
}

#notes {
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    resize: vertical;
    background: #f8f9fa;
}

@media screen and (max-width:420px) {
    #block-controls {
        display: block;
    }
    #block-controls .button {
        margin-bottom: 20px;
    }
    #block-controls .button:last-of-type {
        margin-bottom: 0;
    }

    #block-controls .button,
    #export-button {
        width: 100%;
    }

}

@media screen and (max-width:1216px) {
    #project-switch {
        padding-right: 0 !important;
        margin-bottom: 20px;
    }

    .sidebar-right {
        padding-left: 0 !important;
        width: 100%;
        max-width: 800px;
        margin-bottom: 20px;
    }

    .editor-wrapper {
        max-width: 800px;
        margin: 0 auto;
    }
}

@media screen and (min-width:1217px) {
    .sidebar-right {
        flex: 0 0 200px;
    }
}