/* MyBank.pl - Darmowe komponenty i Generator Widgetów 2026 */
.mbw-page {
  --mbw-ink: #142139;
  --mbw-muted: #5d6c81;
  --mbw-line: #e2e8f0;
  --mbw-blue: #265de8;
  --mbw-bg-soft: #f6f9ff;
  color: var(--mbw-ink);
  max-width: 1220px;
  margin: 0 auto 36px;
}

.mbw-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--mbw-muted);
  margin: 8px 0 14px;
}

.mbw-breadcrumbs a {
  color: var(--mbw-blue);
  font-weight: 600;
  text-decoration: none;
}

.mbw-breadcrumbs a:hover {
  text-decoration: underline;
}

.mbw-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  margin: 0 0 20px;
  background: #f8fafc;
  border: 1px solid var(--mbw-line);
  border-radius: 12px;
  font-size: 14px;
}

.mbw-subnav-label {
  font-weight: 700;
  color: var(--mbw-ink);
  margin-right: 4px;
}

.mbw-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d5dfec;
  color: #1e3557;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mbw-subnav a:hover,
.mbw-subnav a.is-active {
  background: var(--mbw-blue);
  border-color: var(--mbw-blue);
  color: #fff;
}

.mbw-hero {
  background: linear-gradient(135deg, #f3f8ff 0%, #ffffff 65%, #f6faff 100%);
  border: 1px solid #d7e3f4;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

.mbw-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem);
  color: var(--mbw-ink);
}

.mbw-hero p {
  margin: 0;
  color: #42536b;
  font-size: 15px;
  line-height: 1.65;
  max-width: 820px;
}

.mbw-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mbw-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a6d;
  background: #eaf1ff;
  border: 1px solid #cdddfb;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Builder grid */
.mbw-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 32px;
}

.mbw-panel {
  background: #fff;
  border: 1px solid var(--mbw-line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 12px 32px -24px rgba(20, 33, 57, 0.35);
}

.mbw-preview-col {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mbw-step {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf2f7;
}

.mbw-step:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.mbw-step-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mbw-ink);
  margin: 0 0 10px;
}

.mbw-seg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mbw-seg-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mbw-seg-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mbw-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #d4dfed;
  border-radius: 11px;
  background: #f8fafd;
  color: #243b5e;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mbw-choice-btn small {
  font-size: 11px;
  font-weight: 400;
  color: var(--mbw-muted);
}

.mbw-choice-btn:hover {
  border-color: #8fb0ee;
  background: #f0f6ff;
}

.mbw-choice-btn.is-active {
  background: #eef4ff;
  border-color: var(--mbw-blue);
  color: #1644b8;
  box-shadow: 0 0 0 2px rgba(38, 93, 232, 0.14);
}

.mbw-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mbw-preset-btn {
  padding: 5px 10px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
  color: #2c466d;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mbw-preset-btn:hover {
  border-color: var(--mbw-blue);
  color: var(--mbw-blue);
}

.mbw-cur-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 185px;
  overflow-y: auto;
  padding: 2px 0;
}

.mbw-cur-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  color: #1f3351;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.mbw-cur-chip img {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
}

.mbw-cur-chip.is-selected {
  background: var(--mbw-blue);
  border-color: var(--mbw-blue);
  color: #fff;
}

.mbw-cur-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mbw-calc-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mbw-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #465a75;
  margin-bottom: 4px;
}

.mbw-input-group input[type="number"],
.mbw-input-group input[type="text"],
.mbw-input-group select {
  width: 100%;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--mbw-ink);
}

.mbw-colors-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mbw-color-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #4a5e78;
}

.mbw-color-item input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.mbw-sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.mbw-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mbw-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fafcff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mbw-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--mbw-blue);
}

.mbw-reset-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.mbw-btn-ghost {
  padding: 7px 12px;
  border: 1px solid #d4dfed;
  border-radius: 9px;
  background: #fff;
  color: #415673;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mbw-btn-ghost:hover {
  background: #f1f5f9;
}

/* Preview box */
.mbw-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.mbw-preview-bar h2 {
  margin: 0;
  font-size: 16px;
  color: var(--mbw-ink);
}

.mbw-preview-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mbw-mini-btn {
  padding: 4px 9px;
  border: 1px solid #d4dfed;
  border-radius: 7px;
  background: #f8fafc;
  color: #364b68;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.mbw-mini-btn.is-active {
  background: #142139;
  border-color: #142139;
  color: #fff;
}

.mbw-stage {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  transition: background 0.15s ease;
}

.mbw-stage.is-bg-dark {
  background: #0b1120;
  border-color: #334155;
}

.mbw-stage.is-bg-gray {
  background: #e2e8f0;
}

.mbw-page button:focus-visible,
.mbw-page input:focus-visible,
.mbw-page select:focus-visible,
.mbw-page textarea:focus-visible,
.mbw-page a:focus-visible {
  outline: 2px solid var(--mbw-blue);
  outline-offset: 2px;
}

.mbw-choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #e2e8f0;
  box-shadow: none;
}

.mbw-choice-btn:disabled:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.mbw-cur-search {
  width: 100%;
  height: 36px;
  padding: 6px 11px;
  margin-bottom: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--mbw-ink);
  font: inherit;
  font-size: 13px;
}

.mbw-selected-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mbw-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #bfd3fb;
  color: #1644b8;
  font-size: 12px;
  font-weight: 700;
}

.mbw-order-pill button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(22, 68, 184, 0.1);
  color: #1644b8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.mbw-order-pill button:hover:not(:disabled) {
  background: var(--mbw-blue);
  color: #fff;
}

.mbw-order-pill button:disabled {
  opacity: 0.3;
  cursor: default;
}

.mbw-chip-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.mbw-color-item.is-disabled {
  opacity: 0.45;
}

.mbw-color-item.is-disabled input {
  cursor: not-allowed;
}

.mbw-switch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mbw-copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

a.mbw-btn-ghost {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.mbw-stage.is-transparent-grid {
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.mbw-stage.is-bg-dark.is-transparent-grid {
  background-color: #0b1120;
  background-image:
    linear-gradient(45deg, #1e293b 25%, transparent 25%),
    linear-gradient(-45deg, #1e293b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1e293b 75%),
    linear-gradient(-45deg, transparent 75%, #1e293b 75%);
}

.mbw-stage-inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  transition: width 0.15s ease;
}

#mbwPreviewTarget {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Code output */
.mbw-code-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mbw-code-tab {
  padding: 6px 11px;
  border: 1px solid #d4dfed;
  border-radius: 8px;
  background: #f8fafc;
  color: #324865;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mbw-code-tab.is-active {
  background: var(--mbw-blue);
  border-color: var(--mbw-blue);
  color: #fff;
}

.mbw-code-note {
  font-size: 12px;
  color: var(--mbw-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.mbw-code-area {
  width: 100%;
  min-height: 118px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

.mbw-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.mbw-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: var(--mbw-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mbw-copy-btn:hover {
  background: #1a49c7;
}

.mbw-copy-btn.is-copied {
  background: #15803d;
}

.mbw-copy-status {
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
}

/* Hub grid (index.php) */
.mbw-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.mbw-hub-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--mbw-line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 26px -22px rgba(20, 33, 57, 0.35);
}

.mbw-hub-card--wide {
  grid-column: 1 / -1;
}

.mbw-hub-card h2 {
  margin: 0;
  font-size: 19px;
  color: var(--mbw-ink);
}

.mbw-hub-card p {
  margin: 0;
  font-size: 14px;
  color: var(--mbw-muted);
  line-height: 1.55;
}

.mbw-hub-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
}

.mbw-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--mbw-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mbw-cta-link:hover {
  background: #1a49c7;
  color: #fff;
}

/* Content / SEO sections */
.mbw-section {
  margin: 28px 0;
}

.mbw-section h2 {
  font-size: 21px;
  color: var(--mbw-ink);
  margin: 0 0 14px;
}

.mbw-usecases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mbw-usecase-card {
  background: #f8fafd;
  border: 1px solid var(--mbw-line);
  border-radius: 14px;
  padding: 16px;
}

.mbw-usecase-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--mbw-ink);
}

.mbw-usecase-card p {
  margin: 0;
  font-size: 13px;
  color: #4c5e77;
  line-height: 1.55;
}

.mbw-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mbw-howto-card {
  background: #fff;
  border: 1px solid var(--mbw-line);
  border-radius: 14px;
  padding: 16px;
}

.mbw-howto-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mbw-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.mbw-howto-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--mbw-ink);
}

.mbw-howto-card p {
  margin: 0;
  font-size: 13px;
  color: #4c5e77;
  line-height: 1.55;
}

.mbw-faq details {
  border: 1px solid var(--mbw-line);
  border-radius: 11px;
  margin-bottom: 9px;
  background: #fff;
  overflow: hidden;
}

.mbw-faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--mbw-ink);
  list-style: none;
}

.mbw-faq summary::-webkit-details-marker {
  display: none;
}

.mbw-faq summary::after {
  content: "+";
  float: right;
  color: var(--mbw-blue);
  font-size: 18px;
  line-height: 1;
}

.mbw-faq details[open] summary::after {
  content: "–";
}

.mbw-faq details[open] summary {
  border-bottom: 1px solid var(--mbw-line);
}

.mbw-faq details p {
  margin: 0;
  padding: 13px 16px;
  font-size: 14px;
  color: #465872;
  line-height: 1.65;
}

.mbw-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--mbw-line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 24px;
  font-size: 13px;
  color: #4b5d76;
}

.mbw-byline img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d4e3f5;
}

.mbw-compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--mbw-line);
  border-radius: 14px;
  background: #fff;
}

.mbw-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.mbw-compare-table th {
  background: #f4f7fb;
  color: var(--mbw-ink);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--mbw-line);
  white-space: nowrap;
}

.mbw-compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #3a4c66;
  vertical-align: top;
}

.mbw-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.mbw-compare-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 980px) {
  .mbw-builder,
  .mbw-hub-grid {
    grid-template-columns: 1fr;
  }
  .mbw-preview-col {
    display: contents;
    position: static;
  }
  #mbwPreviewPanel {
    order: -1;
  }
  #mbwConfigPanel {
    order: 1;
  }
  #mbwCodePanel {
    order: 2;
  }
  .mbw-usecases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mbw-seg-grid--3,
  .mbw-seg-grid--4,
  .mbw-calc-opts,
  .mbw-colors-grid,
  .mbw-sliders-grid,
  .mbw-switches,
  .mbw-steps-grid,
  .mbw-usecases {
    grid-template-columns: 1fr;
  }
}
