/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #fff7ed;
    /* Tailwind 'orange-50' for parchment feel */
    color: #292524;
    /* Tailwind 'stone-800' */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Serif font for headings */
h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
    font-family: 'Merriweather', serif;
}

/* Custom minimal form styles */
.form-input {
    background-color: transparent;
    border: 0;
    border-bottom: 2px solid #a8a29e;
    /* stone-400 */
    padding: 0.5rem 0;
    width: 100%;
    transition: border-color 0.2s;
    border-radius: 0;
    /* Ensures retro feel */
}

.form-input:focus {
    outline: none;
    border-color: #292524;
    /* stone-800 */
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23a8a29e' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Custom File Input */
.form-file-input {
    border: 2px dashed #a8a29e;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-file-input:hover {
    border-color: #292524;
    background-color: #f5f5f4;
    /* stone-100 */
}

.form-file-input span {
    color: #57534e;
    /* stone-600 */
    font-weight: 500;
}

.form-file-input.has-file {
    border-style: solid;
    border-color: #166534;
    /* green-800 */
    background-color: #f0fdf4;
    /* green-50 */
}

.form-file-input.has-file span {
    color: #166534;
    /* green-800 */
}

/* Navigation active state */
.nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #b91c1c;
    /* red-800 */
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Hide/Show utility */
.hidden {
    display: none;
}

/* "Cooler" Spinner/Loader */
.loader-text::after {
    content: "■";
    font-family: monospace;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Language Tag styles */
.lang-tag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: #e7e5e4;
    /* stone-200 */
    color: #292524;
    /* stone-800 */
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #d6d3d1;
    /* stone-300 */
}

.lang-tag-info {
    font-weight: 500;
}

.lang-tag-info strong {
    font-size: 1rem;
    color: #1c1917;
    /* stone-900 */
}

.lang-tag-remove {
    margin-left: 1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.25rem;
    color: #78716c;
    /* stone-500 */
}

.lang-tag-remove:hover {
    color: #b91c1c;
    /* red-800 */
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.modal-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #fff7ed;
    /* orange-50 */
    padding: 2rem;
    border: 2px solid #292524;
    /* stone-800 */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    max-width: 90%;
    width: 500px;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-backdrop.visible .modal-content {
    transform: scale(1);
}
