/*
 * mod_cscshop – card top-up (form 1) and data confirmation (form 2).
 * Visual design follows the "csc-2026" template; every colour/size falls back
 * to a built-in value so the module also looks right outside that template.
 */

.mod-cscshop {
  --cscshop-ink: var(--ink, #0a0a0b);
  --cscshop-ink-2: var(--ink-2, #3a3a40);
  --cscshop-muted: var(--muted, #6b6b73);
  --cscshop-line: var(--line, #e8e8e8);
  --cscshop-line-2: var(--line-2, #d9d9d9);
  --cscshop-row: #ededed;
  --cscshop-bg: var(--bg, #f5f5f5);
  --cscshop-card: var(--card, #fff);
  --cscshop-brand: var(--brand, #ff5330);
  --cscshop-grad: var(--grad, linear-gradient(135deg, #ff3030 0%, #ff5330 100%));
  --cscshop-grad-deco: var(--grad-deco, linear-gradient(225deg, #ff8000 0%, #ff3030 70%));
  --cscshop-err-bg: var(--err-bg, #fce1da);
  --cscshop-err-ink: var(--err-ink, #a3240f);
  --cscshop-req: #d9361c;
  --cscshop-radius: var(--radius, 16px);
  --cscshop-radius-sm: var(--radius-sm, 8px);
  --cscshop-radius-btn: var(--radius-btn, 6px);
  --cscshop-font: var(--font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);

  position: relative;
  box-sizing: border-box;
  max-width: 100%;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--cscshop-line);
  border-radius: var(--cscshop-radius);
  background: var(--cscshop-card);
  color: var(--cscshop-ink);
  font-family: var(--cscshop-font);
  font-size: 15px;
  line-height: 1.45;
}

.mod-cscshop *,
.mod-cscshop *::before,
.mod-cscshop *::after {
  box-sizing: border-box;
}

.mod-cscshop [hidden] {
  display: none !important;
}

.mod-cscshop .cscshop-title {
  margin: 0 0 8px;
  color: var(--cscshop-ink);
  font-family: var(--cscshop-font);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.mod-cscshop .cscshop-lead {
  max-width: 680px;
  margin: 0 0 12px;
  color: var(--cscshop-ink-2);
}

/* ---------- Table layout shared by both forms ---------- */

.mod-cscshop .cscshop-table {
  width: 100%;
  max-width: 680px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  color: var(--cscshop-ink);
  font-size: 15px;
}

.mod-cscshop .cscshop-table > tbody > tr > td {
  padding: 12px 12px 12px 0;
  border: 0;
  border-top: 1px solid var(--cscshop-row);
  background: transparent;
  line-height: 1.45;
  vertical-align: middle;
}

.mod-cscshop .cscshop-table > tbody > tr > td:last-child {
  padding-right: 0;
}

.mod-cscshop .cscshop-table > tbody > tr:first-child > td {
  border-top: 0;
}

.mod-cscshop .cscshop-table label {
  color: var(--cscshop-ink);
}

.mod-cscshop .cscshop-table h4 {
  margin: 0;
  color: var(--cscshop-ink);
  font-family: var(--cscshop-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.mod-cscshop .cscshop-label {
  width: 220px;
  font-weight: 500;
}

.mod-cscshop .cscshop-or {
  width: 44px;
  color: var(--cscshop-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.mod-cscshop .cscshop-req {
  color: var(--cscshop-req);
  font-weight: 600;
}

/* ---------- Fields ---------- */

.mod-cscshop input[type="text"],
.mod-cscshop input[type="email"],
.mod-cscshop select {
  width: 100%;
  max-width: 380px;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--cscshop-line-2);
  border-radius: var(--cscshop-radius-sm);
  background-color: #fff;
  box-shadow: none;
  color: var(--cscshop-ink);
  font-family: var(--cscshop-font);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mod-cscshop select {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B6B73'%3E%3Cpath d='M16.939 7.939 12 12.879l-4.939-4.94-2.122 2.122L12 17.121l7.061-7.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  cursor: pointer;
}

.mod-cscshop input[type="text"]:focus,
.mod-cscshop input[type="email"]:focus,
.mod-cscshop select:focus {
  border-color: var(--cscshop-brand);
  box-shadow: 0 0 0 3px rgba(255, 83, 48, 0.18);
  outline: none;
}

.mod-cscshop input::placeholder {
  color: #a0a0a8;
}

.mod-cscshop .cscshop-invalid {
  border-color: var(--cscshop-req) !important;
  box-shadow: 0 0 0 3px rgba(217, 54, 28, 0.14) !important;
}

.mod-cscshop input[type="checkbox"],
.mod-cscshop input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 6px;
  accent-color: var(--cscshop-brand);
  cursor: pointer;
  vertical-align: middle;
}

.mod-cscshop .cscshop-radio {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  margin: 2px 8px 2px 0;
  padding: 0 12px 0 14px;
  border: 1px solid var(--cscshop-line-2);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
}

.mod-cscshop .cscshop-radio:has(input:checked) {
  border-color: var(--cscshop-brand);
  box-shadow: 0 0 0 3px rgba(255, 83, 48, 0.14);
}

.mod-cscshop .cscshop-minimum h4 {
  text-align: center;
}

/* ---------- Invoice details ---------- */

.mod-cscshop .cscshop-invoice h4 {
  margin: 4px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.mod-cscshop .cscshop-invoice-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  border-radius: 12px;
  background: var(--cscshop-bg);
}

.mod-cscshop .cscshop-invoice-table td {
  padding: 8px 12px;
  border: 0;
  vertical-align: middle;
}

/* ---------- Notes, errors ---------- */

.mod-cscshop .cscshop-note > span {
  display: block;
  color: var(--cscshop-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.mod-cscshop .cscshop-table > tbody > tr > .cscshop-error-cell {
  padding: 12px 0;
  border-top: 0;
}

.mod-cscshop .cscshop-error {
  padding: 12px 16px;
  border: 1px solid #f4c3b6;
  border-radius: 10px;
  background: var(--cscshop-err-bg);
  color: var(--cscshop-err-ink);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Buttons (Papildyti / Grįžti / Apmokėti share one design) ---------- */

.mod-cscshop .cscshop-table > tbody > tr > .cscshop-actions {
  padding-top: 20px;
  border-top: 0;
  text-align: left;
}

.mod-cscshop .cscshop-pay-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.mod-cscshop .cscshop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: var(--cscshop-radius-btn);
  background: var(--cscshop-grad);
  box-shadow: 0 1px 0 rgba(10, 10, 11, 0.04);
  color: #fff;
  font-family: var(--cscshop-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.mod-cscshop .cscshop-btn:hover {
  box-shadow: 0 6px 18px rgba(255, 64, 48, 0.28);
  color: #fff;
  filter: brightness(1.06) saturate(1.05);
}

.mod-cscshop .cscshop-btn:active {
  transform: translateY(1px);
}

.mod-cscshop .cscshop-btn:focus-visible {
  outline: 2px solid var(--cscshop-brand);
  outline-offset: 2px;
}

.mod-cscshop .cscshop-btn[disabled] {
  background: #b5b5b5;
  box-shadow: none;
  cursor: default;
  filter: none;
}

.mod-cscshop .cscshop-btn--wide {
  min-width: 200px;
}

/* ---------- Decorative brand circle (wide screens only) ---------- */

@media (min-width: 1180px) {
  .mod-cscshop {
    min-height: 520px;
  }

  .mod-cscshop::before {
    content: "";
    position: absolute;
    top: 56px;
    right: 56px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--cscshop-grad-deco);
    pointer-events: none;
  }

  .mod-cscshop::after {
    content: "";
    position: absolute;
    top: 152px;
    right: 152px;
    width: 88px;
    height: 88px;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.103 0-2 .897-2 2v2h20V6c0-1.103-.897-2-2-2zM2 18c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2v-6H2v6zm3-3h6v2H5v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.103 0-2 .897-2 2v2h20V6c0-1.103-.897-2-2-2zM2 18c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2v-6H2v6zm3-3h6v2H5v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
  }

  .mod-cscshop > * {
    position: relative;
    z-index: 1;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .mod-cscshop {
    padding: 22px 18px;
  }

  .mod-cscshop .cscshop-title {
    font-size: 24px;
  }

  .mod-cscshop .cscshop-table,
  .mod-cscshop .cscshop-table > tbody {
    display: block;
  }

  .mod-cscshop .cscshop-table > tbody > tr {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--cscshop-row);
  }

  .mod-cscshop .cscshop-table > tbody > tr:first-child,
  .mod-cscshop .cscshop-table > tbody > tr:last-child {
    border-top: 0;
  }

  .mod-cscshop .cscshop-table > tbody > tr > td {
    display: block;
    width: auto;
    padding: 4px 0;
    border-top: 0;
  }

  .mod-cscshop .cscshop-table > tbody > tr > td[colspan],
  .mod-cscshop .cscshop-table > tbody > tr > td:last-child:not([colspan]) {
    grid-column: 1 / -1;
  }

  .mod-cscshop .cscshop-table > tbody > tr > td:first-child:not(.cscshop-or):not([colspan]) {
    padding-right: 8px;
  }

  .mod-cscshop .cscshop-table > tbody > tr > .cscshop-or {
    grid-column: 1 / -1;
    width: auto;
    padding: 0 0 4px;
    text-align: left;
  }

  .mod-cscshop .cscshop-label {
    width: auto;
  }

  .mod-cscshop input[type="text"],
  .mod-cscshop input[type="email"],
  .mod-cscshop select {
    max-width: none;
  }

  .mod-cscshop .cscshop-btn--wide {
    width: 100%;
  }

  .mod-cscshop .cscshop-pay-form .cscshop-btn {
    flex: 1 1 140px;
  }
}
