#adventurebook_page {
    margin: 0;
    padding: 0;
    border: none;
    width: 100%;
    min-height:400px;
    position: relative;
    text-align: left;
}

.adventurebook_character_overview
{
    text-align: left;
}

.adventurebook_character_overview_name {
    font-weight: bold;
    font-size: medium;
}

.adventurebook_character_actions {
    margin: 4px;
}


#adventurebook_content {
    container-type: inline-size;
}


#adventurebook_character {
    display: block;
    float: right;
    border: 1px solid #444444;
    border-radius: 8px;
    min-width: 200px;
    max-width: 200px;
}

#adventurebook_character_topbar {
    display: none;
}

/* Ab 400px oder weniger: Container weg, Top-Bar fixiert sichtbar */
@container (max-width: 700px) {
    #adventurebook_character {
        display: none;
    }

    #adventurebook_character_topbar {
        display: block;
        bottom: 100%; /* oberhalb des Elements */
        left: 0;
        width: 100%;
        background: #eee;
        color: #000;
        padding: 0;
        font-size: 14px;
        text-align: center;
        cursor: pointer;
    }
}

#adventurebook_character_details {
    background: #eee;
    overflow: auto;
    padding: 4px;
}

/* Gutenberg-Galerie (Block) */
#adventurebook_content .wp-block-gallery .blocks-gallery-grid,
#adventurebook_content .wp-block-gallery.is-layout-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--wp--style--block-gap, .5rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Klassische Shortcode-Galerie */
#adventurebook_content .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
#adventurebook_content .gallery .gallery-item {
    /* Fallback: 3 Spalten, wird vom class "gallery-columns-N" normalerweise gesetzt */
    width: calc(33.333% - .5rem);
}
#adventurebook_content .gallery.gallery-columns-2 .gallery-item { width: calc(50% - .5rem); }
#adventurebook_content .gallery.gallery-columns-3 .gallery-item { width: calc(33.333% - .5rem); }
#adventurebook_content .gallery.gallery-columns-4 .gallery-item { width: calc(25% - .5rem); }
#adventurebook_content .gallery .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}


#adventurebook_content ul {
    margin: 0px;
}

.adventurebook-inner-content {
    overflow:hidden;
}

.adventurebook-inner-content p {
    padding:0;
    margin:0;
}


.adventurebook-shop-content {
    clear: both;
    overflow: auto;
}

.adventurebook_hidden {
    display: none;
}

/* class for <ul> item lists */
.adventurebook_items {
    list-style-type: none;
    margin: 0;
    padding-bottom: 4px;
    padding-top: 4px;
    clear: both;
    overflow: auto;
    text-align: left;
}

.adventurebook_items li {
    margin-left: 0;
    padding-bottom: 2px;
}

.adventurebook_shop_items li {
    padding-bottom: 2px;
    border-bottom: 1px solid #cccccc;
    margin-left: 0;
}

.adventurebook_equipped_slotname {
    font-weight: bold;
    margin-left: 8px;
    cursor: pointer;
}

.adventurebook_equipped_itemname {
    cursor: pointer;
}

.adventurebook_float_right {
    float: right;
    margin-right: 8px;
}

.adventurebook-decisions {
    list-style-type: none;
    margin: 0;
    padding: 0;
    clear: both;
    overflow: auto;
}

.adventurebook-decisions ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.adventurebook-decisions li {
    margin-bottom: 4px;
    padding: 0;
}

.adventurebook-decision-option {
    margin: 2px;
    padding: 2px;
}


.adventurebook_small {
    clear: both;
    display: block;
    font-size: small;
    line-height: 1.0em;
    vertical-align: top;
}

.adventurebook_inner_content {
    margin: 0;
    padding: 0;
}

.adventurebook_inner_content p {
    margin-bottom: 4px;
}


.adventurebook_inner_content p::first-letter {
    font-size: 3em;
    float: left;
    line-height: 1;
    margin-right: 0.1em;
    font-weight: bold;
}

.adventurebook_enemies {
    clear: both;
    overflow: auto;
}

.adventurebook_enemy {
    font-weight: bold;
}

.adventurebook_enemy_image {
    float: left;
}

.adventurebook_enemy_name {
    font-weight: bold;
    font-size: large;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
}


.adventurebook_enemy_description {
    font-size: small;
    color: #555555;
    margin-left:34px;
    text-align: left;
}

.adventurebook_item_list_small {
    width: 50%;
    float: left;
    text-align: left;
}

.adventurebook_item_list_small li {
    list-style-type: none;
}

.adventurebook_item_actions {
    text-align: left;
    margin-left:34px;
}

.adventurebook_item {
    clear: both;
}

.adventurebook_item_info {
    margin-left:4px;
    border-left: 1px solid #444444;
    padding-left: 4px;
}

.adventurebook_item_image {
    float: left;
    margin-top:8px;
}

.adventurebook_item_image img {
    width: 32px;
    height: 32px;
    vertical-align:middle;
    margin-right:4px;
}

.adventurebook_item_name {
    font-size: medium;
    text-align: left;
    font-weight: bold;
    overflow: hidden;
    cursor: pointer;
}

.adventurebook_item_toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    line-height: 1;
    margin-left: 6px;
    padding: 0;
}

.adventurebook_combat_stats {
    margin: 0;
    padding: 0;
}

/* the toggle needs to be at the right side of the item name */
#adventurebook_toggle_character_details {
    float: right;
    margin-right: 4px;
    margin-top: 4px;
    font-size: small;
}

.adventurebook_item_stats {
    font-size: small;
    color: #333333;
    margin-left:34px;
    text-align: left;
}

.adventurebook_item_description {
    font-size: small;
    color: #555555;
    margin-left:34px;
    text-align: left;
}

#adventurebook_character_title {
    margin-top: 8px;
    margin-bottom: 8px;
}

#adventurebook_character_title_topbar {
    margin: 0;
}

.adventurebook_items {
    font-size: small;
}

.adventurebook_items_list {
    width: 100%;
}

.adventurebook_items_list ul
{
    margin: 0;
    padding: 0;
}

.adventurebook_items_list_title {
    border-top: 1px solid #444444;
    border-bottom: 1px solid #444444;
    font-weight: bold;
    font-size: medium;
}

#adventurebook_combat_log {
    margin-top: 8px;
    clear: both;
}

.adventurebook_combat_log_important {
    color: red;
}

.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
}

.adventurebook_action_button_small {
    cursor: pointer;
    border: 1px solid #AAAAAA;
    background-color: #EEEEEE;
    color: black;
    border-radius: 4px;
    padding: 2px;
    text-decoration: none!important;
    font-size: 12px;
}

.adventurebook_action_button
{
    cursor: pointer;
    border: 1px solid #AAAAAA;
    background-color: #EEEEEE;
    color: black;
    border-radius: 4px;
    padding: 4px;
    text-decoration: none!important;
    font-size: small;
}


.adventurebook_script_action_button
{
    cursor: pointer;
    border: 1px solid #AAAAAA;
    background-color: #EEEEEE;
    color: black;
    border-radius: 4px;
    padding: 4px;
    margin-top:4px;
    text-decoration: none!important;
    font-size: small;
}

.adventurebook_action_button:hover
{
    color: red;
}

.adventurebook_error {
    color: red;
    font-weight: bold;
    text-align: center;
}

.adventurebook_message {
    color: green;
    font-weight: bold;
    text-align: center;
}

.adventurebook_script_output {
    margin: 0;
    color: #555555;
}

.adventurebook_script_output_line {

}

#adventurebook_fixed_height_container {
    overflow-y: scroll;
}

#adventurebook_container {
    position: relative;
    border: 0;

    /* Scrollbars ausblenden */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge Legacy */
}
#adventurebook_container::-webkit-scrollbar {
    display: none;               /* Chrome, Safari, Edge */
}

#adventurebook_scroll_indicator {
    position: absolute;
    text-align: center;
    font-size: 14px;
    color: #000066;
    display: none;               /* standardmäßig versteckt */
    animation: adventurebook_bounce 1s infinite;
}

/* kleine Animation */
@keyframes adventurebook_bounce {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}


@media (max-width: 600px) {
    #adventurebook_container {
        flex-direction: column;
    }
}

#adventurebook_container img {
    width: 200px;
    max-width: 200px;
    height: 200px;
    float:left;
    margin-right: 8px;
    margin-bottom: 16px;
    margin-top: 4px;
}
/* ab hier die Überschreibung für schmale Screens */
@container (max-width: 600px) {
    #adventurebook_container img {
        width: 100px;
        max-width: 100px;
        height: 100px;
    }
}

#adventurebook_container div {
    margin: 0;
}

.adventurebook_footer {
    clear: both;
    text-align: center;
    border-top: 1px solid #444444;
    font-size: small;
}
#adventurebook_page_title {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

#adventurebook_play_audio {
    min-width: 130px;
    min-height: 32px;
    display: inline-block;
    vertical-align: middle;
    padding: 5px 12px;
    font-size: 15px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #f4f4f4;
    color: #222;
    cursor: pointer;
}
#adventurebook_play_audio.playing {
    background: #357a38;
    color: #fff;
    border-color: #2e6930;
}

#adventurebook_content .adventurebook_decision_button {
    display: block;
    margin: 4px 0;
    padding: 6px 10px;
    cursor: pointer;
}

#adventurebook_content .decision_number {
    font-weight: bold;
    color: #888;
    margin-right: 4px;
}

