﻿.text-generator-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 0;
}

.text-header-container {
    text-align: center;
}

.text-content-container {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.monster-section-container {
    display: flex;
    flex-direction: column;

    margin: 1rem 1rem;
    align-items: center;
}
.monster-section-container .box label {
    display: block;
    margin-top: 0.5rem;
}
.monster-section-container fieldset {
    border: solid 1px #EAEAEA;
    border-radius: 5px;
    padding: 1rem;
}

.text-description-input {
    width: 100%;
    resize: vertical;
}

.text-add-container {
    display: flex;
    flex-direction: column;
}
.text-add-container button {
    margin-left: 1rem;
}

.t-a-container-row {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: flex-end;
}

.text-gen-result-container {
    text-align: center;
    box-sizing: border-box;
    overflow-x: auto;
}
.text-gen-result-container pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Weapon box identifier for JS event delegation */
.weapon-box {
    /* Inherits .box styles */
}

.dice-container {
    display: flex;
    align-items: center;
}

.dice-separator {
    padding: 0 0.25rem;
    font-weight: bold;
    color: #EAEAEA;
}

/* ========================== SPELLCASTING ========================== */

.sc-spell-group {
    margin-bottom: 1rem;
}

.sc-group-header {
    align-items: center;
    margin-bottom: 0.5rem;
}

.sc-remove-group-btn {
    width: auto;
    padding: 0.4rem 0.6rem;
    align-self: flex-end;
}

.sc-spell-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.sc-spell-entry {
    align-items: center;
    gap: 0.5rem;
}

.sc-spell-tag {
    flex: 1;
    background-color: #E8DAB2;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: #000;
}

.sc-remove-spell-btn {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.toggle-label {
    align-self: center;
    min-width: 3.5rem; /* prevents layout shift when text changes */
}

/* Smooth transition for additional effect fields */
#additional-effect-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#additional-effect-fields.visible {
    max-height: 500px; /* Set a value large enough to fit the content */
    opacity: 1;
}
