/* Default styles */

/* An author display rule beats the hidden attribute, which several pages rely
   on to keep a section out of view until the client decides otherwise. */
[hidden] {
  display: none !important;
}

:root {
  --primary-color: #b2e0eb;
  --secondary-color: #8ec09a;
  --private-color: #f4706e;
  --button-border-color: #5e9a6b;
  --third-color: #fff;
  --text-color: #1a1a1a;
  --background-color: #fff;
  --max-width-screen: 256px;
  --max-width-responsive: 128px;
  --band-h: 52px;
}

body, html {
  min-height: 100%;
  margin: 0;
  color: var(--text-color);
}

/* One family per script, so every locale renders with the same metrics. */
body {
  font-family: 'Noto Sans', sans-serif;
  padding-bottom: 5rem;
}

hr {
  border: none; 
  height: 2px; 
  background-color: var(--secondary-color);
  margin: 20px auto;
  width: 50%;
}

.page-container {
  margin-top: calc(75px + var(--offline-bar-h, 0px)); /* space to avoid to be hidden behind the band */
  justify-content: center;
  align-items: center;
}

.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.3;
  z-index: 20;
}

.offline-bar b {
  margin-right: 6px;
}

.page-content {
  text-align: center;
}

.settings-btn {
  position: fixed;
  top: calc(75px + var(--offline-bar-h, 0px));
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.settings-btn:hover {
  background: var(--primary-color);
  color: var(--text-color);
  transform: rotate(30deg);
}

.settings-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: fill 0.3s;
}

.responsive-img {
  border-radius: 10px;
  width: var(--max-width-screen);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

h2 {
  color: var(--text-color);
  margin-top: 0;
}

label {
  font-weight: bold;
}

.block-form {
  max-width: var(--max-width-screen);
  margin: 0 auto;
}

/* Two fields sharing one line. The children keep their own width, so the row
   only decides that they sit beside each other rather than under. */
.block-row {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* A block row read from the start edge, at the standard page content width. */
.block-row-start {
  box-sizing: border-box;
  width: 50%;
  margin-inline: auto;
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--secondary-color);
}

.block-row-start > .block-message {
  order: 1;
  flex-basis: 100%;
  margin: 0;
}

.block-row .block-form {
  margin: 0;
}

.table-form {
  margin: 20px auto;
  width: 50%;
}

/* The way back from a page reached from another. The arrow stands alone: the
   page it returns to is the one just left, so naming it would say nothing. */
.back-row {
  text-align: start;
  width: 50%;
  margin: 0 auto 4px;
}

.back-link {
  display: inline-block;
  color: var(--text-color);
  font-size: 2em;
  line-height: 1;
  text-decoration: none;
  padding: 2px 6px;
}

.back-link:hover {
  opacity: 0.7;
}

/* Right to left, back is the other way round. */
[dir="rtl"] .back-link {
  transform: scaleX(-1);
}

input[type="text"] {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], input[type="datetime-local"],
input[type="time"], textarea, select {
  font-size: 16px;
}

input[type="email"], input[type="password"] {
  width: 90%;
  padding: 8px;
  margin: 8px 0;
  border: 1px solid var(--secondary-color);
  border-radius: 6px;
}

input[type="submit"] {
  background-color: var(--secondary-color);
  color: var(--text-color);
  padding: 10px 20px;
  border: 2px solid var(--button-border-color);
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
}

input[type="submit"]:hover {
  opacity: 0.9;
}

input[type="submit"]:disabled {
  background-color: var(--primary-color);
}

.plain-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.plain-fieldset:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button {
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: 2px solid var(--button-border-color);
  border-radius:10px;
  padding: 8px 16px;
  display: inline-block;
  font-family: inherit;
  font-size: 0.875rem;
  text-decoration: none;
  text-align: center;
}

.button:hover {
  cursor: pointer;
  opacity: 0.9;
}

.button:disabled{
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.button--block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.75rem;
  font-weight: bold;
}

.refresh {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.refresh[hidden] {
  display: none;
}

.refresh svg {
  width: 16px;
  height: 16px;
}

.refresh.spinning svg {
  animation: spin 0.7s linear infinite;
}

.tab {
  box-sizing: border-box;
  width: 50%;            /* match .table-form, the standard page content width */
  margin: 20px auto 0;   /* center like other page blocks, flush to panel below */
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: var(--primary-color);
}
.tab button {
  background-color: inherit;
  color: var(--text-color);
  float: left;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}
.tab button:hover {
  background-color: var(--secondary-color);
  opacity: 0.5;
}
.tab button.active {
  background-color: var(--secondary-color);
  color: var(--text-color);
}
.tabcontent {
  box-sizing: border-box;
  width: 50%;            /* align panel exactly under the tab bar */
  margin: 0 auto 20px;
  display: none;
  padding: 6px 12px;
  border-top: none;
}
/* table fills the panel instead of re-applying the 50% block width (would be 25%) */
.tabcontent .table-form {
  width: auto;
  margin: 10px 0;
}
 
/* Dropdown for small screens (hidden by default) */
.tab-select {
  box-sizing: border-box;
  width: 50%;
  margin: 20px auto;
  display: none;
  padding: 12px;
  font-size: 16px;
  background-color: var(--primary-color);
  border: 1px solid #ccc;
}
 
/* On small screens: hide the button bar, show the dropdown */
@media screen and (max-width: 750px) {
  .tab { display: none; }
  .tab-select { display: block; width: calc(100% - 32px); }
  .tabcontent { width: calc(100% - 32px); }
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-width-screen);
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: none;
  border-radius: 10px;
  padding: 10px 40px 10px 16px;
  font-size: 16px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b2e0eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

/* A select that fills the column it sits in. The width lives here rather than on
   the tag: a form holds several and they have to agree, and a select is sized by
   its widest option unless it is told otherwise. */
.select-block {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-width-screen);
}

.submit-spaced {
  margin-top: 10px;
}

.forgot-link {
  font-size: small;
  text-align: right;
}

.error-message {
  color: red;
  width: max-content;
  max-width: 100%;
}

.error-message--own-line {
  display: block;
  width: auto;
  margin-top: 10px;
  text-align: center;
}

/* Something to be read before acting. The band down its side and the ground
   behind it carry the warning, so the wording does not have to shout. */
.note-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 50%;            /* match .tab and .table-form, the standard page content width */
  margin: 12px auto;
  padding: 10px 12px;
  text-align: start;
  border-inline-start: 4px solid #e8a33d;
  border-radius: 4px;
  background-color: #fdf6e7;
  font-size: 0.9em;
}

/* What the buyer pays and what is left to pay, read down the start edge at the
   standard page content width. */
.fee-summary {
  box-sizing: border-box;
  width: 50%;
  margin: 12px auto;
  padding: 12px 16px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
}

.fee-summary table {
  width: 100%;
  border-collapse: collapse;
}

.fee-summary td {
  padding: 4px 0;
  text-align: start;
}

.fee-summary td:last-child {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.fee-summary .fee-struck td:last-child {
  text-decoration: line-through;
}

.fee-summary .fee-off td:last-child {
  color: #2f7d4f;
}

.fee-summary .fee-total td {
  border-top: 1px solid var(--secondary-color);
  font-weight: 700;
}

.fee-summary .fee-total:first-child td {
  border-top: none;
}

/* The steps of a note, one per line rather than run together in a paragraph. */
.note-steps {
  margin: 0;
  padding-inline-start: 18px;
  text-align: start;
  list-style-type: disc;
}

.note-steps li {
  width: auto;
  margin: 2px 0;
}

.einvoice-choice {
  text-align: start;
}

.einvoice-choice ul {
  text-align: start;
  list-style-type: disc;
  padding-inline-start: 20px;
  margin: 4px 0;
}

.einvoice-choice li {
  width: auto;
  margin: 4px 0;
}

.block-message.install-steps {
  width: fit-content;
  max-width: calc(100% - 32px);
}

.install-steps ol {
  padding-inline-start: 20px;
  margin: 4px 0;
}

.install-steps li {
  width: auto;
  margin: 4px 0;
}

/* A message the page owns rather than one field: the standard page content
   width, so it lines up with .note-warning and .tab instead of wrapping inside
   the narrow .block-form a field message belongs in. */
.block-message {
  display: block;
  box-sizing: border-box;
  width: 50%;
  margin: 12px auto;
  text-align: start;
}

/* The fields of a block, read down the start edge at the standard page content
   width rather than centred in a narrow column. Only the inline margin is set,
   so a block that joins the one above it keeps its own vertical spacing. */
.block-fields {
  box-sizing: border-box;
  width: 50%;
  margin-inline: auto;
  text-align: start;
}

/* A checkbox and the wording it agrees to: the box on the start edge, the text
   beside it rather than under it, at the standard page content width. */
.block-check {
  box-sizing: border-box;
  width: 50%;
  margin: 8px auto;
  text-align: start;
}

.block-check label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* Nudged down to sit on the middle of the first line, which is where the box
   stays when a narrow page wraps the wording under itself. */
.block-check input[type="checkbox"] {
  flex: none;
  margin: 0.3em 0 0;
}

.terms-box {
  box-sizing: border-box;
  width: 50%;
  margin: 0 auto 12px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
}

.note-info {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 50%;
  margin: 12px auto;
  padding: 10px 12px;
  text-align: start;
  border-inline-start: 4px solid #3d8fe8;
  border-radius: 4px;
  background-color: #e8f2fd;
  font-size: 0.9em;
}

.note-info::before {
  content: "\2139";
  color: #1b5fb8;
  font-size: 1.15em;
  line-height: 1.2;
}

.note-warning::before {
  content: "\26A0";
  color: #b8791b;
  font-size: 1.15em;
  line-height: 1.2;
}

/* A field the form is waiting on: ringed rather than recoloured, so the ring
   sits outside the box and the field keeps the look every other field has. */
.field-invalid {
  outline: 2px solid red;
  outline-offset: 2px;
  border-radius: 4px;
}

.info-message {
  color:  var(--text-color);
}

.band {
  position: fixed;
  top: var(--offline-bar-h, 0px); /* Adjusted to position the band at the top */
  left: 0;
  width: 100%; /* Full width of the screen */
  height: var(--band-h);
  padding: 0 15px;
  background-color: var(--primary-color); /* Set background color to light grey */
  box-sizing: border-box; /* Include padding in width calculation */
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  z-index: 10;
}

.title {
  flex-grow: 1;
  text-align: center;
}

.band-logo {
  display: none;
  height: 4.5rem;
  width: auto;
  margin-block: -1.25rem;
}

.band-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.band-login {
  color: var(--text-color);
  text-decoration: none;
  white-space: nowrap;
}

.account-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  box-sizing: border-box;
  border-radius: 50%;
  border: 3px solid transparent;
  background-color: var(--background-color);
  overflow: hidden;
}

.account-menu img {
  width: 85%;
  height: auto;
}

.account-menu--guest {
  background-color: transparent;
}

.account-menu--internal {
  border-color: var(--secondary-color);
}

.account-menu--private {
  border-color: var(--private-color);
}

.title a,
.title a:visited,
.title a:hover,
.title a:active,
.title a:focus {
    text-decoration: none;
    color: var(--text-color);
}

/* Burger icon */
.burger {
  justify-self: start;
  width: 30px;
  height: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger span {
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
  display: block;
}

.menu {
  position: fixed;
  top: calc(var(--band-h) + var(--offline-bar-h, 0px));
  background: var(--primary-color);
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
  overflow: hidden;
  width: max-content;
  max-height: 0;
  transition: max-height 0.28s ease;
  z-index: 9998; 
}

.menu a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.menu a:hover {
  opacity: 0.9;
}

.menu .menu-login {
  display: none;
}

#toggle:checked ~ .menu {
  max-height: calc(100vh - var(--band-h) - var(--offline-bar-h, 0px));
  overflow-y: auto;
}

/* Language submenu */
.menu-lang-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-lang-trigger::after {
  content: '▾';
  margin-inline-start: 20px;
  transition: transform 0.2s;
}

#lang-toggle:checked ~ .menu .menu-lang-trigger::after {
  transform: rotate(180deg);
}

.menu-lang-sub {
  max-height: 0;
  overflow-y: hidden;
  transition: max-height 0.2s ease;
}

#lang-toggle:checked ~ .menu .menu-lang-sub {
  max-height: 220px;
  overflow-y: auto;
}

.menu-lang-item {
  display: block;
  width: 100%;
  padding-block: 8px;
  padding-inline: 20px 36px;
  color: inherit;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: start;
  box-sizing: border-box;
  transition: opacity 0.15s ease;
}

.menu-lang-item:hover {
  opacity: 0.9;
}

.menu-lang-active {
  font-weight: bold;
}

.menu-group-trigger {
  font-weight: normal;
}

.menu-sub {
  max-height: 0;
  overflow-y: hidden;
  transition: max-height 0.2s ease;
}

.menu-sub-toggle:checked + .menu-lang-trigger::after {
  transform: rotate(180deg);
}

.menu-sub-toggle:checked + .menu-lang-trigger + .menu-sub {
  max-height: 220px;
}

.menu .menu-sub a {
  padding-inline: 36px 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.label {
  margin-top: 20px;
  font-size: 18px;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--secondary-color);
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

input:focus + .slider {
    box-shadow: 0 0 2px var(--secondary-color);
  }

/* Rounded style */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.remember-me {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 90%;
  margin: 6px auto;
  font-size: small;
  font-weight: normal;
  cursor: pointer;
}

.remember-me .switch {
  width: 44px;
  height: 24px;
}

.remember-me .slider:before {
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
}

.remember-me input:checked + .slider:before {
  transform: translateX(20px);
}

.code-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.code-field .select-input,
.code-field input[type="text"],
.block-row-start > .button {
  height: 40px;
}

.code-field .select-input,
.code-field input[type="text"] {
  width: 220px;
  margin: 0;
}

.code-field input[type="text"] {
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 16px;
}

.code-switch {
  flex-basis: 100%;
  width: auto;
  margin: 0;
}

ul {
  padding: 0; 
  margin: 0; 
  text-align: center;
  list-style-type: none;

}

li {
  width: 100%;
}

.toggle-link {
  margin-top: 15px;
  cursor: pointer;
  color: var(--text-color);
  text-decoration: underline;
  display: block;
}

.rules {
  width: max-content;
  max-width: 100%;
  text-align: start;
  margin: 10px 0;
  font-size: 0.85em;
}

.rules p {
  margin: 4px 0;
  color: gray;
}

.rules-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: normal;
}

.rules-check input[type="checkbox"] {
  flex: none;
  margin: 0;
}

.rules p.valid {
  color: green;
  font-weight: bold;
}

/* Loader overlay */
#loader {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(2px);
  text-align: center;
}

/* A class rather than an inline style, so the CSP needs no unsafe-inline for it. */
.loader-message {
  margin-top: 20px;
  font-weight: bold;
}

.spinner {
  margin-top: 200px;
  width: 60px; height: 60px;
  border: 6px solid var(--primary-color);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* The hand-off back to the mobile app. Its spinner shows the moment the page opens,
   where the overlay loader above starts hidden and waits to be launched: here the
   wait is the whole page, and it should look like one continuous pause between
   paying and the app reopening. */
.handoff-wait {
  text-align: center;
}

.waiting-back {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  padding: 16px 20px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-color);
  text-decoration: none;
}

.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid var(--primary-color);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal .modal-content {
  background: var(--background-color);
  border: 3px solid var(--primary-color);
  padding: 20px;
  margin: 15% auto;
  width: 50%;
  min-width: 300px;
  max-width: calc(100% - 24px);
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  border-radius: 8px;
  text-align: center;
}

#confirmModalBody,
#fileAloneBody {
  white-space: pre-line;
}

.modal .modal-content .button {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.modal .modal-content input:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 0;
}

.modal .modal-address {
  margin: 8px 0 16px;
  line-height: 1.4;
}

.modal #companySearchList {
  max-height: 40vh;
  overflow-y: auto;
}

.modal .modal-company {
  border-top: 1px solid var(--secondary-color);
  padding: 12px 0;
}

.modal .modal-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.modal .modal-actions input[type="submit"] {
  margin-top: 0;
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: 10px;
}

.event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 20px;
}

.event-chip {
  border: 2px solid var(--secondary-color);
  border-radius: 999px;
  background: var(--third-color);
  color: var(--text-color);
  padding: 6px 16px;
  cursor: pointer;
}

.event-chip--active {
  background: var(--secondary-color);
  color: var(--text-color);
}

.data-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.data-list li {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--secondary-color);
  padding-top: 5px;
  padding-bottom: 5px;
}

.data-list li[data-empty]:not([hidden]) {
  display: block;
  text-align: center;
}

.data-list li.header {
  font-weight: bold;
  background: var(--secondary-color);
  color: var(--text-color);
}

.data-list li.active {
  background-color: var(--primary-color);
  font-weight: bold;
}

.data-list button {
  margin-inline-start: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* RTL overrides */
[dir="rtl"] .settings-btn {
  right: unset;
  left: 20px;
}

[dir="rtl"] .menu {
  left: unset;
  right: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 6px;
}

[dir="rtl"] .slider:before {
  left: unset;
  right: 4px;
}

[dir="rtl"] input:checked + .slider:before {
  transform: translateX(-26px);
}

[dir="rtl"] .remember-me .slider:before {
  right: 3px;
}

[dir="rtl"] .remember-me input:checked + .slider:before {
  transform: translateX(-20px);
}

[dir="rtl"] body {
  font-size: 1.05em;
  line-height: 1.8;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: var(--max-width-screen);
  margin: 12px auto 0;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #888;
  font-size: small;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #ccc;
}

.oauth-icons-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 16px;
}

.oauth-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  text-decoration: none;
  background-color: var(--primary-color);
}

.oauth-icon-btn:hover {
  opacity: 0.85;
  background-color: var(--secondary-color);
}

@media screen and (max-width: 750px), (hover: none) {
  :root {
    --band-h: 62px;
  }

  .band-login {
    display: none;
  }

  .menu .menu-login {
    display: block;
  }

  .band .title a {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
  }

  .responsive-img {
    display: none;
  }
}

@media screen and (max-width: 750px) {
  .title {
    flex: auto;
  }

  .block-form {
    /* max-width: var(--max-width-responsive); */
    max-width: 75%;
    margin: 0 auto;
  }

  .block-row {
    flex-direction: column;
    align-items: center;
  }

  .block-row-start {
    align-items: flex-start;
  }

  .block-row-start > .block-message {
    order: 0;
    flex-basis: auto;
  }

  .block-row-start > .button {
    align-self: center;
  }

  .back-row,
  .note-warning,
  .note-info,
  .block-message,
  .block-check,
  .terms-box,
  .block-fields,
  .block-row-start,
  .fee-summary {
    width: calc(100% - 32px);
  }

  hr {
    border: none; 
    height: 2px; 
    background-color: var(--secondary-color);
    margin: 20px auto;
    width: calc(100% - 32px);
  }

  .table-form {
    margin: 20px auto;
    width: calc(100% - 32px);
  }
}

/* === PWA Install Banner === */
.pwa-banner {
  position: fixed;
  bottom: -160px;
  left: 0;
  right: 0;
  background: var(--primary-color);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.18);
  border-radius: 16px 16px 0 0;
  padding: 14px 16px 18px;
  z-index: 1000;
  transition: bottom 0.35s ease;
}

.pwa-banner--visible {
  bottom: 0;
}

.pwa-banner__body {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-right: 28px;
}

.pwa-banner__text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 0;
}

.pwa-banner__ios-hint {
  font-size: 0.85rem;
  width: 100%;
  line-height: 1.5;
}

.pwa-banner__share-icon {
  font-size: 1.1em;
  vertical-align: middle;
  display: inline-block;
  animation: pwa-bounce 1.4s ease infinite;
}

@keyframes pwa-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.pwa-banner__dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  color: inherit;
  line-height: 1;
}

/* === Social media footer === */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 15px;
  text-align: center;
  border-top: 1px solid rgba(0, 117, 213, 0.15);
  background-color: var(--primary-color);
  transition: transform 0.7s ease, opacity 0.7s ease;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  row-gap: 8px;
}

.site-footer--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.social-footer {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.social-footer a {
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.social-footer a:hover {
  opacity: 1;
  transform: scale(1.1);
}

.social-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-legal {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: flex-end;
}

.footer-privacy {
  font-size: 0.85rem;
  color: var(--text-color);
}

@media (max-width: 600px) {
  .site-footer {
    grid-template-columns: 1fr;
  }

  .social-footer,
  .footer-legal {
    grid-column: 1;
    justify-self: center;
  }
}

.legal-text {
  text-align: start;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.legal-text ul,
.legal-text ol {
  margin: 0.5em 0;
  padding-inline-start: 1.5rem;
  text-align: start;
}

.legal-text ul {
  list-style-type: disc;
}

.legal-text ol {
  list-style-type: decimal;
}

.legal-text li {
  width: auto;
}