/**
 * PromptEye – Compact Form Styles
 * Prefix: pe-
 * Wersja: 1.0.1
 */

/* ── Inline card (template-special-service-aio i inne templaty) ──────────────── */
.prompteye-inline-wrap .ai-modal {
  max-width: 1200px;
  margin: 0 auto;
  transform: none !important;
  animation: none !important;
  max-height: none !important;
  overflow: clip !important;
  width: 100%;
  box-sizing: border-box;
}

.prompteye-inline-wrap .ai-modal-graphic {
  min-height: 400px;
  /* desktop: left panel – round left corners */
  border-radius: 24px 0 0 24px;
}

@media (max-width: 768px) {
  .prompteye-inline-wrap .ai-modal-graphic {
    /* mobile: top panel – round top corners */
    border-radius: 24px 24px 0 0;
  }
}

/* ── Button hover animation (CSS replica of Webflow IX2) ────────────────────── */
.pe-submit-visual {
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
}

.pe-submit-visual .btn-text {
  white-space: nowrap;
}

.pe-submit-visual .btn-hover-bg {
  display: none !important;
}

/* Container dla przycisku – bez ucinania overflow */
.pe-form-wrap .button-group {
  overflow: visible;
}

.prompteye-inline-card {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.pe-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 0.5rem 0;
}

/* ── Sekcja inline (single-service / inne templaty) ─────────────────────────── */
.prompteye-section-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.prompteye-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.prompteye-section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  line-height: 1.25;
}

.prompteye-section-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

/* ── Wrapper ────────────────────────────────────────────────────────────────── */
.pe-form-wrap {
  width: 100%;
}

/* ── Form layout ─────────────────────────────────────────────────────────────── */
.pe-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Two-column row (country + language) */
.pe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ── Field wrapper ───────────────────────────────────────────────────────────── */
.pe-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ── Label ───────────────────────────────────────────────────────────────────── */
.pe-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1 !important;
}

.pe-required {
  color: #7c3aed;
  margin-left: 1px;
}

/* ── Input / Select ──────────────────────────────────────────────────────────── */
.pe-input,
.pe-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
  line-height: 1.4;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.pe-select {
  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 d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.pe-input:focus,
.pe-select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.pe-input::placeholder {
  color: #9ca3af;
  font-size: 0.82rem;
}

/* ── Submit button ───────────────────────────────────────────────────────────── */
.pe-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.15s ease;
  margin-top: 0.25rem;
  line-height: 1;
}

.pe-submit:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}

.pe-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ─────────────────────────────────────────────────────────────────── */
.pe-submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pe-spin 0.6s linear infinite;
  flex-shrink: 0;
}

.pe-submit--loading .pe-submit-spinner {
  display: inline-block;
}

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

/* ── Messages ────────────────────────────────────────────────────────────────── */
.pe-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-radius: 10px;
  margin-top: 0.5rem;
}

.pe-message p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.pe-message svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.pe-message--success {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #166534;
}

.pe-message--success svg {
  stroke: #16a34a;
}

.pe-message--error {
  background: #fff7f7;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.pe-message--error svg {
  stroke: #dc2626;
}

/* ── Hidden utility ──────────────────────────────────────────────────────────── */
[hidden] {
  display: none !important;
}

/* ── Inline field validation errors ─────────────────────────────────────────── */
.pe-input--error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.pe-field-error {
  font-size: 0.72rem;
  color: #dc2626;
  margin: 0;
  line-height: 1.3;
}

/* ── Responsive: very narrow containers ─────────────────────────────────────── */
@media (max-width: 400px) {
  .pe-row {
    grid-template-columns: 1fr;
  }
}
