/**
 * お知らせページ（/news/）専用
 * モーダルは viewport 固定（inset 非対応ブラウザ向けに top/left/right/bottom 併記）
 */

/* ===== お知らせカード（一覧） ===== */
.content-item.gm-news-card {
  flex-direction: column;
  align-items: stretch;
}

.gm-news-excerpt {
  margin: 0 0 12px 0;
  padding-left: 30px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.gm-news-card-actions {
  padding-left: 30px;
  margin-top: 4px;
}

.gm-news-open-detail {
  font-size: 14px;
}

/* ===== お知らせ詳細モーダル（全画面オーバーレイ） ===== */
#gm-news-modal-overlay.gm-news-modal-overlay {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 16px;
  box-sizing: border-box;
  z-index: 2147483000;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#gm-news-modal-overlay.gm-news-modal-overlay.is-open {
  display: flex !important;
}

.gm-news-modal-overlay .gm-news-modal {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.gm-news-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}

.gm-news-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  flex: 1;
}

.gm-news-modal-close {
  border: none;
  background: #f1f1f1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #555;
  flex-shrink: 0;
}

.gm-news-modal-close:hover {
  background: #e5e5e5;
}

.gm-news-modal-meta {
  margin: 0;
  padding: 8px 18px 0;
  font-size: 13px;
  color: #666;
}

.gm-news-modal-body {
  padding: 14px 18px 20px;
  overflow-y: auto;
  font-size: 15px;
  color: #333;
  line-height: 1.65;
}

.gm-news-modal-body.markdown-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

.gm-news-modal-body.markdown-content img {
  max-width: 100%;
  height: auto;
}

.gm-news-modal-body.markdown-content h1,
.gm-news-modal-body.markdown-content h2,
.gm-news-modal-body.markdown-content h3 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.gm-news-modal-body.markdown-content ul,
.gm-news-modal-body.markdown-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.gm-news-modal-body.markdown-content pre {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9em;
}

.gm-news-modal-body.markdown-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .gm-news-excerpt,
  .gm-news-card-actions {
    padding-left: 0;
  }
}
