/* RobArt Contact Form */

.robart-contact-form-container {
  max-width: 800px;
  margin: 2em auto;
  background: #5184b3;
  border-radius: 12px;
  padding: 2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.robart-contact-form-title {
  margin: 0 0 1.5em 0;
  font-size: 24px;
  font-weight: 600;
  color: #f5f5f0;
  text-align: center;
  padding-bottom: 1em;
  border-bottom: 2px solid #3d6fa0;
}

.robart-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.robart-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}

.robart-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.robart-form-field label {
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f0;
  letter-spacing: 0.3px;
}

.required {
  color: #d4e4f5;
}

/* Name section header */
.robart-name-section {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.robart-section-heading {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #f5f5f0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.robart-section-subheading {
  margin: 0 0 0.6em 0;
  font-size: 12px;
  color: #c5d8ee;
  font-style: italic;
  line-height: 1.4;
}

/* Inputs */
.robart-input,
.robart-select,
.robart-textarea {
  padding: 12px 16px !important;
  background: #3d6fa0 !important;
  border: 2px solid #2e5a8a !important;
  border-radius: 8px !important;
  color: #f5f5f0 !important;
  font-size: 15px !important;
  font-family: inherit !important;
  transition: all 0.3s ease !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.robart-input:focus,
.robart-select:focus,
.robart-textarea:focus {
  border-color: #f5f5f0 !important;
  background: #336191 !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

.robart-input.error,
.robart-textarea.error {
  border-color: #f0c040 !important;
}

.robart-select {
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f5f5f0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 40px !important;
}

.robart-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.robart-input::placeholder,
.robart-textarea::placeholder {
  color: #c5d8ee !important;
  opacity: 1 !important;
}

.robart-input:-webkit-autofill,
.robart-input:-webkit-autofill:hover,
.robart-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f0;
  -webkit-box-shadow: 0 0 0px 1000px #3d6fa0 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Errors */
.robart-field-error {
  display: none;
  font-size: 13px;
  color: #f0c040 !important;
  margin-top: -0.25em;
}

/* Field helpers */
.robart-field-description {
  font-size: 12px;
  color: #c5d8ee;
  font-style: italic;
  margin: -0.25em 0 0 0;
  line-height: 1.4;
}

/* Section intro (dynamic fields) */
.robart-section-intro {
  margin-bottom: 0.5em;
}

/* Checkbox group */
.robart-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em 1.5em;
  margin-top: 0.5em;
}

.robart-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #f5f5f0;
  font-weight: 400;
}

.robart-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #2e5a8a;
}

/* Budget row */
.robart-budget-row {
  display: flex;
  gap: 0.75em;
}

.robart-currency-select {
  width: 80px !important;
  flex-shrink: 0;
}

.robart-budget-input {
  flex: 1;
}

/* Delivery date + special requirements row */
.robart-deadline-row {
  display: flex;
  gap: 1em;
  align-items: flex-end;
}

.robart-deadline-row .robart-form-field--date {
  flex: 0 0 auto;
  width: 180px;
}

.robart-deadline-row .robart-form-field--requirements {
  flex: 1;
}

input[type="date"].robart-input {
  background: #3d6fa0 !important;
  color: #f5f5f0 !important;
  border: 2px solid #2e5a8a !important;
  border-radius: 8px !important;
  color-scheme: dark;
}

input[type="date"].robart-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* Item thumbnail link */
#book-page-link,
#plugin-page-link {
  margin-top: 1em;
  text-align: center;
}

.robart-item-thumb-link {
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.robart-item-thumb-link:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.robart-item-thumb {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* Notice box */
.robart-form-notice {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid #2e5a8a;
  border-radius: 4px;
  font-size: 14px;
  color: #c5cbd3;
  line-height: 1.5;
}

/* Dynamic fields */
#robart-dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

#robart-dynamic-fields .robart-form-field {
  animation: robart-slide-in 0.3s ease;
}

@keyframes robart-slide-in {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Submit */
.robart-form-submit {
  margin-top: 1em;
}

.robart-turnstile-container {
  margin-bottom: 1.5em;
  display: flex;
  justify-content: center;
}

.robart-turnstile-container .cf-turnstile-br {
  display: none;
}

.robart-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: #2e5a8a !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.robart-submit-btn:hover:not(.submitting) {
  background: #3d6fa0 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.robart-submit-btn.submitting {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Spinner */
.robart-spinner {
  width: 20px;
  height: 20px;
  animation: robart-spin 1s linear infinite;
}

.robart-spinner circle {
  stroke: currentColor;
  stroke-dasharray: 100;
  stroke-dashoffset: 25;
}

@keyframes robart-spin {
  to { transform: rotate(360deg); }
}

/* Messages */
.robart-form-messages {
  margin-top: 1em;
}

.robart-message {
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
  animation: robart-fade-in 0.3s ease;
}

.robart-success {
  background: rgba(76, 175, 80, 0.15);
  border: 2px solid #4CAF50;
  color: #a5d6a7;
}

.robart-error {
  background: rgba(231, 76, 60, 0.15);
  border: 2px solid #e74c3c;
  color: #ef9a9a;
}

@keyframes robart-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .robart-contact-form-container {
    padding: 1.5em;
    margin: 1em;
  }
  .robart-form-row {
    grid-template-columns: 1fr;
  }
  .robart-contact-form-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .robart-contact-form-container {
    padding: 1.25em;
  }
  .robart-input,
  .robart-select,
  .robart-textarea {
    padding: 10px 14px;
    font-size: 14px;
  }
}
