/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* スティッキーフッター: コンテンツが少なくてもフッターを画面下部に配置 */
.with-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* 動的ビューポート対応（モバイルブラウザのアドレスバー考慮） */
}

.with-footer > .site-footer {
  margin-top: auto;
  flex-shrink: 0; /* フッターが縮まないようにする */
}

/* サイトフッター */
.site-footer {
  background-color: #f7f7f7;
  border-top: 1px solid #dddfe2;
  padding: 15px 20px;
  text-align: center;
  font-family: var(--font-family-base);
  font-size: 13px;
  color: #606770;
  height: 50px; /* フッターの高さを固定（layout.cssの計算で使用） */
  box-sizing: border-box;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-separator {
  color: #ccd0d5;
}

.footer-link {
  color: #606770;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* スマホでフッターを非表示にするクラス */
@media (max-width: 768px) {
  body.hide-footer-mobile .site-footer {
    display: none;
  }
}

/* ==============================================================================
   潮の説明モーダル（共通）
   ============================================================================== */
.tide-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}

/* 統合表示用：tide-item内では縦並び */
.tide-item .tide-trigger {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tide-trigger:hover {
  opacity: 0.7;
}

.tide-trigger svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tide-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.tide-modal-overlay.hidden {
  display: none;
}

.tide-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  margin: auto;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tide-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tide-modal-close:hover {
  background: #e0e0e0;
}

.tide-modal-close svg {
  width: 18px;
  height: 18px;
  color: #666;
}

.tide-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eee;
}

.tide-modal-list {
  padding: 12px 16px 16px;
}

.tide-modal-item {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #f9f9f9;
  transition: background 0.2s;
}

.tide-modal-item:last-child {
  margin-bottom: 0;
}

.tide-modal-item.current {
  background: #e3f2fd;
  border: 1px solid #90caf9;
}

.tide-modal-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tide-modal-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tide-modal-item-name {
  font-size: 15px;
  font-weight: 700;
}

.tide-modal-item-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.tide-modal-credit {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin: 12px 16px 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

/* 満潮・干潮説明モーダル（tide-modalと同じスタイルを共有） */
.tide-level-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.tide-level-modal-overlay.hidden {
  display: none;
}

.tide-level-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  margin: auto;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 釣りのポイントセクション */
.tide-modal-tips {
  background: linear-gradient(135deg, #fff8e1 0%, #e8f5e9 100%);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

.tide-modal-tips-title {
  font-size: 14px;
  font-weight: 700;
  color: #4caf50;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tide-modal-tips-title::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234caf50' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.tide-modal-tips-list {
  margin: 0;
  padding-left: 20px;
  list-style-type: none;
}

.tide-modal-tips-list li {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 4px;
  position: relative;
}

.tide-modal-tips-list li::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 6px;
  width: 6px;
  height: 6px;
  background: #4caf50;
  border-radius: 50%;
}

.tide-modal-tips-list li:last-child {
  margin-bottom: 0;
}

/* 日の出・日の入り説明モーダル */
.sun-time-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.sun-time-modal-overlay.hidden {
  display: none;
}

.sun-time-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  margin: auto;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 風と釣果の関係モーダル */
.wind-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.wind-modal-overlay.hidden {
  display: none;
}

.wind-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  margin: auto;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 風モーダル - 釣果評価バッジ */
.wind-modal-rating {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.wind-modal-rating-best {
  background: #d1fae5;
  color: #059669;
}

.wind-modal-rating-good {
  background: #dbeafe;
  color: #3b82f6;
}

.wind-modal-rating-caution {
  background: #fef3c7;
  color: #d97706;
}

.wind-modal-rating-difficult {
  background: #fed7aa;
  color: #ea580c;
}

.wind-modal-rating-danger {
  background: #fee2e2;
  color: #dc2626;
}
