/* AI Recommendation Result Card Styles */
.ai-recommend-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, background 0.2s;
}

.ai-recommend-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.ai-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ai-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-secondary);
}

.ai-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ai-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Gallery List Modal - Mobile Scroll & Layout Fix */
#modal-gallery .modal-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 800px;
  max-height: 85vh;
}

#modal-gallery .modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .photo-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.gallery-item:hover {
  transform: scale(1.02);
}

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

/* 사진 삭제 버튼 */
.btn-delete-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 71, 87, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.btn-delete-photo:hover {
  opacity: 1;
  transform: scale(1.1);
  background: #ff4757;
}

.btn-delete-photo i {
  font-size: 18px;
}

.timeline-scroll-area {
  flex: 1;
  padding: 0 24px 24px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.timeline-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.btn-small-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-small-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-small-glass i {
  font-size: 16px;
}

.timeline-list {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.timeline-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  margin-top: 16px;
}

.timeline-empty-state i {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-empty-state p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Google Maps Autocomplete Dark Mode Fix */
.pac-container {
  background-color: var(--bg-color);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  margin-top: 8px;
  font-family: var(--font-family);
  z-index: 9999 !important;
}

.pac-item {
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  cursor: pointer;
}

.pac-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.pac-item-query {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}

.pac-icon {
  filter: invert(1);
  opacity: 0.6;
}

.timeline-place-card {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--color-primary);
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, background 0.2s;
}

.timeline-place-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-naver {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(3, 199, 90, 0.15);
  border: 1px solid rgba(3, 199, 90, 0.3);
  border-radius: 6px;
  color: #03C75A;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  z-index: 5;
}

.btn-naver:hover {
  background: rgba(3, 199, 90, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(3, 199, 90, 0.2);
}

.btn-naver i {
  font-size: 14px;
}

.trip-card-period {
  font-size: 12px;
  color: var(--color-primary);
  background: hsla(var(--hue-primary), 85%, 60%, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* Trip Card Cover Photo */
.glass-card {
  position: relative;
  overflow: hidden;
}

.trip-card-cover-img {
  height: 130px;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.06) 0%, rgba(100, 149, 237, 0.06) 100%);
  background-size: cover;
  background-position: center;
  transition: opacity 0.4s ease;
  flex-shrink: 0;
}

.trip-card-cover-img.has-photo {
  background-color: #111;
}

.trip-card-body {
  padding: 20px;
  position: relative;
}

/* Trip Card Delete Button */
.btn-delete-trip {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, color 0.3s, transform 0.2s;
  z-index: 10;
}

.glass-card:hover .btn-delete-trip {
  opacity: 1;
}

.btn-delete-trip:hover {
  color: #ff4757;
  transform: scale(1.1);
}

/* Gallery Cover Photo Button */
.btn-set-cover {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.btn-set-cover:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

.btn-set-cover.is-active {
  background: rgba(0, 200, 100, 0.75);
  opacity: 1;
}

.btn-set-cover.is-active:hover {
  background: rgba(0, 180, 80, 0.9);
}

.btn-set-cover i {
  font-size: 18px;
}

/* Timeline Reorder Buttons */
.btn-icon-small {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-icon-small i {
  font-size: 20px;
}

.btn-icon-small:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.btn-icon-small:disabled {
  opacity: 0.2;
  cursor: default;
}
