/*
 * =========================================
 * Generic Language Switcher Styles
 * =========================================
 */

/* --- Button Layout --- */
.lang-switcher-container {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.lang-switcher-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--sanei-accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.lang-switcher-btn:hover {
    opacity: 0.8;
}

/* --- Title Visibility --- */
body:not(.lang-en) .sub_title .lang-en {
    display: none;
}
body.lang-en .sub_title .lang-ja {
    display: none;
}
body.lang-en .sub_title .lang-en {
    display: inline;
}


/* --- Column Visibility Logic --- */

/* Hide the English column by default inside the designated area */
.lang-switch-area .wp-block-column.lang-en {
    display: none;
}

/* When the body has .lang-en, hide the Japanese column */
body.lang-en .lang-switch-area .wp-block-column.lang-ja {
    display: none;
}

/* When the body has .lang-en, show the English column and ensure it takes up full width */
body.lang-en .lang-switch-area .wp-block-column.lang-en {
    display: block;
    flex-basis: 100%;
    width: 100%;
}

/* Ensure the Japanese column takes up full width when it's visible */
.lang-switch-area .wp-block-column.lang-ja {
    flex-basis: 100%;
    width: 100%;
}


/* --- Content Styling --- */

/* H2 heading style for the switcher area */
.lang-switch-area .page-content .wp-block-heading:where(h2) {
    font-size: 2rem;
    font-weight: bold;
    color: var(--sanei-primary-text-color);
    text-shadow: 1px 1px 2px var(--sanei-secondary-color);
    padding-bottom: 0.5em;
    border-bottom: 3px solid var(--sanei-accent-color);
    margin-top: 2.5em;
    margin-bottom: 1em;
}

/* H3 heading style for the switcher area */
.lang-switch-area .page-content .wp-block-heading:where(h3) {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--sanei-primary-text-color);
    text-shadow: 1px 1px 2px var(--sanei-secondary-color);
    padding-left: 0.8em;
    border-left: 5px solid var(--sanei-accent-color);
    margin-top: 2em;
    margin-bottom: 0.8em;
}

/* Paragraph style for the switcher area */
.lang-switch-area .page-content p {
    line-height: 1.8;
    color: var(--sanei-primary-text-color);
    font-size: 1.1em;
    margin-bottom: 1.2em; /* Add some space between paragraphs */
}

/* Adjust spacing for the first heading */
.lang-switch-area .page-content .wp-block-heading:where(h2, h3):first-of-type {
    margin-top: 1em;
}