/* AI Children's Books frontend styles */

/* Form base styles */
.acb-book-form-wrapper {
  margin-bottom: 30px;
}

.acb-book-form {
  position: relative;
  box-sizing: border-box;
}

/* Override default WordPress styling */
.acb-book-form input[type="text"],
.acb-book-form select,
.acb-book-form textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all form elements have consistent margins */
.acb-book-form > div {
  margin-bottom: 15px;
}

/* Status display */
.acb-status {
  min-height: 2em;
}

/* Error messages */
.acb-error {
  padding: 0.75em 1em;
  background-color: #ffecec;
  border-left: 4px solid #f44336;
  margin-bottom: 1em;
}

.acb-warning {
  padding: 0.75em 1em;
  background-color: #fffaec;
  border-left: 4px solid #ffb74d;
  margin-bottom: 1em;
}

/* Download button */
.acb-download-link {
  display: inline-block;
  margin: 1em 0;
  padding: 0.8em 1.5em;
  background-color: #38f;
  color: white !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.acb-download-link:hover {
  background-color: #26a;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.acb-download-link:active {
  transform: translateY(0);
}

/* Progress bar styles */
.acb-progress {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}

.acb-progress::-webkit-progress-bar {
  background-color: #f0f0f0;
}

.acb-progress::-webkit-progress-value {
  background-color: #38f;
  transition: width 0.3s ease;
}

.acb-progress::-moz-progress-bar {
  background-color: #38f;
  transition: width 0.3s ease;
}

/* Spinner animation */
.acb-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top-color: #38f;
  border-radius: 50%;
  animation: acbspin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes acbspin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  .acb-book-form input[type="text"],
  .acb-book-form select,
  .acb-book-form textarea,
  .acb-book-form input[type="file"] {
    font-size: 16px; /* Prevent zooming on mobile */
    padding: 10px 8px;
  }
  
  .acb-book-form button[type="submit"] {
    width: 100%;
    padding: 12px;
  }
}

/* Editor-specific styles */
.acb-book-form-editor input,
.acb-book-form-editor select,
.acb-book-form-editor textarea,
.acb-book-form-editor button {
  pointer-events: none;
}