body {
	/*padding-top: 16px;*/
  font-family: "游ゴシック Medium", "Yu Gothic Medium", "游ゴシック体", "YuGothic", "メイリオ", Meiryo, sans-serif;
    overflow-y: hidden;
}


/* buttonにもbodyのフォントを適用する */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  font-family: inherit; /* 親要素のフォントを継承する */
}

a {
	text-decoration: none;
}

.hide {
	display: none !important;
}

h1 {
  font-size: 23px;
	font-weight: bold;
}

/* チャットウインドウのアニメーション用スタイル */
#chat-container {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    border: 2px solid #4A90E2 !important;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

#chat-container.chat-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#chat-container.chat-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* チャットトグルボタンのスタイル（アニメーション追加） */
#chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    background: white;
    /*border: 2px solid #007bff;*/
		border: 2px solid #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
}

#chat-toggle-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

/* ボタンが下に隠れるアニメーション */
#chat-toggle-btn.btn-hiding {
    transform: translateY(120px);
    opacity: 0;
}

/* ボタンが上に表示されるアニメーション */
#chat-toggle-btn.btn-showing {
    transform: translateY(0);
    opacity: 1;
}

#chat-toggle-btn svg {
    transition: transform 0.3s ease;
}

#chat-toggle-btn:hover svg {
    transform: scale(1.1);
}

/* 未読メッセージバッジのスタイル */
.chat-unread-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
/* チャットメッセージ表示エリアのpadding */
#chat-messages {
    padding: 12px;
}

/* チャットウインドウ内のメッセージバッジスタイル */
#chat-container .badge.bg-secondary,
#chat-container .badge.bg-primary,
#chat-container .badge.bg-info {
    font-size: 14px;
    padding: 8px 12px;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    display: inline-block;
    text-align: left;
    line-height: 125%;
}

/* チャットメッセージ全体を左寄せ */
#chat-messages .mb-2 {
    text-align: left;
}

/* 送信メッセージは右寄せを維持 */
#chat-messages .mb-2.text-end {
    text-align: right;
}

/* チャットメッセージエリアの横スクロール防止 */
#chat-messages {
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* チャットウインドウのスタイル ここまで */

/* チャット入力フィールドのスタイル */
#chat-input {
    padding: 6px 12px !important;
    line-height: 19px !important;
    height: 43px !important;
    resize: none !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    vertical-align: top !important;
    font-family: inherit !important;
}

/* placeholderテキストの位置を固定 */
#chat-input::placeholder {
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: top !important;
    line-height: 19px !important;
    color: #6c757d;
    font-family: inherit !important;
    position: relative;
    top: 0 !important;
}

/* フォーカス時もplaceholderの位置を維持 */
#chat-input:focus::placeholder {
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: top !important;
    line-height: 19px !important;
    position: relative;
    top: 0 !important;
}

/* textareaの高さが変わってもplaceholderの位置を維持 */
#chat-input[style*="height"]::placeholder {
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: top !important;
    line-height: 19px !important;
    position: relative;
    top: 0 !important;
}

/* 音量やビデオマイク選択 */
/* デバイス選択モーダル用のスタイル */
.device-preview-container {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #000;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-preview {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.audio-level-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f8f9fa;
}

.audio-level-label {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.audio-level-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.audio-level-fill {
    height: 100%;
    background: #ffc107;
    transition: width 0.1s ease;
    border-radius: 10px;
}

/* モーダルのスタイル調整 */
.modal-lg {
    max-width: 800px;
}

/* デバイス選択関連のレスポンシブ対応 */
@media (max-width: 768px) {
    .device-preview-container {
        height: 150px;
    }
    
    .modal-lg {
        max-width: 95%;
        margin: 10px auto;
    }
}



.z-2 {
	z-index: 2000;
}

.rounded {
	border-radius: 0px;
}

.centered {
	display: block;
	margin: auto;
}

.relative {
	position: relative;
}

.top-left {
	position: absolute;
	top: 0px;
	left: 0px;
}

.top-right {
	position: absolute;
	top: 0px;
	right: 0px;
}

.bottom-left {
	position: absolute;
	bottom: 0px;
	left: 0px;
}

.bottom-right {
	position: absolute;
	bottom: 0px;
	right: 0px;
}

.navbar-brand {
	margin-left: 0px !important;
}

.navbar {
	-webkit-box-shadow: 0px 3px 5px rgba(100, 100, 100, 0.49);
	-moz-box-shadow:    0px 3px 5px rgba(100, 100, 100, 0.49);
	box-shadow:         0px 3px 5px rgba(100, 100, 100, 0.49);
}

.navbar-header {
	padding-left: 40px;
}

.btn-group-xs > .btn, .btn-xs {
	padding: 1px 5px;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 3px;
}

.divider {
	width: 100%;
	text-align: center;
}

.divider hr {
	margin-left: auto;
	margin-right: auto;
	width: 45%;
}

.fa-2 {
	font-size: 2em !important;
}
.fa-3 {
	font-size: 4em !important;
}
.fa-4 {
	font-size: 7em !important;
}
.fa-xl {
	font-size: 12em !important;
}
.fa-6 {
	font-size: 20em !important;
}

div.no-video-container {
	position: relative;
}

.no-video-icon {
    width: 100%;
    height: auto;
    text-align: center;
    padding-top: 2rem !important;
    font-size: 2.5em !important; /* アイコンサイズを小さく */
}

.no-video-text {
    text-align: center;
    position: absolute;
    bottom: 10px;
    right: 0px;
    left: 0px;
    font-size: 14px; /* テキストサイズを小さく */
    color: #666; /* 少し薄い色に */
}

div.no-video-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f5f5f5; /* 背景色を追加 */
}

.meetecho-logo {
	padding: 12px !important;
}

.meetecho-logo > img {
	height: 26px;
}

pre {
	white-space: pre-wrap;
	white-space: -moz-pre-wrap;
	white-space: -pre-wrap;
	white-space: -o-pre-wrap;
	word-wrap: break-word;
	background-color: #f5f5f5;
}

.bg-gray {
	background-color: #f5f5f5;
}

.januscon {
	font-weight: bold;
	animation: pulsating 1s infinite;
}
@keyframes pulsating {
	30% {
		color: #FFD700;
	}
}

.device-preview-container {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #000;
    min-height: 200px; /* プレビューの最小高さを確保 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; 
}

.device-preview {
    max-width: 100%;
    max-height: 100%; /* コンテナの高さに合わせる */
    width: auto; 
    height: auto; 
    display: block; /* 中央揃えのため */
    margin: auto; /* 中央揃えのため */
}

#canvasPreview {
    display: none; /* JSで制御される */
}

.modal-content {
  padding: 15px;
}

.remotevideocard {
  padding: 0;
  margin: 0;
  width: 280px;
  flex: 0 0 280px; /* Bootstrapのflexboxの挙動を考慮 */
  max-width: 280px; /* Bootstrapのflexboxの挙動を考慮 */
}

[id^="videoremote"] {
  width: 100%; /* 親要素である .remotevideocard の幅に合わせる */
  /* 必要に応じて高さを指定してください */
  height: 158px;/* 例: 高さを180pxに固定する場合 */
  padding :0;
  margin: 0;
}

[id^="videoremote"] video {
  object-fit: cover; /* またはcontain */
}

.card-body{
    padding: 0;
    margin: 0;
}

.translation-text-span{
  text-shadow: 
    -1px -1px 0 white,
    1px -1px 0 white,
    -1px 1px 0 white,
    1px 1px 0 white;
}

.d-none{
    display:none;
}

/* #videos コンテナ内の要素を中央揃えにする */
#videos.container {
    display: flex;
    justify-content: center; /* 水平方向中央揃え */
    flex-wrap: wrap; /* アイテムがコンテナ幅を超える場合に折り返す */
    gap: 0; /* アイテム間の隙間を削除 */
    padding: 0; /* コンテナのパディングを削除 */
    margin: 0 auto; /* 中央揃えを維持 */
}

/* 画面共有プレビュー用のスタイル */
#screen-preview-container {
    position: fixed;
    left: 10px;
    bottom: 150px; /* ローカルビデオの上に配置 */
    z-index: 999;
    width: 240px;
    height: 135px;
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#screen-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

#screen-preview-container::before {
    content: "画面共有中";
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 1001;
    pointer-events: none;
}

/* 画面共有ボタンが有効な状態での色変更 */
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #screen-preview-container {
        width: 180px;
        height: 101px;
        bottom: 120px;
    }
}

@media (max-width: 480px) {
    #screen-preview-container {
        width: 150px;
        height: 84px;
        bottom: 100px;
        left: 5px;
    }
}

/* 翻訳待機中のアニメーション */
.loading-dots {
    display: inline-block;
    margin-left: 5px;
    color: #555588;
}

.loading-dots span {
    animation: blink 1.4s infinite both;
    font-weight: bold;
    font-size: 16px;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

/* 画面共有モード用のスタイル */
body.screen-sharing-mode {
    overflow: hidden;
}

/* 画面共有時のリモートビデオコンテナ */
#videos.screen-sharing-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 79px !important;
    z-index: 1001 !important;
    margin-top: 3px !important;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    transition: all 0.5s ease-in-out;
}

/* 画面共有時のリモートビデオカード */
.remotevideocard.screen-sharing {
    width: 140px !important;
    height: 79px !important;
    flex: 0 0 140px !important;
    max-width: 140px !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.5s ease-in-out;
}

.remotevideocard.screen-sharing .card {
    height: 100% !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.remotevideocard.screen-sharing .card-body {
    height: 100% !important;
    padding: 0 !important;
}

.remotevideocard.screen-sharing [id^="videoremote"] {
    width: 100% !important;
    height: 100% !important;
}

.remotevideocard.screen-sharing video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 画面共有時のローカルビデオ */
.videolocal-wrapper.screen-sharing {
    position: fixed !important;
    left: 10px !important;
    bottom: 10px !important;
    width: 120px !important;
    height: 90px !important;
    z-index: 1002 !important;
    transition: all 0.5s ease-in-out;
}

.videolocal-wrapper.screen-sharing .card {
    height: 100% !important;
}

.videolocal-wrapper.screen-sharing .card-body {
    height: 100% !important;
    padding: 0 !important;
}

.videolocal-wrapper.screen-sharing video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 画面共有コンテナの調整 */
#screen-share-container.fullscreen-mode {
    position: fixed !important;
    top: 79px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    z-index: 1000 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    box-shadow: none !important;
    transition: all 0.5s ease-in-out;
}

#screen-share-container.fullscreen-mode video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* 画面共有時のバッジ表示 */
.remotevideocard.screen-sharing .badge {
    font-size: 10px !important;
    padding: 2px 4px !important;
}

/* アニメーション用のトランジション */
.remotevideocard {
    transition: all 0.5s ease-in-out;
}

/* 画面共有モード時は透明度を変更しない */
body.screen-sharing-mode #videos {
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.screen-sharing-mode #screen-share-container {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 字幕ON/OFFバッジのスタイル */
.subtitle-toggle-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    user-select: none;
}

.subtitle-toggle-badge:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.subtitle-toggle-badge.subtitle-on {
    background-color: rgba(0, 123, 255, 0.8);
}

.subtitle-toggle-badge.subtitle-on:hover {
    background-color: rgba(0, 123, 255, 1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #videos.screen-sharing-mode {
        height: 56px !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
    }
    
    .remotevideocard.screen-sharing {
        width: 100px !important;
        height: 56px !important;
        flex: 0 0 100px !important;
        max-width: 100px !important;
    }
    
    .videolocal-wrapper.screen-sharing {
        width: 100px !important;
        height: 75px !important;
    }
    
    #screen-share-container.fullscreen-mode {
        top: 56px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .subtitle-toggle-badge {
        font-size: 10px;
        padding: 3px 6px;
        top: 6px;
        right: 6px;
    }
}

/* ログインページ */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.login-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /*background-color: #f8f9fa;*/
}

.login-form-content {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.login-form-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.error-message {
    color: #e53e3e;
    background-color: #fed7d7;
    border: 1px solid #f56565;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-group {
    /*margin-bottom: 1.5rem;*/
    margin-bottom: 0.7rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.login-button {
    width: 100%;
    padding: 0.85rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.login-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.login-image-wrapper {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ローカルビデオのビデオOFFコンテナ */
#videolocal .video-off-container {
    background-color: rgba(0, 0, 0, 0.8);
}

#videolocal .video-off-container button {
    font-size: 16px;
    padding: 10px 20px;
}

/* ローカルビデオコンテナの高さを固定 */
#videolocal {
    position: relative;
    overflow: hidden;
}