/* MyCatLog メインスタイル */

/* コンポーネントスタイル */
@import url("components.css");

/* 必須項目の表示 */
.form-label.required::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

/* WTForms必須項目の表示 */
.form-label:has(+ .form-control[required])::after,
.form-label:has(+ .form-select[required])::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

/* ナビゲーション */
.navbar-brand {
  font-weight: bold;
}

/* メインコンテンツ */
.main-content {
  min-height: calc(100vh - 200px);
}

/* フラッシュメッセージ */
.flash-messages {
  margin-top: 1rem;
}

/* 猫カードのホバーエフェクト */
.cat-card {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
  text-decoration: none;
  color: inherit;
}

.cat-card .card {
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cat-card:hover .card {
  /* 猫カードのホバー時の拡大アニメーションを削除 */
}

/* 猫のプロフィール画像ホバーエフェクト */
.cat-profile-image {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
}

.cat-card:hover .cat-profile-image {
  /* 猫プロフィール画像のホバー時の拡大アニメーションを削除 */
}

.cat-profile-image-large {
  height: 300px;
  object-fit: cover;
}

.cat-profile-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
}

.cat-card:hover .cat-profile-placeholder {
  /* 猫プロフィールプレースホルダーのホバー時の拡大アニメーションを削除 */
}

.cat-profile-placeholder-large {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 猫カードのコンテンツエリア */
.cat-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cat-card .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-bottom: 0;
}

/* 性別バッジのスタイル */
.gender-badge {
  font-weight: bold;
  font-size: 0.9em;
  padding: 0.25em 0.5em;
}

.gender-badge-male {
  background-color: #007bff !important;
  color: white !important;
}

.gender-badge-female {
  background-color: #e83e8c !important;
  color: white !important;
}

.gender-badge-unknown {
  background-color: #6c757d !important;
  color: white !important;
}

/* 画像表示用スタイル */
.photo-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.375rem;
  transition: transform 0.2s ease-in-out;
  background: #f8f9fa;
}

/* 写真コンテナのホバー時の拡大アニメーションを削除 */

.photo-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.photo-container img {
  transition: transform 0.3s ease-in-out;
  border-radius: 0.375rem;
}

/* 写真コンテナ内画像のホバー時の拡大アニメーションを削除 */

/* アイコンサイズ */
.icon-large {
  font-size: 3rem;
}

.icon-xl {
  font-size: 4rem;
}

/* プロフィール画像 */
.profile-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.profile-image-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 写真表示 */
.photo-display {
  height: 280px;
  object-fit: cover;
  width: 100%;
}

.photo-display-large {
  height: 300px;
  object-fit: cover;
  width: 100%;
}

.photo-display-small {
  height: 200px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.3s ease;
}

.photo-display-small:hover {
  transform: scale(1.05);
}

/* インラインメモエディター */
.memo-editor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 1000;
  border-radius: 0.375rem;
  padding: 1rem;
}

.memo-textarea {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 0.375rem;
  resize: none;
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.memo-textarea:focus {
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.memo-char-count {
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 写真詳細表示 */
.photo-detail {
  max-height: none;
  object-fit: contain;
  border-radius: 0.375rem;
  width: 100%;
  height: auto;
}

.photo-detail-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 400px;
  background: #f8f9fa;
  border-radius: 0.375rem;
  overflow: hidden;
}

.photo-edit {
  max-height: 300px;
  object-fit: contain;
  border-radius: 0.375rem;
}

/* 体調記録 */
.health-icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
}

.calendar-cell {
  height: 80px;
  vertical-align: top;
}

.calendar-text {
  font-size: 0.7em;
}

/* フォーム */
.inline-form {
  display: inline;
}

/* レスポンシブ画像表示 */
@media (max-width: 768px) {
  .photo-container img {
    max-height: 250px !important;
  }

  .photo-detail-container {
    min-height: 300px;
  }

  .cat-card:hover {
    transform: translateY(-3px);
  }

  .cat-card:hover .card {
    /* カードのホバー時の拡大アニメーションを削除 */
  }
}

@media (max-width: 576px) {
  .photo-container img {
    max-height: 200px !important;
  }

  .photo-detail-container {
    min-height: 250px;
  }

  .cat-card:hover {
    transform: translateY(-2px);
  }

  .cat-card:hover .card {
    /* カードのホバー時の拡大アニメーションを削除 */
  }
}

/* ========================================
   カスタムカード（Bootstrapカードの代替）
   ======================================== */
.custom-card {
  background: white;
  border: none;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1rem;
}

.custom-card-header {
  background-color: #0dcaf0;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.custom-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
}

.custom-card-body {
  padding: 1rem;
}

/* ========================================
   オーバーレイ用カスタムカード（Bootstrapカードの代替）
   ======================================== */
.custom-overlay-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 12px;
}

.custom-overlay-img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.custom-overlay-body {
  padding-top: 0rem;
  background: white;
  flex: 3;
  min-height: 150px;
  max-height: 30vh;
  overflow-y: auto;
}
