/*
 * 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.
 */

.flash {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 10px auto 10px auto;
  pointer-events: auto;
}

.flash.notice {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  margin-top: 11px;
  padding: 10px 20px;
}

.flash.alert {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin-top: 14px;
  padding: 10px 20px;
}

.flash-close {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: inherit;
  cursor: pointer;
  margin-left: 10px;
}

/*  デモユーザー表示用 */
.demo-banner {
  position: sticky;
  top: 64px;
  background: #fff3cd;
  color: #664d03;
  padding: 12px 16px;
  margin: 0 auto;
  max-width: 800px;
  border-bottom: 1px solid #ffecb5;
  text-align: center;
  font-size: 0.9rem;
  z-index: 11;
}

/* ==============================
   共通スタイル（全画面共通）
   ============================== */

/* ボックスサイズを全要素で border-box に */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

select {
  padding-right: 2em;
  font-size: 14px;
  line-height: 1.4;
}

/* ==============================
   mainコンテンツ領域
   ============================== */
.main-content {
  margin-top: 60px;
  padding: 20px;
  min-height: calc(100vh - 70px - 110px - 40px);
}

/* ==============================
   ヘッダー共通
   ============================== */
/*スマホ表示時の画面下ナビゲーション */   
.mobile-bottom-nav {
  display: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 69px;
  background-color: #fff;
  padding: 10px 20px;
  overflow: visible;
  z-index: 15;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo,
.header-logo--guest {
  position: fixed;
  top: 10px;
  left: 60px;
  z-index: 16;
}

.header-logo .logo-image,
.header-logo .logo-image-dark,
.header-logo--guest .logo-image,
.header-logo--guest .logo-image-dark {
  height: 50px;
}

/* 通常（ライト） */
.logo-image { display: block; }
.logo-image-dark  { display: none; }

/*. ダークモード時 */
.dark .logo-image { display: none; }
.dark .logo-image-dark  { display: block; }

.header-center-item {
  max-height: 60px;
  overflow: auto;
}

.mobile-header-logo,
.mobile-header-logo--guest {
  display: none;
}

.animal-image {
  height: 300px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap:16px;
}

.child-status {
  font-size: 14px;
  color: #333;
}

.notification-link {
  position: relative;
  color: #333;
}

/* 通知ベルアイコン */
.notification-link i.fa-bell {
  font-size: 24px;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  left: -9px;
}

.notification-link:hover i.fa-bell {
  color: #4caf50;
}

/* 通知カウントバッジ */
.notification-count {
  position: absolute;
  top: -6px;
  right: -10px;          /* ベルが大きい分少し右に */
  background: red;
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 50%;
}

/* ==============================
   tooltip部分
   ============================== */
/* tooltip 親要素 */
.tooltip {
  position: relative;
  display: inline-block;
}

/* tooltip テキスト部分 */
.tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 8px;
  position: absolute;
  z-index: 1000;
  bottom: -35px;
  left: -18px;
  white-space: nowrap;
  transition: opacity 0.1s ease-in-out;
  font-size: 10px;
}

/* hoverで即時表示 */
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ==============================
   ユーザーメニュー
   ============================== */
#user-menu {
  width: auto;
  max-width: 95%;
}

/* ==============================
   アカウントメニュー共通スタイル
   ============================== */
#account-menu {
  border: 1px solid #e5e7eb;
}

#account-menu a,
#account-menu form,
#account-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 4px;
  text-align: left;
  background-color: white;
  border: none;
  border-radius: 0;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

#account-menu a:hover,
#account-menu form:hover,
#account-menu button:hover {
  background-color: #f0f0f0;
}

#account-toggle {
  position: relative;
  overflow: hidden;
}

#account-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0);
  transition: background-color 0.2s;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

#account-toggle:hover::before {
  background-color: rgba(255,255,255,0.2); /* 薄い白モヤ */
}

/* ==============================
   アカウントメニューの区切り線
   ============================== */
.menu-divider {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  margin: 4px 0;
}

/* ==============================
   作成ボタン・ドロップダウン共通
   ============================== */
#new-record-button {
  position: relative;
  padding: 6px 12px;
  font-size: 16px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
}

#new-record-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0);
  transition: background-color 0.2s;
  border-radius: 6px;
  pointer-events: none;
}

#new-record-button:hover::before {
  background-color: rgba(255,255,255,0.2);
}

/* ドロップダウンメニュー */
#record-icons {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  min-width: 120px;
  z-index: 1200;
  font-size: 16px;
}

/* ドロップダウン内リンク */
#record-icons a {
  display: block;
  padding: 6px 10px;
  color: #1f2937;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#record-icons a i {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 20px;
  margin-right: 8px;
}

#record-icons a:hover {
  background-color: #f3f4f6;
}

/* ドロップダウン非表示状態 */
.hidden {
  display: none !important;
}

/* デザインテーマのドロップダウン */
#theme-menu {
  position: absolute;
  top: 0;           /* ボタンの上端に揃える */
  right: 0;       /* ボタンの右横に配置 */
  transform: translateX(-150px); /* 右に4pxずらす */
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 120px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 100;
}

/* ==============================
   ログイン前デザイン共通
   ============================== */
.site-header .btn-guest-action {
  height: 40px;        /* ログイン/新規登録ボタンの高さ統一 */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
}

.btn-guest-action {
  position: relative;
  padding: 6px 12px;
  font-size: 16px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none; 
}

.btn-guest-action::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0);
  transition: background-color 0.2s;
  border-radius: 6px;
  pointer-events: none;
}

.btn-guest-action:hover::before {
  background-color: rgba(255,255,255,0.2);
}

/* ログイン時 */
footer.logged-in {
  width: calc(100% - 240px);
  margin-left: 240px;
}

/* ゲスト時 */
footer.guest {
  width: 100%;
  margin-left: 0;
}

/* ==============================
   フッター共通スタイル
   ============================== */
.site-footer {
  height: 110px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 240px);
  margin-top: 50px;
  margin-left: 240px;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05);
  transition: margin-left 0.3s;
}

.footer-inner {
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* 上段: 利用規約・プライバシーポリシー */
.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 15px;
  font-size: 13px;
  color: #333;
}

.footer-links a {
  color: #333;
  text-decoration: none;
  position: relative;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.footer-links a::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(255,255,255,0);
  border-radius: 4px;
  transition: background-color 0.2s;
  pointer-events: none;
}

.footer-links a:hover::before {
  background-color: rgba(255,255,255,0.2);
}

/* 下段: コピーライト＋SNSリンク */
.footer-bottom {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: #333;
}

/* コピーライト部分 */
.footer-bottom p {
  margin: 0;
}

/* SNSリンク部分 */
.footer-sns {
  display: flex;
  gap: 15px;
}

.footer-sns a {
  color: #333;
  font-size: 18px;
  position: relative;
  border-radius: 6px;
  padding: 2px 4px;
  transition: color 0.2s;
}

.footer-sns a::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(255,255,255,0);
  border-radius: 6px;
  transition: background-color 0.2s;
  pointer-events: none;
}

.footer-sns a:hover::before {
  background-color: rgba(255,255,255,0.2);
}

/* 静的ページ用(利用規約・プライバシーポリシー) */
.static_pages-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic Pro", sans-serif;
  line-height: 1.8;
  color: #333;
}

.static_pages-container h1 {
  font-size: 32px;
  margin-bottom: 20px;
  text-align: center;
}

.static_pages-container h2 {
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 15px;
  border-left: 4px solid #6fcf97;
  padding-left: 10px;
}

.static_pages-container p {
  margin-bottom: 15px;
}

.static_pages-container ul {
  margin-left: 20px;
  list-style-type: disc;
}

.static_pages-container ul li {
  margin-bottom: 8px;
}

.static_pages-container a {
  color: #4a90e2;
  text-decoration: underline;
}
