.wishlist-detail {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.close-x-button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.5rem;
  color: #7f8c8d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  z-index: 1600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.close-x-button:hover {
  background-color: #ffffff;
  color: #2c3e50;
}

.wishlist-detail h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
}

.wishlist-detail-content {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wishlist-detail-image {
  width: 100%;
  aspect-ratio: 5 / 6;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: #f0f0f0;
}

.wishlist-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wishlist-detail-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.wishlist-detail-link {
  margin-bottom: 0.5rem;
}

.wishlist-detail-link a {
  color: #3498db;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}

.wishlist-detail-link a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.wishlist-detail-conditions {
  margin-bottom: 0.75rem;
}

.wishlist-detail-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 0.5rem 0;
}

.wishlist-detail-condition {
  padding: 0.75rem;
  font-size: 0.95rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.wishlist-detail-condition.met {
  color: #27ae60;
}

.wishlist-detail-condition.not-met {
  color: #888;
}

.condition-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.condition-icon {
  flex-shrink: 0;
}

.condition-text {
  flex: 1;
}

.condition-progress {
  margin-top: 0.125rem;
  margin-left: calc(16px + 0.5rem);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.125rem;
}

.progress-fill {
  height: 100%;
  background-color: #3498db;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.wishlist-detail-condition.met .progress-fill {
  background-color: #27ae60;
}

.progress-text {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.progress-remaining {
  color: #e74c3c;
  font-weight: 500;
}

.wishlist-detail-actions {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin-top: 0.75rem;
  align-items: center;
}

.wishlist-detail-edit-button,
.wishlist-detail-complete-button,
.wishlist-detail-uncomplete-button,
.wishlist-detail-delete-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.wishlist-detail-edit-button {
  background-color: #3498db;
  color: white;
}

.wishlist-detail-edit-button:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

.wishlist-detail-complete-button {
  flex: 1;
  background-color: #27ae60;
  color: white;
}

.wishlist-detail-complete-button:hover:not(:disabled) {
  background-color: #229954;
  transform: translateY(-1px);
}

.wishlist-detail-complete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wishlist-detail-create-task-button {
  padding: 0.75rem;
  background-color: transparent;
  color: #27ae60;
  border: 2px solid #27ae60;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
}

.wishlist-detail-create-task-button:hover {
  background-color: rgba(39, 174, 96, 0.1);
  transform: translateY(-1px);
}

.wishlist-detail-tasks-badge {
  position: absolute;
  bottom: -0.25rem;
  left: -0.25rem;
  background: #6b7280;
  color: white;
  border-radius: 50%;
  padding: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 1.25rem;
  height: 1.25rem;
  text-align: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-detail-linked-task {
  margin-top: 0.75rem;
}

.linked-task-label-header {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.wishlist-detail-linked-task .task-item {
  margin: 0;
}

.wishlist-detail-linked-task .task-item-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.wishlist-detail-linked-task .task-name-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.wishlist-detail-linked-task .task-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wishlist-detail-linked-task .task-unlink-button {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.wishlist-detail-linked-task .task-unlink-button:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.wishlist-detail-uncomplete-button {
  flex: 1;
  background-color: #f1c40f;
  color: white;
}

.wishlist-detail-uncomplete-button:hover:not(:disabled) {
  background-color: #f39c12;
  transform: translateY(-1px);
}

.wishlist-detail-uncomplete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wishlist-detail-delete-button {
  background-color: #e74c3c;
  color: white;
}

.wishlist-detail-delete-button:hover:not(:disabled) {
  background-color: #c0392b;
  transform: translateY(-1px);
}

.wishlist-detail-delete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wishlist-detail-bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1500;
}

.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #f1c40f;
  color: white;
}

.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button:hover:not(:disabled) {
  background-color: #f39c12;
  transform: translateY(-1px);
}

.wishlist-detail-bottom-actions .wishlist-detail-uncomplete-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #888;
}

