/* 全体設定 */
body {
  background-color: #f9f9f9;
  font-size: 13.3333px;
  font-family:'メイリオ', 'Meiryo','ＭＳ ゴシック','Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN W3',sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
  height: 100%;
  background-image: url('../images/bg/bg01.jpg');
  background-size: cover;  /* 画像を画面いっぱいに広げます */
  background-position: center; /* 画像の中央が画面の中央にくるようにします */
  background-attachment: fixed; /* スクロールしても背景は固定されます */
  background-color: rgba(255, 255, 255, 0.8); /* 背景の色を白と半透明にします */
  background-blend-mode: overlay; /* 画像と背景色を混合して表示します */
}

*, *::before, *::after {
  box-sizing: border-box;
}




/* コンテナ 全体----------------------------*/
.container {
  width: 95%; /* ウィンドウ幅の95%に設定 */
  max-width: 560px; /* 最大幅を560pxに設定 */
  margin: 0 auto;
  padding: 3px 15px 20px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
   background-color: #ffffff;
}

/* ヘッダー ----------------*/
.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 左寄せ */
.left-elements {
  display: flex; 
  align-items: center;
}






#header-logo {
  height: 16px; /* ロゴの高さ。適宜調整してください */
  margin-left: 10px; /* ロゴとプルダウンメニューとの間のスペース */
}

.header-section h1 {
  margin: 0; /* h1のデフォルトのマージンを取り除く */
  padding: 0; /* 必要に応じてh1のデフォルトのパディングも取り除く */
}
.header-section h1 a {
  display: inline-block;
  text-decoration: none;  /* 下線を削除 */
}



#categorySelect {
  font-size: 14px;
  padding: 8px;
}


/* 画像を追加ボタン */
.custom-file-upload {
  display: block; /* ここを変更 */
  position: relative;
  padding: 7px;
  margin: 8px 10px 8px 0;
  border: 1px solid #e1e1e3;
  border-radius: 8px;
  background-color: #f5f5f7;
  transition: background-color 0.3s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
  text-align: left; /* 左寄せを追加 */
}
.custom-file-upload input[type="file"] {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;  /* inputを透明に */
  cursor: pointer;  /* カーソルをポインターに変更 */
}
.custom-file-upload:hover {
  background-color: #e1e1e3;
}
.custom-file-upload:active {
  background-color: #d1d1d3;
}





/* ランダムボタン----------------------------- */
.random-button {
  display: block;
  position: relative;
  padding: 7px;
  margin: 8px 10px 8px 0;
  border: none; /* 枠線を削除 */
  border-radius: 8px;
  background-color: #4572f3; /* ボタンの背景色を設定 */
  color: #fff; /* テキストの色を白に設定 */
  font-weight: 600; /* フォントの太さを少し強調 */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
  text-align: center; /* テキストを中央に配置 */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 影を追加 */
}

.random-button:hover {
  background-color: #305cbf; /* ホバー時の背景色を少し濃く */
}

.random-button:active {
  background-color: #2a54af; /* クリック時の背景色をさらに濃く */
}









/* 共通要素スタイル */
.button-style, button, select, input[type="text"], .label, .color-label {
  padding: 12px;
  margin: 8px 10px 8px 0;
  height: auto;
  border: 1px solid #e1e1e3;
  border-radius: 8px;
  background-color: #f5f5f7;
  transition: background-color 0.3s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}


.button-style:last-child, button:last-child, select:last-child, input[type="text"]:last-child, label:last-child {
  margin-right: 0;
}



/* SP:ウィンドウ幅が560px未満の場合 */
@media (max-width: 560px) {
  .container {
    width: 96%; /* ウィンドウ幅の95%に設定 */
    padding: 3px 8px 20px;
  }
  .centered-flex-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin: 0;
  }
  
  #categorySelect {
    font-size: 11px !important;
    padding: 5px !important;
  }


  .icon-button {
    width: 65px !important;
    height: 65px !important;
    margin: 2px !important;
  }

  .color-picker-overlay{
    width: 65px !important;
    height: 65px !important;
    margin: 2px !important;
  }

  .icon-button img {
    width: 42px !important;
    height: 42px !important;
    margin: 2px !important;
  }

  /* 画像を追加ボタン */
.custom-file-upload {
  padding: 4px;
  font-size: 11px;
  margin: 8px 10px 8px 0;
  }

  /* ランダムボタン */
  .random-button {
    padding: 4px;
    font-size: 11px;
    margin: 8px 10px 8px 0;
    }
}


/* フッター */
.footer-container {
  display: flex;
  justify-content: center;
  gap: 20px; /* 2つの<p>タグの間隔を調整します。必要に応じて変更してください。 */
}

.footer-link {
  color: #585858;
}




.color-picker-container {
  position: relative; /* 親要素に対して position を設定 */
  display: inline-block;
}

.color-picker-overlay {
  width: 98px;
height: 70px;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
  opacity: 0;
}



/* キャンバスラッパー */
#canvasWrapper {
  font-family: "M PLUS Rounded 1c", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  width: 100%; /* ウィンドウ幅の95%に設定 */
  max-width: 560px; /* 最大幅を560pxに設定 */
  overflow: hidden;
  margin: 10px 0;
}
/* キャンバスコンテナ */
#canvasContainer {
  overflow: scroll;
  width: 100%;
  height: 100vh;
  border-radius: 8px;
}
/* キャンバス */
#memeCanvas {
  margin: 0;
  border: 4px solid #000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  width: 100%;
  height: 100%;
}




/* 吹き出しセレクトボックス */
select[id="svgSelect"], select[id="fontSelect"] {
  width: auto;
}

/* ホバースタイル */
.button-style:hover, button:hover {
  background-color: #e1e1e3;
}

.button-style:active, button:active {
  background-color: #d1d1d3;
}


/* イメージリスト */
/* Chrome用のスクロールバーのカスタマイズ */
#imageList {
  max-height: 70px;
  overflow-x: auto; /* 横スクロールバーを表示する */
  overflow-y: hidden; /* 縦スクロールを無効にする */
  white-space: nowrap;
  padding: 0;
  border: 4px solid #000;
  border-radius: 8px;
  background-color: #000000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 0;
}

/* スクロールバーのカスタマイズ */
#imageList::-webkit-scrollbar {
  height: 10px;
}

/* スクロールバーのスライダー（ボタンをドラッグする部分） */
#imageList::-webkit-scrollbar-thumb {
  background-color: #888888;
  border-radius: 4px;
}

/* スクロールバーのボタン部分（上下や左右の矢印） */
#imageList::-webkit-scrollbar-button {
  display: none;
}

/* スクロールバーのトラック（スライダーが動く領域） */
#imageList::-webkit-scrollbar-track {
  background-color: #555555;
}






/* 特別なボタン */
.special-btn {
  background-color: #007BFF;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  transition: background-color 0.3s ease-in-out;
}

.special-btn:hover {
  background-color: #0056b3;
}








/* カラーピッカー */
.color-picker-overlay {
  width: 98px;
  height: 70px;
  position: absolute;
  top: 5px;
  left: 5px;
  cursor: pointer;
  opacity: 0;
}


.icon-button {
  cursor: pointer;
  padding: 0;
  margin: 4PX 4PX;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 98px;
  height: 70px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background-color: #f5f5f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.icon-button img {
  width: 48px;
  height: 48px;
  margin: 0px;
  padding: 0px;
}


/* フォント */
#fontDropdown {
  max-height: 420px; /* 吹き出しリストの最大高さを設定 */
  width: 150px;
  right: 0px; /* 初期値の位置調整解除 */
  overflow-y: auto; /* 吹き出しリストがはみ出る場合にスクロールを有効にする */
  position: absolute;
  background-color: #ffffff;
  border: 1px solid #e1e1e3;
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  bottom: 100%; /* ボタンの上に配置 */
}

/* 共通 */
#svgDropdown ul, #fontDropdown ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#svgDropdown li, #fontDropdown li {
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    border-bottom: 1px solid #e1e1e3;
}

#svgDropdown li:last-child, #fontDropdown li:last-child {
    border-bottom: none;
}

#svgDropdown li:hover, #fontDropdown li:hover {
    background-color: #f5f5f7;
}

.dropdown-header {
    padding: 6px 8px;
    background-color: #e1e1e3;
    border-radius: 4px 4px 0 0;
    font-weight: bold;
    text-align: center;
}


.centered-flex-container {
  display: flex;
  align-items: center;
  margin: 0;
}

.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button.disabled img {
  filter: grayscale(100%);
  opacity: 0.5;
}








.icon-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background-color: #f5f5f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.icon-container.mobile {
  width: 53px;
  height: 53px;
}

.icon {
  font-size: 23px;
  line-height: 1;
  margin-bottom: 2px;
  color: #555;
}

.text {
  font-size: 10px;
  color: #888;
}


/* 画像を追加のテキスト */
.add-image-option {
  font-weight: bold;
  font-size: 18px;
  color: #FF5733; /* メタファーの色に合わせて変更 */
}

/* グレーアウト */
button:disabled {
  opacity: 0.5; 
  pointer-events: none;
}
button:disabled img {
  filter: brightness(0);
  opacity: 0.5;
}


/* モーダルのスタイリング */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);  /* 透明度を0.7に調整 */
}

.modal-content {
  background-color: #ffffff;
  margin: 5% auto; /* 上下5%の余白を持ち、左右は自動で中央寄せに */
  padding: 20px;
  width: 90%;  /* モーダルの幅を90%に調整 */
  max-width: 600px;  /* 最大幅を600pxに設定 */
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  overflow: auto;  /* コンテンツが多い場合のスクロールを可能に */
}
.modal-content h2{
  margin: 25px 0px 0px; /* 上下5%の余白を持ち、左右は自動で中央寄せに */
}


.closeBtn {
  color: #aaaaaa;
  float: right;
  font-size: 40px;  /* ボタンのサイズを40pxに変更 */
  font-weight: bold;
  cursor: pointer;
  margin: -25px -8px 0 0;  /* ボタンが大きくなると、余白が必要な場合があるため調整 */

}

.closeBtn:hover,
.closeBtn:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}







/* ドロップダウンメニュー */
#addSVG {
  position: relative;
}

/* リストメニュー */
/* 吹き出し */
#svgDropdown {
  max-height: 420px; /* 吹き出しリストの最大高さを設定 */
  width: 130px;
  left: 60px; /* 画面左端から5pxの位置に配置 */
  overflow-y: auto; /* 吹き出しリストがはみ出る場合にスクロールを有効にする */
  position: absolute;
  background-color: #ffffff;
  border: 1px solid #e1e1e3;
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  bottom: 100%; /* ボタンの上に配置 */
  transform: translateX(-50%); /* ドロップダウンの中心をボタンの中心と合わせる */
}

#svgDropdown .shape-list {
  list-style-type: none; /* リストマーカーを削除 */
  padding: 0;            /* パディングを削除 */
  display: flex;         /* フレックスボックスを使用して項目を並べる */
  flex-direction: column; /* リスト項目を縦に並べる */
  gap: 10px;             /* 項目間のギャップを設定 */
}

#svgDropdown .shape-list li {
  display: inline-block; /* 画像をインラインブロックとして表示 */
}


#svgDropdown .shape-list img {
  max-height: 30px;
  width: auto;    /* 幅を自動に設定して縦横比を維持する */
  display: block; /* imgをブロック要素として表示 */
  margin-left: auto;
  margin-right: auto;
}



