/* 写真アルバム・プロフィール写真統合スタイル */

/* ===== アルバムレイアウト ===== */
.photo-album-component {
  width: 100%;
}

.album-daily {
  width: 100%;
}

.album-day {
  margin-bottom: 1.5rem;
}

.album-date-header {
  margin-bottom: 1rem;
}

.album-date {
  color: #007bff;
  margin-bottom: 0;
}

.album-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.album-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

/* ===== 写真コンテナ ===== */
.photo-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0.375rem;
  transition: transform 0.2s ease-in-out;
  background: #f8f9fa;
}

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

.photo-link {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
}

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

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

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

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

.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;
}

/* ===== 写真カードホバー効果 ===== */
.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;
}

.edit-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
}

/* ヘッダー猫プロフィール系スタイルは css/layout/components.css に移設 */

/* ===== プロフィール写真エリア ===== */
.profile-photo-container {
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.375rem;
}

.profile-photo-container:hover .profile-photo-overlay {
  opacity: 1;
}

.profile-photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.375rem;
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon i {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== プロフィール写真ギャラリー ===== */
.profile-gallery .carousel {
  border-radius: 8px;
  overflow: hidden;
}

.profile-gallery .carousel-inner {
  border-radius: 8px;
}

.profile-gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.profile-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-edit-overlay {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(0, 123, 255, 0.8);
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-edit-overlay i {
  font-size: 0.8rem;
}

/* ===== Carouselコントロール ===== */
.profile-gallery .carousel-control-prev,
.profile-gallery .carousel-control-next {
  width: 30px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 5px;
}

.profile-gallery .carousel-control-prev-icon,
.profile-gallery .carousel-control-next-icon {
  width: 15px;
  height: 15px;
}

.profile-gallery .carousel-indicators {
  bottom: 5px;
  margin-bottom: 0;
}

.profile-gallery .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 2px;
}

/* ===== プロフィール画面専用設定 ===== */
/* プロフィール画面ではお気に入り機能を有効、オーバーレイを無効 */
.profile-gallery .photo-link {
  pointer-events: none; /* オーバーレイを無効化 */
}

.profile-gallery .favorite-mark {
  pointer-events: auto; /* お気に入り機能を有効化 */
  z-index: 20; /* お気に入りボタンを最前面に */
}

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

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

  .profile-gallery .carousel-control-prev,
  .profile-gallery .carousel-control-next {
    width: 25px;
    height: 25px;
  }

  .profile-gallery .carousel-control-prev-icon,
  .profile-gallery .carousel-control-next-icon {
    width: 12px;
    height: 12px;
  }

  .upload-icon i {
    font-size: 2.5rem !important;
  }
}

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

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