/**
 * Brewsta auth pages – matches Flutter sign-in look and feel.
 * Primary #FF6B22, heading #252422, muted #605D57, light gray #CCC5B9, off-white #FFFCFC.
 */

:root {
  --brewsta-primary: #FF6B22;
  --brewsta-heading: #252422;
  --brewsta-subheading: #403D39;
  --brewsta-muted: #605D57;
  --brewsta-light-gray: #CCC5B9;
  --brewsta-off-white: #FFFCFC;
}

/* Auth layout: full-height off-white background */
body.brewsta-auth-page {
  background-color: var(--brewsta-off-white) !important;
  min-height: 100vh;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Minimal onboarding header */
.brewsta-onboard-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--brewsta-light-gray);
  background-color: #ffffff;
}

.brewsta-onboard-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brewsta-onboard-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brewsta-onboard-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brewsta-onboard-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.brewsta-onboard-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brewsta-heading);
}

.brewsta-onboard-logo img {
  height: 56px;
  width: auto;
}

.brewsta-onboard-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--brewsta-subheading);
  white-space: nowrap;
}

.brewsta-onboard-logout-form {
  margin: 0;
}

.brewsta-onboard-logout {
  border: none;
  background: transparent;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: var(--brewsta-muted);
  cursor: pointer;
}

.brewsta-onboard-logout:hover {
  color: var(--brewsta-primary);
}

/* Auth card container – centered, max-width, responsive padding */
.brewsta-auth-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Onboarding panel for multi-step forms */
.brewsta-onboard-panel {
  background-color: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .brewsta-onboard-panel {
    padding-inline: 2rem;
  }
}

@media (min-width: 376px) {
  .brewsta-auth-card {
    padding: 2rem 1.5rem 2rem;
  }
}

@media (min-width: 576px) {
  .brewsta-auth-card {
    padding: 2rem 2.5rem 2.5rem;
    min-height: auto;
  }
}

/* Logo header – matches Flutter ~220px header with logo */
.brewsta-auth-logo-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}

.brewsta-auth-logo-header img {
  height: 160px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 376px) {
  .brewsta-auth-logo-header img {
    height: 180px;
  }
}

@media (min-width: 576px) {
  .brewsta-auth-logo-header img {
    height: 200px;
  }
}

/* Page title (e.g. "Login") */
.brewsta-auth-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--brewsta-heading);
  margin: 0 0 0.5rem;
}

/* Subtitle under title (e.g. \"Login into your Brewsta Shop Manager\") */
.brewsta-auth-subtitle {
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  color: var(--brewsta-muted);
  margin: 0 0 2rem;
  text-align: center;
}

/* Form groups */
.brewsta-auth-form .form-group,
.brewsta-auth-form .mb-4 {
  margin-bottom: 1.125rem;
}

.brewsta-auth-form label,
.brewsta-auth-form .jet-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  color: var(--brewsta-subheading);
  font-size: 1rem;
  margin-bottom: 0.25rem;
  display: block;
}

.brewsta-auth-form input[type="email"],
.brewsta-auth-form input[type="password"],
.brewsta-auth-form input[type="text"],
.brewsta-auth-form .form-control {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  color: var(--brewsta-heading);
  background: #fff;
  border: 1px solid var(--brewsta-light-gray);
  border-radius: 8px;
  min-height: 50px;
  box-sizing: border-box;
}

.brewsta-auth-form input:focus,
.brewsta-auth-form textarea:focus,
.brewsta-auth-form select:focus {
  border-color: var(--brewsta-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 34, 0.15);
}

.brewsta-auth-form input.is-invalid {
  border-color: #dc3545;
}

/* Menu selection step: accordions and checkboxes */
.brewsta-menu-section {
  margin-top: 1rem;
}

.brewsta-menu-panel .accordion-item {
  border: 1px solid var(--brewsta-light-gray);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.brewsta-menu-panel .accordion-button {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  color: var(--brewsta-heading);
  padding: 0.75rem 1.25rem;
}

.brewsta-menu-panel .accordion-button:not(.collapsed) {
  background-color: rgba(255, 107, 34, 0.04);
  color: var(--brewsta-heading);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

.brewsta-menu-panel .accordion-body {
  padding: 0.5rem 1.25rem 0.75rem;
}

.brewsta-menu-item-row + .brewsta-menu-item-row {
  margin-top: 0.25rem;
}

.brewsta-menu-item-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 0;
  font-family: 'Roboto', sans-serif;
  color: var(--brewsta-subheading);
}

.brewsta-menu-item-name {
  display: block;
  font-weight: 500;
}

.brewsta-menu-item-description {
  display: block;
  font-size: 0.85rem;
  color: var(--brewsta-muted);
  margin-top: 0.1rem;
}

@media (min-width: 992px) {
  .brewsta-menu-panel .accordion-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 0.5rem;
  }

  .brewsta-menu-item-row + .brewsta-menu-item-row {
    margin-top: 0;
  }
}

/* Prices step cards */
.brewsta-prices-panel .brewsta-price-product-card,
.brewsta-prices-panel .brewsta-price-option-card {
  background-color: rgba(255, 107, 34, 0.03);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem;
}

.brewsta-prices-panel .brewsta-price-product-card + .brewsta-price-product-card {
  margin-top: 0.75rem;
}

.brewsta-price-product-header,
.brewsta-price-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.brewsta-price-product-name,
.brewsta-price-option-name {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brewsta-heading);
  margin: 0;
}

.brewsta-price-apply-button {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.brewsta-price-sizes-row,
.brewsta-price-options-row {
  margin-top: 0.25rem;
}

.brewsta-price-size label,
.brewsta-price-option label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brewsta-muted);
}

/* Wrapper shrinks to input so no gap to right of spinner (Tailwind UI pattern) */
.brewsta-prices-panel .brewsta-price-input-wrap {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

/* Override form-control width so input is only as wide as value + spinner; no gap after spinner */
.brewsta-prices-panel .brewsta-price-input-wrap input[type="number"],
.brewsta-prices-panel .brewsta-price-size input[type="number"],
.brewsta-prices-panel .brewsta-price-option input[type="number"] {
  width: 6.25rem;
  min-width: 5rem;
  max-width: 100%;
  padding-right: 1.75rem;
  box-sizing: border-box;
}

@media (min-width: 768px) and (max-width: 991px) {
  .brewsta-prices-panel .brewsta-price-size,
  .brewsta-prices-panel .brewsta-price-option {
    min-width: 8rem;
  }
  .brewsta-prices-panel .brewsta-price-input-wrap input[type="number"] {
    width: 6.5rem;
    min-width: 5.5rem;
    padding-right: 1.75rem;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .brewsta-prices-panel .brewsta-price-options-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
    column-gap: 1rem;
    row-gap: 0.75rem;
  }

  .brewsta-prices-panel .brewsta-price-option label {
    white-space: nowrap;
  }
}

@media (min-width: 992px) {
  .brewsta-prices-panel .brewsta-price-options-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 0.75rem;
  }

  .brewsta-prices-panel .brewsta-price-option {
    min-width: 8rem;
  }

  .brewsta-prices-panel .brewsta-price-option input[type="number"] {
    min-width: 6rem;
  }
}

.brewsta-menu-panel input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--brewsta-light-gray);
  background-color: #ffffff;
  display: inline-block;
  position: relative;
}

.brewsta-menu-panel input[type="checkbox"]:checked {
  background-color: var(--brewsta-primary);
  border-color: var(--brewsta-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3 8.5 6.5 12 13 4' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.brewsta-menu-panel input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 34, 0.18);
  border-color: var(--brewsta-primary);
}

/* Small primary buttons inside onboarding panels (e.g. Apply times, Add service) */
.brewsta-onboard-panel .btn-primary {
  background-color: var(--brewsta-primary);
  border-color: var(--brewsta-primary);
}

.brewsta-onboard-panel .btn-primary:hover {
  background-color: #e55f1a;
  border-color: #e55f1a;
}

.brewsta-onboard-panel .btn-primary:active,
.brewsta-onboard-panel .btn-primary:focus {
  background-color: #e55f1a;
  border-color: #e55f1a;
  box-shadow: 0 0 0 3px rgba(255, 107, 34, 0.18);
}

/* Checkbox & switch overrides within Brewsta forms */
.brewsta-auth-form .form-check-input:checked {
  background-color: var(--brewsta-primary);
  border-color: var(--brewsta-primary);
}

.brewsta-auth-form .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 34, 0.15);
  border-color: var(--brewsta-primary);
}

/* Primary button – orange, white text, rounded */
.brewsta-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--brewsta-primary);
  border: none;
  border-radius: 36px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.brewsta-btn-primary:hover {
  background-color: #e55f1a;
  color: #fff;
}

.brewsta-btn-primary:active {
  opacity: 0.95;
}

/* Secondary button – light gray (e.g. Create account, Google) */
.brewsta-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brewsta-heading);
  background-color: #fff;
  border: 1px solid var(--brewsta-light-gray);
  border-radius: 36px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.brewsta-btn-secondary:hover {
  background-color: #f5f3f0;
  border-color: var(--brewsta-light-gray);
  color: var(--brewsta-heading);
}

.brewsta-btn-google {
  background-color: #fff;
  color: var(--brewsta-heading);
}

/* Link row: Forgot password? / Reset link */
.brewsta-auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.brewsta-auth-links .muted {
  color: var(--brewsta-muted);
  font-family: 'Roboto', sans-serif;
}

.brewsta-auth-links a.link-primary {
  color: var(--brewsta-primary);
  font-weight: 500;
  text-decoration: underline;
}

.brewsta-auth-links a.link-primary:hover {
  color: #e55f1a;
}

/* Remember me checkbox */
.brewsta-auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9375rem;
  color: var(--brewsta-muted);
}

.brewsta-auth-remember input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--brewsta-primary);
}

/* Password field wrapper and toggle */
.brewsta-password-wrapper {
  position: relative;
}

.brewsta-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--brewsta-muted);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brewsta-password-toggle:focus-visible {
  outline: 2px solid var(--brewsta-primary);
  outline-offset: 2px;
}

.brewsta-password-toggle[aria-pressed="true"] {
  color: var(--brewsta-primary);
}

/* Divider text (e.g. "Don't have an account?") */
.brewsta-auth-divider {
  text-align: center;
  color: var(--brewsta-muted);
  font-size: 0.9375rem;
  margin: 1.5rem 0 1rem;
}

/* Filled secondary button variant (e.g. Create account – Brewsta grey) */
.brewsta-btn-secondary-gray {
  background-color: var(--brewsta-light-gray);
  border-color: var(--brewsta-light-gray);
}

.brewsta-btn-secondary-gray:hover {
  background-color: #b7afa2;
  border-color: #b7afa2;
}

/* Button stack spacing */
.brewsta-auth-actions .brewsta-btn-primary,
.brewsta-auth-actions .brewsta-btn-secondary {
  margin-bottom: 1rem;
}

.brewsta-auth-actions .brewsta-btn-primary:last-child,
.brewsta-auth-actions .brewsta-btn-secondary:last-child {
  margin-bottom: 0;
}

/* Validation errors */
.brewsta-auth-form .text-danger,
.brewsta-auth-form .jet-input-error {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.brewsta-auth-form .alert {
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
}

/* Google button icon */
.brewsta-google-icon {
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
  object-fit: contain;
}

/* Inline action row for multiple buttons (e.g. verify + resend) */
.brewsta-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.brewsta-inline-actions form {
  margin: 0;
}

/* Touch-friendly minimum sizes (iPhone, Android, tablet) */
@media (max-width: 768px) {
  .brewsta-btn-primary,
  .brewsta-btn-secondary {
    min-height: 48px;
  }
  .brewsta-auth-form .form-control,
  .brewsta-auth-form input[type="email"],
  .brewsta-auth-form input[type="password"],
  .brewsta-auth-form input[type="text"] {
    min-height: 48px;
  }

  .brewsta-inline-actions {
    flex-direction: column;
  }

  .brewsta-inline-actions .brewsta-btn-primary,
  .brewsta-inline-actions .brewsta-btn-secondary {
    width: 100%;
  }
}

/* Pricing hero section for future subscriptions */
.brewsta-pricing-section {
  position: relative;
  background-color: var(--brewsta-off-white);
  color: var(--brewsta-heading);
  padding: 3rem 1.5rem;
}

@media (min-width: 640px) {
  .brewsta-pricing-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.brewsta-pricing-inner {
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

.brewsta-pricing-kicker {
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brewsta-primary);
}

.brewsta-pricing-title {
  margin-top: 0.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--brewsta-heading);
}

@media (min-width: 640px) {
  .brewsta-pricing-title {
    font-size: 2.75rem;
  }
}

.brewsta-pricing-subtitle {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  font-size: 1.05rem;
  color: var(--brewsta-muted);
}

.brewsta-pricing-grid {
  margin: 3rem auto 0;
  max-width: 64rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .brewsta-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.brewsta-pricing-card {
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--brewsta-light-gray);
  padding: 2rem;
  text-align: left;
  color: var(--brewsta-heading);
}

.brewsta-pricing-card--primary {
  background: radial-gradient(
      circle at top left,
      rgba(255, 107, 34, 0.09),
      #ffffff
  );
  border-color: var(--brewsta-primary);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.brewsta-pricing-card-title {
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brewsta-primary);
}

.brewsta-pricing-card-price {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brewsta-pricing-card-price-main {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--brewsta-primary);
}

.brewsta-pricing-card-price-suffix {
  font-size: 0.95rem;
  color: #9ca3af;
}

.brewsta-pricing-card-copy {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--brewsta-subheading);
}

.brewsta-pricing-card-features {
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--brewsta-subheading);
}

.brewsta-pricing-card-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brewsta-pricing-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background-color: rgba(255, 107, 34, 0.15);
  color: var(--brewsta-primary);
}

.brewsta-pricing-footer {
  margin-top: 3rem;
  text-align: center;
}

.brewsta-pricing-footer p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #d1d5db;
}

/* Breadcrumb tweaks for onboarding */
.brewsta-breadcrumb {
  margin-bottom: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
}

.brewsta-breadcrumb li a {
  color: var(--brewsta-muted);
}

.brewsta-breadcrumb-active a {
  color: var(--brewsta-primary) !important;
  font-weight: 600;
}

/* Terms & Conditions styling in onboarding */
.brewsta-onboard-terms-label {
  color: var(--brewsta-muted);
  font-size: 0.9rem;
}

.brewsta-onboard-terms-label a {
  color: var(--brewsta-primary);
  font-weight: 500;
}

/* Brewsta stepper */
.brewsta-stepper-wrapper {
  max-width: 64rem;
  margin: 1.5rem auto 2rem;
  padding-inline: 1.25rem;
}

.brewsta-stepper-kicker {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: var(--brewsta-muted);
  margin: 0 0 0.75rem;
}

.brewsta-stepper-kicker span {
  color: var(--brewsta-primary) !important;
  font-weight: 600;
}

/* Extra specificity to ensure current step label is always Brewsta orange */
.brewsta-stepper-wrapper .brewsta-stepper-kicker span {
  color: var(--brewsta-primary) !important;
}

.brewsta-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brewsta-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.brewsta-step-circle {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2px solid var(--brewsta-light-gray);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #ffffff;
  color: var(--brewsta-muted);
}

.brewsta-step-label {
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  color: var(--brewsta-muted);
}

.brewsta-step-divider {
  width: 1.5rem;
  height: 2px;
  background-color: var(--brewsta-light-gray);
}

.brewsta-step--completed .brewsta-step-circle {
  border-color: var(--brewsta-primary);
  background-color: rgba(255, 107, 34, 0.12);
  color: var(--brewsta-primary);
}

.brewsta-step--completed .brewsta-step-label {
  color: var(--brewsta-heading);
}

.brewsta-step--current .brewsta-step-circle {
  border-color: var(--brewsta-primary);
  background-color: var(--brewsta-primary);
  color: #ffffff;
}

.brewsta-step--current .brewsta-step-label {
  color: var(--brewsta-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .brewsta-stepper {
    gap: 0.25rem;
  }

  .brewsta-step-label {
    font-size: 0.75rem;
  }
}
