/* 写真詳細オーバーレイ専用スタイル */
.photo-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-detail-overlay.show {
  opacity: 1;
  visibility: visible;
}

.photo-detail-card {
  width: 90vw;
  max-width: 800px;
  height: 80vh;
  max-height: 600px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-detail-image-container {
  position: relative;
  flex: 1;
  min-height: 300px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-detail-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.overlay-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease;
}

.overlay-close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* オーバーレイ内メモ編集機能 */
.memo-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 20px;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ホバー時にメモ編集エリアを表示 */
.photo-detail-image-container:hover .memo-layer,
.photo-detail-card:hover .memo-layer {
  opacity: 1;
  visibility: visible;
}

.memo-editor-overlay {
  width: 100%;
}

.memo-textarea {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #333;
  font-size: 14px;
  resize: none;
  transition: all 0.2s ease;
}

.memo-textarea:focus {
  background: rgba(255, 255, 255, 1);
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .memo-layer {
    padding: 15px;
  }

  .memo-textarea {
    font-size: 16px; /* モバイルでの入力しやすさ向上 */
  }
}
