/**
 * INES Sites – AI Landing Page Generator
 * Frontend styles for the [ines_generator] shortcode form
 */

/* ── Wrapper ── */
.ines-app-wrapper {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  max-width: 620px;
  margin: 48px auto;
  padding: 0 16px;
}

.ines-app-heading {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f3460;
  margin: 0 0 28px;
  letter-spacing: -0.5px;
}

/* ── Form ── */
.ines-gen-form {
  background: #fff;
  border: 1.5px solid #e8eaf0;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(15, 52, 96, 0.08);
}

.ines-field {
  margin-bottom: 22px;
  position: relative;
}

.ines-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.ines-field label span {
  color: #e94560;
}

.ines-field input,
.ines-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.ines-field input:focus,
.ines-field textarea:focus {
  outline: none;
  border-color: #0f3460;
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
  background: #fff;
}

.ines-field textarea {
  resize: vertical;
  min-height: 110px;
}

.ines-char-count {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.75rem;
  color: #9ca3af;
  pointer-events: none;
}

/* ── Submit Button ── */
.ines-btn-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0f3460, #16213e);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.ines-btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 52, 96, 0.35);
}

.ines-btn-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* ── Spinner ── */
.ines-spinner {
  animation: ines-spin 0.9s linear infinite;
}

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

/* ── Result Card ── */
.ines-result {
  margin-top: 28px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1.5px solid #6ee7b7;
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  animation: ines-slide-in 0.4s ease;
}

@keyframes ines-slide-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ines-result__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.ines-result h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #065f46;
  margin: 0 0 8px;
}

.ines-result p {
  color: #374151;
  margin: 0 0 20px;
}

.ines-result__link {
  display: inline-block;
  padding: 12px 28px;
  background: #059669;
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  word-break: break-all;
  margin-bottom: 16px;
  transition: background 0.2s, transform 0.15s;
}

.ines-result__link:hover {
  background: #047857;
  transform: translateY(-1px);
}

.ines-result__reset {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.ines-result__reset:hover {
  color: #374151;
}

/* ── Error Box ── */
.ines-error {
  margin-top: 20px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  padding: 16px 20px;
  color: #991b1b;
  font-size: 0.925rem;
  animation: ines-slide-in 0.3s ease;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .ines-gen-form {
    padding: 24px 20px;
  }

  .ines-result {
    padding: 28px 20px;
  }
}
