/* OKKwork — popup привязки банковской карты */

.okkwork-balance-link-card-popup {
  position: fixed;
  inset: 0;
  z-index: 102210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.okkwork-balance-link-card-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.okkwork-balance-link-card-popup__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.okkwork-balance-link-card-popup__dialog {
  position: relative;
  width: min(100%, 480px);
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(6, 88, 162, 0.14);
  box-shadow: 0 24px 56px rgba(6, 88, 162, 0.18);
  padding: 24px 24px 20px;
  box-sizing: border-box;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.28s ease;
  font-family: "Rubik", "Segoe UI", system-ui, sans-serif;
}

.okkwork-balance-link-card-popup.is-open .okkwork-balance-link-card-popup__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.okkwork-balance-link-card-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(6, 88, 162, 0.08);
  color: rgba(6, 88, 162, 1);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.okkwork-balance-link-card-popup__close:hover {
  background: rgba(6, 88, 162, 0.14);
}

.okkwork-balance-link-card-popup__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-right: 28px;
}

.okkwork-balance-link-card-popup__head-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(6, 88, 162, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.okkwork-balance-link-card-popup__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: #0658a2;
}

.okkwork-balance-link-card-popup__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(72, 87, 101, 0.82);
}

.okkwork-balance-link-card-popup__field {
  display: block;
  margin-bottom: 14px;
}

.okkwork-balance-link-card-popup__row {
  display: flex;
  gap: 12px;
}

.okkwork-balance-link-card-popup__field--half {
  flex: 1;
  min-width: 0;
}

.okkwork-balance-link-card-popup__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(72, 87, 101, 0.9);
}

.okkwork-balance-link-card-popup__field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(6, 88, 162, 0.18);
  border-radius: 10px;
  background: rgba(217, 217, 217, 0.35);
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: rgba(72, 87, 101, 1);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.okkwork-balance-link-card-popup__field input::placeholder {
  color: rgba(72, 87, 101, 0.45);
  font-weight: 400;
}

.okkwork-balance-link-card-popup__field input:hover {
  border-color: rgba(6, 88, 162, 0.28);
}

.okkwork-balance-link-card-popup__field input:focus {
  outline: none;
  border-color: rgba(6, 88, 162, 0.75);
  box-shadow: 0 0 0 3px rgba(6, 88, 162, 0.12);
  background: #fff;
}

.okkwork-balance-link-card-popup__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 12px;
  cursor: pointer;
  user-select: none;
}

.okkwork-balance-link-card-popup__consent input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.okkwork-balance-link-card-popup__consent-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 4px;
  border: 1.5px solid rgba(6, 88, 162, 0.35);
  background: #fff;
  position: relative;
}

.okkwork-balance-link-card-popup__consent input:checked + .okkwork-balance-link-card-popup__consent-box {
  background: #0658a2;
  border-color: #0658a2;
}

.okkwork-balance-link-card-popup__consent input:checked + .okkwork-balance-link-card-popup__consent-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.okkwork-balance-link-card-popup__consent-text {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(72, 87, 101, 0.88);
}

.okkwork-balance-link-card-popup__secure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(6, 88, 162, 0.06);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(72, 87, 101, 0.78);
}

.okkwork-balance-link-card-popup__secure-icon {
  flex-shrink: 0;
  line-height: 1;
}

.okkwork-balance-link-card-popup__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.okkwork-balance-link-card-popup__btn {
  min-width: 132px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.okkwork-balance-link-card-popup__btn--ghost {
  background: rgba(6, 88, 162, 0.08);
  color: #0658a2;
}

.okkwork-balance-link-card-popup__btn--ghost:hover {
  background: rgba(6, 88, 162, 0.14);
}

.okkwork-balance-link-card-popup__btn--primary {
  background: #0658a2;
  color: #fff;
  text-transform: uppercase;
}

.okkwork-balance-link-card-popup__btn--primary:hover {
  background: rgba(5, 72, 130, 1);
}

.okkwork-balance-link-card-popup__success {
  text-align: center;
  padding: 12px 8px 4px;
}

.okkwork-balance-link-card-popup__success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(17, 188, 32, 0.14);
  color: #11bc20;
  font-size: 28px;
  font-weight: 700;
  line-height: 52px;
}

.okkwork-balance-link-card-popup__success-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0658a2;
}

.okkwork-balance-link-card-popup__success-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(72, 87, 101, 0.82);
}

body.okkwork-balance-link-card-popup-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .okkwork-balance-link-card-popup {
    padding: 12px;
  }

  .okkwork-balance-link-card-popup__dialog {
    padding: 20px 16px 16px;
  }

  .okkwork-balance-link-card-popup__row {
    flex-direction: column;
    gap: 0;
  }

  .okkwork-balance-link-card-popup__actions {
    flex-direction: column-reverse;
  }

  .okkwork-balance-link-card-popup__btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .okkwork-balance-link-card-popup,
  .okkwork-balance-link-card-popup__dialog {
    transition: none;
  }
}
