/* UrbanChain reusable form styles */

.uc-form {
  font-family: 'Poppins', sans-serif;
}

/* Field groups */
.uc-field {
  margin-bottom: 1.5rem;
}

/* Labels */
.uc-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: #fff;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
}
.uc-label--required::after {
  content: ' *';
  color: var(--color-primary-300);
}

/* Text inputs */
.uc-input {
  width: 100%;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  color: #2d2538;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  color: #fff;
  box-sizing: border-box;
}
.uc-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.uc-input:focus {
  border-color: var(--color-primary-300);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(90, 230, 183, 0.2);
}
.uc-input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #f87171;
}

/* Custom file upload */
.uc-file-upload {
  position: relative;
}
.uc-file-upload input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.uc-file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  width: 100%;
  justify-content: center;
}
.uc-file-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}
.uc-file-trigger svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.uc-file-info {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}
.uc-file-info.is-active {
  display: flex;
}
.uc-file-icon {
  width: 2rem;
  height: 2rem;
  background: var(--color-primary-300);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.uc-file-icon svg {
  width: 1rem;
  height: 1rem;
  color: #2d2538;
}
.uc-file-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  color: #fff;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-file-size {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.uc-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
  flex-shrink: 0;
}
.uc-file-remove:hover {
  color: #f87171;
}
.uc-file-remove svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Custom checkbox */
.uc-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}
.uc-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.uc-checkbox-box {
  width: 1.25rem;
  height: 1.25rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  margin-top: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, border-color 0.15s;
}
.uc-checkbox input:checked + .uc-checkbox-box {
  background: var(--color-primary-300);
  border-color: var(--color-primary-300);
}
.uc-checkbox input:checked + .uc-checkbox-box svg {
  display: block;
}
.uc-checkbox-box svg {
  display: none;
  width: 0.75rem;
  height: 0.75rem;
  color: #2d2538;
}
.uc-checkbox input:focus-visible + .uc-checkbox-box {
  box-shadow: 0 0 0 3px rgba(90, 230, 183, 0.3);
}
.uc-checkbox a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.uc-checkbox a:hover {
  color: var(--color-primary-300);
}

/* Submit button */
.uc-submit {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: #2d2538;
  background: var(--color-primary-300);
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.uc-submit:hover {
  background: var(--color-primary-400);
}
.uc-submit:active {
  transform: scale(0.98);
}
.uc-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error state */
.uc-error {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
}

/* Success state */
.uc-success {
  text-align: center;
  padding: 2rem;
}
.uc-success-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--color-primary-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.uc-success-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #2d2538;
}

/* Grid */
.uc-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .uc-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
