/* ===============================================
   いいね機能 / ローディング
   =============================================== */
.mg-like-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  vertical-align: middle;
  font-size: 14px;
  color: #555;
}

.mg-loading-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ccc;
  border-top: 3px solid #f66;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.mg-loading-text {
  font-weight: normal;
}

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

/* ===============================================
   ガイド一覧ページ
   =============================================== */

/* 全体コンテナ */
.mg-list-container {
  background-color: #f9f9f9;
  padding: 1.5em;
  margin: 2em 0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-family: sans-serif;
}

/* ソート（並び替え）機能 */
.mg-sort-options {
  margin-bottom: 1.5em;
  text-align: right;
}

.mg-sort-select {
  padding: 0.5em 1em;
  font-size: 0.95em;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 0.5em center;
  background-size: 1.2em;
  padding-right: 2.5em;
}

/* 記事リスト */
.mg-list-items {
  display: grid;
  gap: 1em;
  min-height: auto;
}

/* 各記事アイテム */
.mg-item {
  background-color: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  padding: 1.2em 1.5em;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.mg-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* 記事タイトル */
.mg-item-title {
  font-size: 1.3em;
  font-weight: 600;
  margin: 0 0 0.5em;
}

.mg-item-title a {
  text-decoration: none;
  color: #222;
  transition: color 0.3s ease;
}

.mg-item-title a:hover {
  color: #0073aa;
}

/* 日付といいね！のメタ情報エリア */
.mg-item-meta {
  font-size: 0.9em;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 0.8em;
  margin-top: 0.8em;
}

/* いいね！部分 */
.mg-item-likes {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.mg-item-likes .mg-icon-heart {
  color: #e23;
  margin-right: 0;
}

/* 一覧ページの「いいね」各パーツのスタイル */
.mg-item-likes .like-word {
  color: #f17b53;
  font-weight: bold;
}
.mg-item-likes .like-stats {
  color: #333;
  font-weight: normal;
}
.mg-item-likes .mg-like-count {
  color: #f17b53;
  font-weight: bold;
}

/* ===============================================
   ガイド詳細ページ
   =============================================== */

/* PowerPoint表示エリア */
.mg-viewer-container {
  background-color: #ffffff;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  padding: 1.5em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 2em 0;
}

.mg-viewer-iframe-wrap {
  /* style intentionally left blank */
}

.mg-viewer-iframe {
  width: 100%;
  height: 700px;
  border: none;
}

/* いいねボタンのセクション */
.mg-like-section {
  text-align: center;
  margin-top: 1.5em;
  padding-top: 1.5em;
  border-top: 1px solid #f0f0f0;
}

/* ボタン全体のデフォルトの文字色を黒（#333）に設定 */
.mg-like-button {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6em;
  width: auto !important;
  max-width: 240px;
  font-size: 1rem !important;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.4em 1.2em !important;
  border-radius: 8px !important;
  background-color: #fff;
  border: 2px solid #f17b53;
  color: #333;
}

/* 「いいね」という文字をオレンジ色に上書き */
.mg-like-button .like-text {
  color: #f17b53;
}

/* 数字をオレンジ色に上書き */
.mg-like-button .mg-like-count {
  color: #f17b53;
  margin-right: 0.15em;
}

/* ホバー時は全ての文字を白に */
.mg-like-button:hover,
.mg-like-button:hover .like-text,
.mg-like-button:hover .mg-like-count {
  color: #fff;
  background-color: #f17b53;
}

/* ===============================================
   マイページ＞関心のあるガイド
   =============================================== */

.user-liked-mguides {
  margin-top: 1.5em;
}

.user-liked-mguides h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  padding-bottom: 0.6em;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #f17b53;
}

.user-liked-mguides .mguide-like-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #eee;
  border-radius: 8px;
}

.user-liked-mguides .mguide-like-item {
  border-bottom: 1px solid #eee;
}
.user-liked-mguides .mguide-like-item:last-child {
  border-bottom: none;
}

.user-liked-mguides .mguide-like-item a {
  display: block;
  padding: 1em 1.2em;
  text-decoration: none;
  color: #444;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.user-liked-mguides .mguide-like-item a:hover {
  background-color: #fdf8f5;
  color: #f17b53;
  padding-left: 1.5em;
}

/* ===============================================
   ページネーション
   =============================================== */

/* デフォルト（PC表示）では横並び */
.mg-pagination {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  gap: 0.8rem;
  margin-top: 2.5rem;
}

.mg-pagination button {
	width: auto;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 0.6em 1.2em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.mg-pagination button:hover:not(:disabled) {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
  transform: translateY(-2px);
}

.mg-pagination button:disabled {
  background-color: #f3f3f3;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
  box-shadow: none;
}

.mg-pagination .mg-page-info {
  font-weight: 500;
  color: #555;
  padding: 0.6em 1em; 
  border-radius: 6px;
  background: #e9ecef;
}

/* ===============================================
   レスポンシブ対応 (スマホ表示用)
   =============================================== */
@media screen and (max-width: 600px) {

  /* ページネーションを縦並びに変更 */
  .mg-pagination {
    flex-direction: column;
    gap: 1em;
    align-items: center;
  }

  .mg-pagination button,
  .mg-pagination .mg-page-info {
    width: 80%;
    max-width: 300px;
    justify-content: center;
  }

}

/* ===============================================
   その他（ウィジェットなど）
   =============================================== */

ul.mg-popular-guides {
    list-style: none;
    margin: 1em 0;
    padding: 0;
}
.mg-popular-guides li {
    padding: 6px 0;
    border-bottom: 1px dashed #ccc;
}
.mg-popular-guides a {
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.user-liked-mguides .highlighted{
  background-color: #e5ffcc;
}