.wa-restock-widget {
  margin: 24px 0;
}

.wa-restock-widget.is-hidden {
  display: none;
}

.wa-restock-card {
  --wa-restock-accent: #0e7d44;
  --wa-restock-bg: #ffffff;
  border-radius: 16px;
  padding: 20px;
  background: var(--wa-restock-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-width: 600px;
  line-height: 1.6;
  font-size: 15px;
  font-family: -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;
}

.wa-restock-card__header h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
}

.wa-restock-card__description {
  margin: 0 0 20px;
  color: rgba(26, 26, 26, 0.75);
  font-size: 15px;
  line-height: 1.5;
}

.wa-restock-card__status {
  display: none;
  min-height: 24px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 8px;
}

.wa-restock-card__status[data-state] {
  display: block;
}

.wa-restock-card__status[data-state='success'] {
  color: #0f7a39;
  background: rgba(15, 122, 57, 0.08);
}

.wa-restock-card__status[data-state='error'] {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
}

.wa-restock-form {
  display: grid;
  gap: 15px;
}

.wa-restock-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-restock-form__field label {
  font-weight: 500;
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}

.wa-restock-form__field input,
.wa-restock-form__field select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  color: #1a1a1a;
  line-height: 1.2;
}

.wa-restock-form__field input::placeholder {
  color: #999;
  font-size: 14px;
}

.wa-restock-form__field input:focus,
.wa-restock-form__field select:focus {
  outline: none;
  border-color: var(--wa-restock-accent);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.wa-restock-phone-row input:focus {
  border-color: var(--wa-restock-accent);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.wa-restock-form__field--phone label {
  margin-bottom: -4px;
}

.wa-restock-phone-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;  
}

.wa-restock-country-select {
  position: relative;
  min-width: 90px;
  max-width: 100px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  cursor: pointer;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.wa-restock-country-select:hover {
  background: #e9ecef;
  border-color: #ddd;
}

.wa-restock-country-select:focus-within {
  border-color: var(--wa-restock-accent);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.wa-restock-country-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.wa-restock-country-flag {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 3px;
}

.wa-restock-country-code {
  font-weight: 500;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 6px;
}

.wa-restock-country-caret {
  margin-left: auto;
  font-size: 15px;
  color: #666;
  line-height: 1;
}

.wa-restock-phone-row input {
  flex: 1;
}

.wa-restock-form__consent {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  align-items: flex-start;
  margin-bottom: 10px;
}

.wa-restock-form__consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.wa-restock-form__consent a {
  color: var(--wa-restock-accent);
  text-decoration: underline;
}

.wa-restock-button {
  background: var(--wa-restock-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 16px;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: background-color 0.3s ease, opacity 0.2s ease;
}

.wa-restock-button:hover:not([disabled]) {
  background: #1ea952;
}

.wa-restock-button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.wa-restock-button__spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: wa-restock-spin 0.8s linear infinite;
  display: none;
}

.wa-restock-button[data-loading='true'] .wa-restock-button__spinner {
  display: inline-flex;
}

.wa-restock-company {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@keyframes wa-restock-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .wa-restock-card {
    padding: 15px;
  }

  .wa-restock-card__header h3 {
    font-size: 16px;
  }

  .wa-restock-card__description {
    font-size: 15px;
  }

  .wa-restock-form__field label {
    font-size: 14px;
  }

  .wa-restock-form__field input {
    font-size: 14px;
    padding: 8px 10px;
    line-height: 1.2;
  }

  .wa-restock-phone-row {
    flex-direction: row;
  }

  .wa-restock-country-select {
    min-width: 90px;
    max-width: 100px;
    padding: 6px 6px;
  }

  .wa-restock-country-flag {
    font-size: 18px;
  }

  .wa-restock-country-code {
    font-size: 13px;
  }

  .wa-restock-country-select select {
    width: 100%;
  }

  .wa-restock-button {
    padding: 10px 16px;
    font-size: 14px;
  }
}


