/* 自定義圖片彈窗樣式 */
.custom-image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.custom-image-container {
  position: relative;
  width: 95vw;
  height: 95vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 100000;
}

.custom-image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.custom-image-caption {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.custom-image-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.custom-image-close:hover {
  background: #e9ecef;
  color: #333;
}

.custom-image-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #000;
}

.custom-image-zoom {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.custom-image-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.custom-image-controls button {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.custom-image-controls button:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #adb5bd;
}

.custom-image-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .custom-image-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .custom-image-header {
    padding: 10px 15px;
  }

  .custom-image-caption {
    font-size: 16px;
  }

  .custom-image-controls {
    padding: 10px 15px;
    flex-wrap: wrap;
  }

  .custom-image-controls button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* 動畫效果 */
.custom-image-modal {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.custom-image-container {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
