/* Superbooker – Light Theme */

:root {
  --sb-bg: #f9fafb;
  --sb-surface: #ffffff;
  --sb-text: #1f2937;
  --sb-muted: #6b7280;
  --sb-border: #e5e7eb;

  --sb-primary: #2563eb;
  --sb-primary-600: #1d4ed8;
  --sb-primary-contrast: #ffffff;

  --sb-success: #10b981;
  --sb-error: #ef4444;
  --sb-notice: #f59e0b;

  --sb-space-1: 0.25rem;
  --sb-space-2: 0.5rem;
  --sb-space-3: 0.75rem;
  --sb-space-4: 1rem;
  --sb-space-5: 1.25rem;
  --sb-space-6: 1.5rem;

  --sb-radius: 12px;
  --sb-radius-sm: 8px;
  --sb-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
  --sb-shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Containers */
.superbooker-form,
.superbooker-provider {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  color: var(--sb-text);
  background: var(--sb-surface);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius);
  box-shadow: var(--sb-shadow);
  padding: clamp(1rem, 3vw, 1.5rem);
  margin: clamp(1rem, 3vw, 2rem) auto;
  max-width: 840px;
}

.superbooker-provider {
  max-width: 1000px;
}

.superbooker-form h3,
.superbooker-provider h3 {
  margin: 0 0 var(--sb-space-4);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.superbooker-provider section + section {
  margin-top: var(--sb-space-6);
  padding-top: var(--sb-space-4);
  border-top: 1px solid var(--sb-border);
}

/* Notices */
.superbooker-error,
.superbooker-success,
.superbooker-notice {
  padding: var(--sb-space-3) var(--sb-space-4);
  border-radius: var(--sb-radius-sm);
  border: 1px solid var(--sb-border);
  margin: 0 0 var(--sb-space-4);
  background: #fff;
}

.superbooker-error {
  border-left: 4px solid var(--sb-error);
  background: #fef2f2;
}

.superbooker-success {
  border-left: 4px solid var(--sb-success);
  background: #ecfdf5;
}

.superbooker-notice {
  border-left: 4px solid var(--sb-notice);
  background: #fffbeb;
}

/* Forms */
.superbooker-form form,
.superbooker-provider form {
  display: grid;
  gap: var(--sb-space-4);
}

.superbooker-form label,
.superbooker-provider label {
  display: grid;
  gap: var(--sb-space-2);
  font-weight: 500;
}

/* Inline checkbox label alignment (e.g., Zárva) */
.superbooker-provider .sb-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: var(--sb-space-2);
  font-weight: 500;
}

.superbooker-form input[type="text"],
.superbooker-form input[type="email"],
.superbooker-form input[type="password"],
.superbooker-form input[type="date"],
.superbooker-form input[type="time"],
.superbooker-form input[type="number"],
.superbooker-form select,
.superbooker-form textarea,
.superbooker-provider input[type="text"],
.superbooker-provider input[type="email"],
.superbooker-provider input[type="password"],
.superbooker-provider input[type="date"],
.superbooker-provider input[type="time"],
.superbooker-provider input[type="number"],
.superbooker-provider select,
.superbooker-provider textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--sb-border);
  box-sizing: border-box;
  border-radius: 10px;
  background: #fff;
  color: var(--sb-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.superbooker-form textarea,
.superbooker-provider textarea {
  min-height: 100px;
  resize: vertical;
}

.superbooker-form input:focus,
.superbooker-form select:focus,
.superbooker-form textarea:focus,
.superbooker-provider input:focus,
.superbooker-provider select:focus,
.superbooker-provider textarea:focus {
  outline: none;
  border-color: var(--sb-primary);
  box-shadow: var(--sb-shadow-focus);
}

/* Fieldsets for grouped choices */
.superbooker-form fieldset {
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-sm);
  padding: var(--sb-space-3);
  background: #fff;
}

.superbooker-form fieldset legend {
  padding: 0 var(--sb-space-2);
  font-weight: 600;
  color: var(--sb-muted);
}

.superbooker-form fieldset label {
  display: flex;
  align-items: center;
  gap: var(--sb-space-2);
  font-weight: 400;
}

/* Checkbox helpers */
.superbooker-form input[type="checkbox"],
.superbooker-provider input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--sb-primary);
}

/* Disclaimer box */
.superbooker-disclaimer {
  border: 1px dashed var(--sb-border);
  border-radius: var(--sb-radius-sm);
  background: #fff;
  padding: var(--sb-space-3);
  color: var(--sb-muted);
}

.superbooker-disclaimer p {
  margin: 0 0 var(--sb-space-2);
}

/* Buttons */
.superbooker-form button,
.superbooker-provider button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  background: var(--sb-primary);
  color: var(--sb-primary-contrast);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
  justify-self: start;
}

.superbooker-form button:hover,
.superbooker-provider button:hover {
  background: var(--sb-primary-600);
}

.superbooker-form button:active,
.superbooker-provider button:active {
  transform: translateY(1px);
}

.superbooker-provider .button-link-delete,
.superbooker-form .button-link-delete {
  background: transparent;
  color: var(--sb-error);
  border: 1px solid transparent;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
}

.superbooker-provider .button-link-delete:hover,
.superbooker-form .button-link-delete:hover {
  background: #fef2f2;
}

/* Inline form rows (e.g., services/availability adders) */
.sb-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sb-space-3);
  align-items: end;
  margin-bottom: 1rem;
}

.sb-inline button {
  justify-self: end;
}

/* Lists */
.superbooker-provider ul,
.superbooker-form ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sb-space-2);
}

.superbooker-provider li,
.superbooker-form li {
  padding: var(--sb-space-2) var(--sb-space-3);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-sm);
  background: #fff;
}

/* Tables (provider dashboard, admin-ish tables on frontend) */
.superbooker-provider table,
.superbooker-form table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-sm);
  overflow: hidden;
}

.superbooker-provider table thead th,
.superbooker-form table thead th {
  background: var(--sb-bg);
  color: var(--sb-muted);
  text-align: left;
  font-weight: 600;
  padding: 0.75rem;
  border-bottom: 1px solid var(--sb-border);
}

.superbooker-provider table td,
.superbooker-form table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--sb-border);
  vertical-align: top;
}

.superbooker-provider table tr:nth-child(odd) td,
.superbooker-form table tr:nth-child(odd) td {
  background: #fff;
}

.superbooker-provider table tr:nth-child(even) td,
.superbooker-form table tr:nth-child(even) td {
  background: #fcfcfd;
}

/* Selects — show custom dropdown arrows */
.superbooker-form select,
.superbooker-provider select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px 8px;
  padding-right: 2rem; /* space for arrow */
}

.superbooker-form select:focus,
.superbooker-provider select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Disabled button state */
.superbooker-form button[disabled],
.superbooker-provider button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Small helpers */
.superbooker-form .help,
.superbooker-provider .help {
  color: var(--sb-muted);
  font-size: 0.875rem;
}

.superbooker-form .sr-only,
.superbooker-provider .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .superbooker-form,
  .superbooker-provider {
    padding: var(--sb-space-4);
    border-radius: 10px;
  }
  .superbooker-provider table thead {
    display: none;
  }
  .superbooker-provider table,
  .superbooker-provider table tbody,
  .superbooker-provider table tr,
  .superbooker-provider table td {
    display: block;
    width: 100%;
  }
  .superbooker-provider table tr {
    margin-bottom: var(--sb-space-3);
  }
  .superbooker-provider table td {
    border: none;
    border-bottom: 1px solid var(--sb-border);
  }
  .superbooker-provider table td:last-child {
    border-bottom: none;
  }
}
