/*
  CSS Reset
  Modern, minimal reset for consistent cross-browser styling
*/

:host {
  --font-inter: "Inter", sans-serif;
  --swatches-blue: #2563eb;
  --swatches-light-gray: #efefef;
  --swatches-off-white: #F5F5F5;
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: "Inter", sans-serif;
  background-color: white;
  color: black;
}

/* Remove list styles on ul, ol elements */
ul,
ol {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* Anchor elements reset */
a {
  color: inherit;
  text-decoration: inherit;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Remove all animations and transitions for people who prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
 .cl_input-group {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.5rem;
 }

/* Select Component */
.cl_select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  min-width: 220px;
  color: black;
  transition: border-color 0.15s ease;
}

.cl_select-trigger:hover {
  border-color: #9ca3af;
}

.cl_select-trigger:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.cl_select-trigger[data-placeholder] {
  color: #9ca3af;
}

.cl_select-icon {
  display: flex;
  color: #6b7280;
}

.cl_select-content {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 50;
}

.cl_select-viewport {
  padding: 0.25rem;
}

.cl_select-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border-radius: 0.375rem;
  cursor: pointer;
  outline: none;
  transition: background-color 0.1s ease;
}

.cl_select-item:focus,
.cl_select-item[data-highlighted] {
  background-color: #f3f4f6;
}

.cl_select-item[data-state="checked"] {
  background-color: #eff6ff;
  color: var(--swatches-blue);
}

 .cl_toast {
  padding: 1em;
  border-radius: .5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--swatches-light-gray);
  background-color: var(--swatches-off-white);
  border-bottom: 1px solid var(--swatches-light-gray);
 }

 .cl_toast a {
  color: var(--swatches-blue);
  text-decoration: underline;
 }

/* Form Layout */
.cl_form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.cl_form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.cl_form-field--half {
  width: 100%;
}

@media (min-width: 480px) {
  .cl_form-field--half {
    width: calc(50% - 0.5rem);
  }
}

/* Input Styles */
.cl_input {
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease;
}

.cl_input:hover {
  border-color: #9ca3af;
}

.cl_input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.cl_input::placeholder {
  color: #9ca3af;
}

/* Textarea Styles */
.cl_textarea {
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease;
  resize: vertical;
  min-height: 100px;
}

.cl_textarea:hover {
  border-color: #9ca3af;
}

.cl_textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.cl_textarea::placeholder {
  color: #9ca3af;
}

.cl_textarea--error {
  border-color: #dc2626;
}

.cl_textarea--error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* Full-width select trigger variant */
.cl_select-trigger--full {
  width: 100%;
}

/* Required indicator */
.cl_required {
  color: #dc2626;
}

/* Error styles */
.cl_error {
  font-size: 0.8125rem;
  color: #dc2626;
}

.cl_input--error {
  border-color: #dc2626;
}

.cl_input--error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.cl_select-trigger--error {
  border-color: #dc2626;
}

.cl_select-trigger--error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* Button */
.cl_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background-color: black;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cl_button:hover {
  background-color: hsl(0, 0%, 16%);
}
.cl_button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.cl_button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

/* Success message */
.cl_success {
  font-size: 0.9375rem;
  color: #16a34a;
}

.cl_form label {
  margin-bottom: 0.25rem;
}

/* Checkbox Group */
.cl_checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #fafafa;
}

.cl_checkbox-group--error {
  border-color: #dc2626;
}

.cl_checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cl_checkbox {
  width: 1.125rem;
  height: 1.125rem;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.cl_checkbox:hover {
  border-color: #9ca3af;
}

.cl_checkbox:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.cl_checkbox[data-state="checked"] {
  background-color: var(--swatches-blue);
  border-color: var(--swatches-blue);
}

.cl_checkbox-indicator {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl_checkbox-indicator svg {
  width: 0.75rem;
  height: 0.75rem;
}

.cl_checkbox-label {
  font-size: 0.9375rem;
  cursor: pointer;
  line-height: 1.4;
}
