.site-primary-header-wrap {
    max-width: 100%;
}

.site-content {
    align-self: center;
    max-width: 100%;
    width: 100%;
}

.ast-container {
    max-width: 100%;
    width: 100%;
    padding: 0px;
}

.left-sidebar {
    width: 9%;
    min-width: 160px;
    position: relative;
}

.right-sidebar {
    width: 9%;
    min-width: 160px;
    position: relative;
}

.site-main {
    width: 82%;
    padding-left: 30px;
    padding-right: 30px;
}

.entry-header {
    width: 100%;
    margin: 0px !important;
    text-align: center;
}

h1 {
    font-size: 34px !important;
    margin-bottom: 0px !important;
}

h1 span {
    display: block;
    font-size: 16px;
    line-height: 1.8;
    font-weight: normal;
    margin-bottom: 20px;
}

h2 {
    font-size: 22px !important;
    margin-bottom: 0px !important;
}

h3 {
    margin-bottom: 0px !important;
}

.entry-description {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.custom-breadcrumb {
    font-size: 15px;
    line-height: 1;
    margin-bottom: 5px !important;
}

.conversation-container {
    position: relative;
    padding: 50px 0px 100px 0px;
}

.conversation-form-background {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    background-color: #f8f9fa;
    z-index: -1;
}

.conversation-form-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 50vh;
    padding: 10px;
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.avatar-model-container {
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#avatar-canvas {
    display: none;
    height: 40vh;
}

.conversation-container.hide-avatar .avatar-model-container {
    display: none !important;
}

.conversation-container.hide-avatar .conversation-form-container {
    height: 80vh;
}

.conversation-output-container {
    height: 100%;
    overflow-y: auto;
    padding: 10px 10px 20px 10px;
}

.conversation-message {
   width: 100%;
   margin-bottom: 5px;
}

.conversation-message-content {
    display: inline-block;
    padding: 5px 10px 5px 10px;
    border-radius: 5px;
    color: white;
    line-height: 1.5;
    max-width: 70%;
    text-align: left; /* otherwise, the text in the user-generated message will be aligned to the right */
}

.conversation-message-content audio {
    display: none;
}

.conversation-message-audio-button, .conversation-message-audio-button:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 5px;
    margin-right: 2px;
}

.conversation-message-audio-button:hover {
    background-color: rgb(30, 30, 30);
}

.conversation-message-text {
    display: inline-block;
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 5px;
}

.conversation-message-ipa-transcription {
    font-size: 14px;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 5px;
}

.conversation-message-translated-response {
    font-size: 14px;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 7px;
}

.conversation-message.system-generated {
    text-align: left;
}

.conversation-message.system-generated .conversation-message-content {
    background-color: rgb(50, 50, 50);
}

.conversation-message.user-generated {
    text-align: right;
}

.conversation-message.user-generated .conversation-message-content {
    background-color: rgb(13, 29, 173);
}

.conversation-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid gray;
    border-radius: 10px;
    padding: 10px;
    background-color: rgb(255, 255, 255);
}

.conversation-input-container:hover, .conversation-input-container:focus {
    border: 1px solid black;
}

.conversation-input-container textarea {
    flex: 1;
    resize: none;
    font-size: 18px;
    color: black;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0px 5px;
    line-height: 1.5;
    max-height: 70px;
}

.conversation-input-container textarea:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.conversation-suggest-message-button, .conversation-suggest-message-button:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 26px;
    background-color: rgb(245, 135, 0);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    padding: 0px;
    border-radius: 50%;
}

.conversation-suggest-message-button:hover {
    background-color: rgb(255, 140, 0);
}

.conversation-suggest-message-button:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.conversation-submit-button, .conversation-submit-button:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 26px;
    background-color: rgb(0, 170, 20);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    padding: 0px;
    border-radius: 50%;
}

.conversation-submit-button:hover {
    background-color: rgb(0, 180, 20);
}

.conversation-submit-button:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.content-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 20px;
}

.content-wrapper {
    border: 1px solid rgb(235, 235, 235);
    border-radius: 20px;
    max-width: 768px;
}

.entry-content {
    width: 100%;
    padding: 20px 40px 20px 40px;
}

.comment-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgb(235, 235, 235);
}

.other-content-container {
    width: 100%;
    padding: 20px 40px 20px 40px;
}

.other-conversations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.other-conversations h2 {
    font-size: 24px;
    width: 100%;
}

.other-conversation {
    border: 1px solid lightgray;
    border-radius: 5px;
    width: calc((100% / 6) - (10px * 5 / 6));
    padding: 10px;
    text-align: center;
}

.other-conversation h3 {
    font-size: 18px;
}

.other-conversation .post-excerpt p {
    line-height: 1.5;
    font-size: 15px;
    margin-bottom: 0px;
}

.other-conversations-see-all {
    width: 100%;
    font-weight: bold;
    line-height: 1;
    font-size: 16px;
}

.spinner {
    display: block;
    width: 16px;
    height: 16px;
    border: 3px solid rgb(150, 150, 150);
    border-radius: 50%;
    border-top: 3px solid white;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.conversation-opening-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
    border-radius: 10px;
}

.conversation-start-button, .conversation-start-button:hover, .conversation-start-button:focus {
    background-color: rgb(0, 170, 20);
}

.conversation-tips-container {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 20px;
    text-align: center;
    font-style: italic;
}

.conversation-settings-container {
    display: none;
    margin-top: 30px;
    border: 1px solid lightgray;
    border-radius: 10px;
    padding: 10px;
    background-color: whitesmoke;
}

.conversation-settings-header {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 10px;
    text-align: center;
}

.conversation-settings-groups {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.conversation-settings-groups label {
    font-size: 14px;
    line-height: 1.5;
}

.conversation-settings-groups input {
    padding: 3px 5px;
    border: 1px solid lightgray;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    color: black;
    font-weight: 500;
    line-height: 1.5;
    height: unset !important;
    max-width: 200px;
}

.conversation-settings-groups select {
    padding: 4px 5px;
    border: 1px solid lightgray;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    color: black;
    font-weight: 500;
    line-height: 1.5;
    height: unset !important;
    max-width: 150px;
}

.conversation-settings-groups input[type="checkbox"] {
    margin-top: 5px;
    width: 18px !important;
    height: 18px !important;
}

.conversation-settings-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    border: 1px solid lightgray;
    border-radius: 5px;
    padding: 5px 10px;
    background-color: white;
}

.voice-dropdown-container {
    position: relative;
}

.voice-dropdown-toggle, .voice-dropdown-toggle:hover, .voice-dropdown-toggle:focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 10px;
    border: 1px solid lightgray;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    color: black;
    font-weight: 500;
    line-height: 1.5;
}

.voice-dropdown-text {
    flex: 1;
    text-align: left;
}

.voice-dropdown-arrow {
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.voice-dropdown-toggle.active .voice-dropdown-arrow {
    transform: rotate(180deg);
}

.voice-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 5px;
    z-index: 1000;
    max-height: 200px;
    width: fit-content;
    overflow-y: auto;
}

.voice-dropdown-menu.show {
    display: block;
}

.voice-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    gap: 5px;
    line-height: 1.5;
    white-space: nowrap;
}

.voice-dropdown-item:hover {
    background-color: lightgray;
}

.voice-dropdown-item.selected {
    background-color: #e3f2fd;
    color: #1976d2;
}

.voice-dropdown-item span {
    flex: 1;
    text-align: left;
}

.voice-play-button, .voice-play-button:hover, .voice-play-button:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    border: none;
    border-radius: 50%;
    background-color: black;
}

/* Visibility controls for IPA and translation */
.conversation-output-container.hide-ipa .conversation-message-ipa-transcription {
    display: none !important;
}

.conversation-output-container.hide-translation .conversation-message-translated-response {
    display: none !important;
}

@media (max-width: 1024px) {
    .left-sidebar, .right-sidebar {
        display: none;
    }

    .site-main {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .other-conversation {
        width: 100%;
    }
}