/* NINFLY Booking – Styles */

.ninfly-booking-root *,
.ninfly-booking-root *::before,
.ninfly-booking-root *::after {
  box-sizing: border-box;
}

.nb-wrap {
  --nb-bg:          #ffffff;
  --nb-border:      #e2e2e2;
  --nb-text:        #1a1a1a;
  --nb-muted:       #666666;
  --nb-accent:      #0a0a0a;
  --nb-accent-fg:   #ffffff;
  --nb-error:       #d32f2f;
  --nb-error-bg:    #fef2f2;
  --nb-warn-bg:     #fffbeb;
  --nb-warn-border: #f59e0b;
  --nb-success:     #166534;
  --nb-success-bg:  #f0fdf4;
  --nb-radius:      6px;
  --nb-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  font-family: var(--nb-font);
  color: var(--nb-text);
  max-width: 560px;
  width: 100%;
}

/* Loading */
.nb-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px 0;
  color: var(--nb-muted);
  font-size: 14px;
}

/* Spinner */
.nb-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--nb-border);
  border-top-color: var(--nb-accent);
  border-radius: 50%;
  animation: nb-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.nb-spinner--sm {
  width: 14px;
  height: 14px;
}
@keyframes nb-spin {
  to { transform: rotate(360deg); }
}

/* Error state */
.nb-error {
  padding: 16px;
  background: var(--nb-error-bg);
  border: 1px solid var(--nb-error);
  border-radius: var(--nb-radius);
  color: var(--nb-error);
  font-size: 14px;
}

/* Form */
.nb-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nb-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nb-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--nb-border);
  margin-top: 8px;
}

.nb-section-title:first-child {
  margin-top: 0;
}

.nb-section-note {
  font-size: 13px;
  color: var(--nb-muted);
  margin: -8px 0 0;
}

.nb-row {
  display: flex;
  gap: 12px;
}

.nb-row--2 > * {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .nb-row--2 {
    flex-direction: column;
  }
}

/* Field */
.nb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nb-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--nb-text);
}

.nb-field input,
.nb-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  font-size: 14px;
  font-family: var(--nb-font);
  color: var(--nb-text);
  background: var(--nb-bg);
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.nb-field 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='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.nb-field input:focus,
.nb-field select:focus {
  outline: none;
  border-color: var(--nb-accent);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.08);
}

.nb-field--error input,
.nb-field--error select {
  border-color: var(--nb-error);
}

.nb-field-error {
  font-size: 12px;
  color: var(--nb-error);
}

.nb-field-hint {
  font-size: 12px;
  color: var(--nb-muted);
}

/* Notices */
.nb-notice {
  padding: 12px 14px;
  border-radius: var(--nb-radius);
  font-size: 13px;
  line-height: 1.5;
}

.nb-notice--warn {
  background: var(--nb-warn-bg);
  border: 1px solid var(--nb-warn-border);
  color: #92400e;
}

.nb-notice--error {
  background: var(--nb-error-bg);
  border: 1px solid var(--nb-error);
  color: var(--nb-error);
  font-weight: 500;
}

/* Button */
.nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--nb-accent);
  color: var(--nb-accent-fg);
  border: none;
  border-radius: var(--nb-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--nb-font);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  align-self: flex-start;
  margin-top: 4px;
}

.nb-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.nb-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.nb-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Success */
.nb-success {
  padding: 32px 24px;
  background: var(--nb-success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--nb-radius);
  text-align: center;
}

.nb-success-icon {
  width: 48px;
  height: 48px;
  background: #166534;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}

.nb-success h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--nb-success);
}

.nb-success p {
  margin: 0 0 6px;
  font-size: 14px;
  color: #166534;
}

.nb-success-email {
  font-size: 13px;
  color: var(--nb-muted);
  margin-top: 12px !important;
}

/* Extra Fields Grid */
.nb-extra-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nb-extra-grid .nb-field--half {
  flex: 0 0 calc(50% - 6px);
  min-width: 0;
}

.nb-extra-grid .nb-field--full {
  flex: 0 0 100%;
}

@media (max-width: 480px) {
  .nb-extra-grid .nb-field--half {
    flex: 0 0 100%;
  }
}

.nb-field-info {
  font-size: 12px;
  color: var(--nb-muted);
  margin-top: -2px;
}

.nb-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  font-size: 14px;
  font-family: var(--nb-font);
  color: var(--nb-text);
  background: var(--nb-bg);
  resize: vertical;
  transition: border-color 0.15s;
}

.nb-field textarea:focus {
  outline: none;
  border-color: var(--nb-accent);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.08);
}

.nb-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nb-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nb-checkbox label {
  font-weight: 400;
  font-size: 14px;
}

.nb-submitting-hint {
  font-size: 13px;
  color: var(--nb-muted);
  margin: 0;
}
