/* Wishlists Manager Page Styles */

.wishlists-manager-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.wishlists-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.wishlists-header h1 {
  margin: 0;
  font-size: 2rem;
  color: #333;
}

.loading-container {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Wishlists Grid */
.wishlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.wishlist-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.wishlist-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wishlist-card.default {
  border: 2px solid #007bff;
}

.wishlist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.wishlist-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background-color: #007bff;
  color: white;
}

.wishlist-card-body {
  margin-bottom: 1rem;
}

.wishlist-card-body p {
  margin: 0.5rem 0;
  color: #666;
  font-size: 0.9rem;
}

.item-count i,
.shared-with i {
  margin-right: 0.5rem;
  color: #007bff;
}

.created-date {
  font-size: 0.85rem;
  color: #999;
}

.wishlist-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wishlist-card-actions .btn {
  flex: 1;
  min-width: fit-content;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.empty-state i {
  font-size: 4rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Invites Section */
#pending-invites {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

#pending-invites h2 {
  margin-top: 0;
}

.invites-grid {
  display: grid;
  gap: 1rem;
}

.invite-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.invite-content h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

.invite-content p {
  margin: 0.25rem 0;
  color: #666;
  font-size: 0.9rem;
}

.invite-date {
  font-size: 0.85rem;
  color: #999;
}

.invite-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
}

.help-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Share Modal Specific */
.share-section {
  margin-bottom: 2rem;
}

.share-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #333;
}

.share-link-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-link-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #f8f9fa;
}

.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e0e0e0;
}

.divider span {
  position: relative;
  background-color: white;
  padding: 0 1rem;
  color: #666;
  font-size: 0.9rem;
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-link {
  background: none;
  color: #007bff;
  text-decoration: none;
  padding: 0.5rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn i {
  margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wishlists-header {
    flex-direction: column;
    align-items: stretch;
  }

  .wishlists-header h1 {
    font-size: 1.5rem;
  }

  .wishlists-grid {
    grid-template-columns: 1fr;
  }

  .wishlist-card-actions {
    flex-direction: column;
  }

  .wishlist-card-actions .btn {
    width: 100%;
  }

  .invite-card {
    flex-direction: column;
    align-items: stretch;
  }

  .invite-actions {
    width: 100%;
  }

  .invite-actions .btn {
    flex: 1;
  }

  .share-link-container {
    flex-direction: column;
  }

  .modal-content {
    width: 95%;
  }
}

