.create-flow-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 2rem;
  overflow-y: hidden;
  display: flex;
}

@media (max-width: 767.98px) {
  .create-flow-container {
    padding: 0;
    display: block;
  }
}

.create-flow-content {
  width: 100%;
  max-width: 500px;
  height: 100%;
  border-radius: 0;
  /* Let inner scroll area handle scrolling */
  overflow: hidden;
  min-height: 0; /* allow child flex item to shrink for scroll */
}

#form-state {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%; /* ensure full height */
  min-height: 0; /* allow flex children to shrink */
}

@media (min-width: 770px) {
  .create-flow-content {
    height: 85vh;
    border-radius: 1.5rem;
  }

  .create-flow-content.success-mode {
    height: 60vh;
    border-radius: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .create-flow-content {
    height: 100%; /* match offcanvas body height */
    margin-bottom: 0;
  }
}

.create-flow-success {
  padding: 0 3.5rem;
  gap: 0.5rem;
  height: 100%;
}
#success-state {
  flex: 1;
}
@media (max-width: 767.98px) {
  .create-flow-success {
    padding: 0 1.5rem;
  }
}

.create-flow-logo {
  max-width: 100px;
}

.create-flow-success-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: #434343;
  margin: 0;
}

.create-flow-success-subtitle {
  font-size: 0.875rem;
  color: #434343b2;
  margin: 0;
}

.create-flow-link-container {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid #f2f2f2;
  margin-top: 1rem;
}

.create-flow-link-text {
  font-size: 0.875rem;
  color: #434343b2;
  margin: 0;
}

.create-flow-link-highlight {
  color: #434343;
}

.create-flow-copy-icon {
  width: 16px;
  height: 16px;
}

.create-flow-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  color: #6d28d9;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.create-flow-success-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  width: 100%;
  padding: 1.25rem;
  gap: 2rem;
}

.create-flow-share-btn {
  cursor: pointer;
  border: 1px solid #6d29d9;
  padding: 1rem 1rem 0.75rem;
  flex: 1;
  color: #6d29d9;
  border-radius: 0.5rem;
  background: transparent;
}

.create-flow-home-btn {
  cursor: pointer;
  border: 1px solid #6d29d9;
  color: white;
  background-color: #6d29d9;
  padding: 1rem 1rem 0.75rem;
  flex: 1;
  border-radius: 0.5rem;
}

.create-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  gap: 2rem;
  border-bottom: 1px solid #12202324;
}

.create-flow-nav-icon {
  height: 1.5rem;
  cursor: pointer;
}

.create-flow-progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.create-flow-progress-bar {
  flex: 1;
  height: 0.25rem;
  background-color: #f8f9fd;
  border-radius: 0.125rem;
}

.create-flow-progress-bar.active {
  background-color: #6d29d9;
}

.create-flow-content-scroll {
  flex: 1 1 auto;
  overflow-y: auto; /* this is the only scrollable area */
  padding: 0.25rem;
  gap: 0.5rem;
  min-height: 0; /* enable proper flexbox scrolling */
}

.create-flow-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.create-flow-section-title {
  color: #151515;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.create-flow-cover-label {
  display: block;
  cursor: pointer;
  margin-bottom: 1rem;
}

.create-flow-cover-image {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 0.375rem;
}

.create-flow-input-group {
  position: relative;
  border: 1px solid #f2f2f2;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.create-flow-floating-input {
  outline: none;
  font-size: 0.875rem;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0.875rem 0 0 0;
}

.create-flow-floating-input::placeholder {
  color: transparent;
}

.create-flow-floating-input:focus::placeholder {
  color: #9ca3af;
}

.create-flow-textarea {
  resize: vertical;
  min-height: 60px;
}

.create-flow-floating-label {
  position: absolute;
  color: #434343b2;
  left: 0.75rem;
  top: 0.875rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
  background: white;
  padding: 0 0.25rem;
}

.create-flow-floating-input:focus + .create-flow-floating-label,
.create-flow-floating-input:not(:placeholder-shown)
  + .create-flow-floating-label {
  top: 0.25rem;
  font-size: 0.75rem;
}

.create-flow-visibility-title {
  color: #151515b2;
  font-size: 0.875rem;
  margin: 1.5rem 0 0 0;
}

.create-flow-general-title {
  color: #151515b2;
  font-size: 0.875rem;
}

.create-flow-radio-group {
  margin-top: 0;
}

.create-flow-radio-item {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #d7d7d7;
}

.create-flow-radio-label {
  color: #151515;
  font-size: 0.875rem;
  margin: 0;
}

.create-flow-comments-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  margin: 1rem 0;
  border-top: 1px solid #d7d7d7;
  border-bottom: 1px solid #d7d7d7;
}

.create-flow-toggle-title {
  font-weight: bold;
  color: #151515;
  margin: 0;
}

.create-flow-toggle-subtitle {
  font-size: 0.875rem;
  color: #151515b2;
  margin: 0;
}

.create-flow-toggle-icon {
  height: 1.75rem;
  cursor: pointer;
}

.create-flow-wishlist-title {
  color: #434343;
  margin: 0.5rem 0;
}

.create-flow-select {
  color: #434343b2;
  border: 1px solid #f2f2f2;
  padding: 0.875rem 0.75rem;
  border-radius: 0.5rem;
  width: 100%;
  outline: none;
  background: white;
}

.create-flow-info-box {
  background-color: #6d28d90d;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #6d29d9;
  margin-top: 1rem;
}

.create-flow-optional {
  font-size: 0.75rem;
  font-weight: normal;
}

.create-flow-search-container {
  position: relative;
  margin-bottom: 1rem;
}

.create-flow-search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #f2f2f2;
  border-radius: 0.5rem;
  outline: none;
  color: #434343;
  font-size: 0.875rem;
  background: white;
}

.create-flow-dropdown {
  width: 100%;
  margin-top: 0.25rem;
  background: white;
  border: 1px solid #f2f2f2;
  border-radius: 0.5rem;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.create-flow-friend-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  cursor: pointer;
}

.create-flow-friend-item:hover {
  background-color: #f8f9fa;
}

.create-flow-friend-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.create-flow-friend-info {
  flex: 1;
}

.create-flow-friend-name {
  color: #151515;
  font-size: 0.75rem;
  margin: 0;
}

.create-flow-friend-username {
  color: #4a5557;
  font-size: 0.75rem;
  margin: 0;
}

.create-flow-friend-action {
  width: 1.5rem;
  height: 1.5rem;
}

.create-flow-selected-friend {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.create-flow-remove-btn {
  cursor: pointer;
}

.create-flow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  gap: 2rem;
  border-top: 1px solid #12202324;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

.create-flow-cancel-btn {
  cursor: pointer;
  border: 1px solid #d7d7d7;
  padding: 1rem 1rem;
  flex: 1;
  border-radius: 0.5rem;
  background: white;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-flow-next-btn {
  cursor: pointer;
  border: 1px solid #6d29d9;
  color: white;
  background-color: #6d29d9;
  padding: 1rem 1rem;
  flex: 1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .create-flow-content {
    border-radius: 0;
  }

  .create-flow-success {
    padding: 0 1.5rem;
  }
}

.create-flow-floating-input:invalid {
  border-color: #dc3545;
}

.create-flow-floating-input:valid {
  border-color: #28a745;
}
button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Shared brand look for switches */
.form-switch .form-check-input:checked {
  background-color: #6d29d9;
  border-color: #6d29d9;
}
.form-check-input:focus {
  border-color: #6d29d9;
  box-shadow: 0 0 0 0.2rem rgba(109, 41, 217, 0.25);
}
/* Bigger switches */
.form-switch .form-check-input {
  width: 2.75em;
  height: 1.5em;
  border-radius: 2em;
  background-size: 1.25em 1.25em;
}
