.pbw {
  font-family: Montserrat, Arial, sans-serif;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  overflow: visible;
}

.pbw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .pbw-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
  }
}

.pbw-col {
  display: grid;
  gap: 14px;
}

.pbw-row {
  position: relative;
}

.pbw-row label {
  display: block;
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 6px 0;
  font-weight: 600;
}

.pbw-row input,
.pbw-row select,
.pbw-row textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f6f7f8;
  padding: 12px;
  outline: none;
}

.pbw-row input:focus,
.pbw-row select:focus,
.pbw-row textarea:focus {
  border-color: #89b6f6;
  box-shadow: 0 0 0 2px rgba(137, 182, 246, 0.25);
  background: #fff;
}

.pbw-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.pbw-actions button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  color: #fff;
  background: var(--pbw-primary, #6f8de6);
  transition: transform .06s ease, opacity .15s ease;
}

.pbw-actions button:hover { opacity: .95; background: var(--pbw-primary-hover, var(--pbw-primary, #6f8de6)); }
.pbw-actions button:active { transform: translateY(1px); }
.pbw-actions button:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.pbw-msg {
  min-height: 18px;
  font-weight: 700;
}

.pbw-msg.ok {
  color: #166534;
  background: rgba(22,101,52,.08);
  border: 1px solid rgba(22,101,52,.18);
  padding: 10px 12px;
  border-radius: 10px;
}

.pbw-msg.err {
  color: #991b1b;
  background: rgba(153,27,27,.07);
  border: 1px solid rgba(153,27,27,.18);
  padding: 10px 12px;
  border-radius: 10px;
}

.pbw-inline-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pbw-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.55);
  border-top-color: #fff;
  animation: pbwSpin .9s linear infinite;
}

.pbw-spinner-dark {
  border: 2px solid rgba(107,114,128,.35);
  border-top-color: #6b7280;
}

@keyframes pbwSpin {
  to { transform: rotate(360deg); }
}

.pbw-cal {
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  background: #f6f8fb;
  padding: 14px;
  border: 1px solid #e5e7eb;
}

.pbw-cal-disabled {
  opacity: .55;
  pointer-events: none;
}

.pbw-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, var(--pbw-grad-from, #471A57), var(--pbw-grad-to, #842E92));
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.pbw-cal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.pbw-cal-icon { font-size: 18px; }
.pbw-cal-text { font-size: 16px; }

.pbw-cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pbw-cal-month {
  min-width: 140px;
  text-align: center;
  font-weight: 800;
}

.pbw-cal-btn {
  width: 38px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.pbw-cal-week,
.pbw-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 6px;
}

.pbw-cal-week {
  padding-bottom: 10px;
  color: #0f172a;
  font-weight: 700;
  opacity: .75;
}

.pbw-day {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 2px solid transparent;
  user-select: none;
}

.pbw-day-empty { visibility: hidden; }

.pbw-day-open {
  background: #66a84a;
  color: #fff;
  cursor: pointer;
}

.pbw-day-closed,
.pbw-day-neutral {
  background: #c45a4c;
  color: #fff;
  cursor: not-allowed;
}

.pbw-day-neutral {
  background: #e5e7eb;
  color: #64748b;
  opacity: .85;
}

.pbw-day-disabled {
  background: #e5e7eb;
  color: #64748b;
  cursor: not-allowed;
  opacity: .7;
}

.pbw-day-selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15,23,42,.15);
}

.pbw-cal-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

.pbw-datebox {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f6f7f8;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.pbw-datebox:focus {
  border-color: #89b6f6;
  box-shadow: 0 0 0 2px rgba(137,182,246,.25);
}

.pbw-datebox-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.pbw-cal-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 9999;
  width: min(420px, calc(100vw - 24px));
}

.pbw-cal-popover .pbw-cal {
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
  animation: pbwPopIn .14s ease-out;
}

@keyframes pbwPopIn {
  from { transform: translateY(-6px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 520px) {
  .pbw {
    padding: 16px 12px;
  }

  .pbw-cal-popover {
    width: calc(100vw - 24px);
    left: 0;
  }

  .pbw-day {
    width: clamp(34px, 11.5vw, 44px);
    height: clamp(34px, 11.5vw, 44px);
    font-size: 14px;
  }

  .pbw-cal {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .pbw-cal-week,
  .pbw-cal-grid {
    gap: 6px;
    padding: 4px;
  }

  .pbw-cal-month {
    min-width: 0;
  }

  .pbw-cal-btn {
    width: 34px;
    height: 32px;
    font-size: 20px;
  }

  .pbw-day {
    width: clamp(30px, 12vw, 40px);
    height: clamp(30px, 12vw, 40px);
  }
}

.pbw-consent {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pbw-consent-card {
  width: min(720px, 100%);
  background: #ffffff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 28px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
}

.pbw-consent-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.pbw-consent-logo img {
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.pbw-consent-logoText {
  font-weight: 900;
  font-size: 18px;
  color: #111827;
}

.pbw-consent-title {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 900;
  color: #111827;
}

.pbw-consent-subtitle {
  font-size: 14px;
  color: #6b7280;
  font-weight: 700;
  margin-bottom: 18px;
}

.pbw-consent-list {
  display: grid;
  gap: 12px;
  justify-content: center;
  text-align: left;
  max-width: 460px;
  margin: 0 auto 18px auto;
}

.pbw-consent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #374151;
}

.pbw-consent-terms {
	color: #842E92;
}

.pbw-consent-item a {
  color: #471A57;
  font-weight: 900;
  text-decoration: underline;
}

.pbw-consent-btn {
  width: min(220px, 100%);
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  color: #fff;
  background: var(--pbw-primary, #6f8de6);
}

.pbw-consent-msg {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #991b1b;
}

@media (max-width: 520px) {
  .pbw-consent-card {
    padding: 22px 16px;
  }
  .pbw-consent-title {
    font-size: 22px;
  }
}


/* --- Success buttons (configurable) --- */
.pbw-btn-link{
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 900;
  text-decoration: underline;
  color: var(--pbw-primary, #6f8de6);
  cursor: pointer;
}
.pbw-btn-copy,
.pbw-btn-secondary,
.pbw-btn-primary{
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(15,23,42,.08);
}
.pbw-btn-copy{
  background:#e5e7eb;
  color:#111827;
}
.pbw-btn-secondary{
  background:#ffffff;
  color:#111827;
}
.pbw-btn-primary{
  border:0;
  color:#fff;
  background: var(--pbw-primary, #6f8de6);
}
.pbw-btn-primary:hover{
  background: var(--pbw-primary-hover, var(--pbw-primary, #6f8de6));
}

/* --- Consent link colors (configurable) --- */
.pbw-consent-link-terms{
  font-weight: 900;
  color: var(--pbw-terms-link-terms, #471A57);
}
.pbw-consent-link-privacy{
  font-weight: 900;
  color: var(--pbw-terms-link-privacy, #471A57);
}
.pbw-consent-link-gdpr{
  font-weight: 900;
  color: var(--pbw-terms-link-gdpr, #471A57);
}

/* --- Submit button gradient (configurable) --- */
.pbw-actions button{
  background: linear-gradient(135deg,
    var(--pbw-submit-from, var(--pbw-primary, #6f8de6)) 0%,
    var(--pbw-submit-to, var(--pbw-primary, #6f8de6)) 100%);
}
.pbw-actions button:hover{
  opacity: 1;
  background: linear-gradient(135deg,
    var(--pbw-submit-from-hover, var(--pbw-primary-hover, var(--pbw-primary, #6f8de6))) 0%,
    var(--pbw-submit-to-hover, var(--pbw-primary-hover, var(--pbw-primary, #6f8de6))) 100%);
}
