.gift-photo-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gift-photo-choice {
  align-items: center;
  background: #f5f5f5;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #212121;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 600;
  justify-content: center;
  min-height: 64px;
  padding: 14px 18px;
  text-align: center;
}

.gift-photo-choice:hover,
.gift-photo-choice-selected {
  background: #e9edf7;
  border-color: #2747ae;
  color: #2747ae;
}

.gift-photo-choice:focus-visible,
.gift-photo-upload-zone:focus-visible,
.gift-photo-upload-zone:focus-within,
.gift-designer-service:focus-within {
  outline: 3px solid rgba(39, 71, 174, .3);
  outline-offset: 2px;
}

.gift-photo-status {
  color: #2747ae;
  font-size: 14px;
  margin: 10px 0 0;
  min-height: 20px;
}

.gift-designer-service {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  margin-top: -5px;
  position: relative;
}

.gift-designer-service[hidden] {
  display: none !important;
}

.gift-designer-service input {
  height: 24px;
  margin: 0;
  opacity: 0;
  position: absolute;
  width: 24px;
}

.gift-designer-service-check {
  background: #f1f1f1;
  border: 1px solid #f1f1f1;
  border-radius: 8px;
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 24px;
  position: relative;
  pointer-events: none;
  width: 24px;
}

.gift-designer-service input:checked + .gift-designer-service-check {
  background: #2747ae;
  border-color: #2747ae;
}

.gift-designer-service input:checked + .gift-designer-service-check::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: '';
  height: 10px;
  left: 8px;
  position: absolute;
  top: 4px;
  transform: rotate(45deg);
  width: 5px;
}

.gift-designer-service-copy {
  color: #212121;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gift-designer-service-copy b {
  font-size: 17px;
  font-weight: 500;
}

.gift-designer-service-copy small {
  color: #5f5f5f;
  font-size: 14px;
}

.gift-custom-sum-field {
  margin-top: 0;
}

.gift-custom-sum-error {
  color: #b3261e;
  font-size: 13px;
  margin: 6px 0 0;
}

.gift-sum-modal[hidden] {
  display: none !important;
}

.gift-sum-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10050;
}

.gift-sum-modal-backdrop {
  background: rgba(0, 0, 0, .48);
  inset: 0;
  position: absolute;
}

.gift-sum-modal-dialog {
  background: #fff;
  border-radius: 24px;
  box-sizing: border-box;
  max-width: 500px;
  padding: 32px;
  position: relative;
  width: 100%;
  z-index: 1;
  box-shadow: 0 24px 80px rgba(18, 30, 67, .18);
}

.gift-sum-modal-dialog h2 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 40px 24px 0;
}

.gift-modal-close {
  align-items: center;
  background: #f1f3f9;
  border: 0;
  border-radius: 50%;
  color: #354c87;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 40px;
}

.gift-modal-close svg {
  flex: 0 0 auto;
  pointer-events: none;
}

.gift-modal-close:hover {
  background: #e6ebf8;
}

.gift-sum-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gift-sum-options button {
  align-items: center;
  background: #f4f6fc;
  border: 1px solid #dce3f5;
  border-radius: 14px;
  color: #2747ae;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  justify-content: center;
  line-height: 1.2;
  min-height: 80px;
  padding: 16px 10px;
  text-align: center;
  overflow-wrap: anywhere;
}

.gift-sum-options button:hover {
  background: #e9eefb;
  border-color: #a9bae8;
}

.gift-sum-options button[aria-pressed="true"] {
  background: #263fba;
  border-color: #263fba;
  color: #fff;
}

.gift-sum-options button:focus-visible,
.gift-modal-close:focus-visible,
.gift-success-confirm:focus-visible {
  outline: 3px solid #4964d4;
  outline-offset: 3px;
}

.gift-sum-modal-open {
  overflow: hidden;
}

.gift-success-modal[hidden] {
  display: none !important;
}

.gift-success-modal {
  background: #fff;
  border: 0;
  border-radius: 24px;
  box-sizing: border-box;
  color: #212121;
  margin: auto;
  max-height: calc(100dvh - 40px);
  max-width: 480px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  padding: 40px 32px 32px;
  position: fixed;
  text-align: center;
  width: calc(100% - 40px);
  box-shadow: 0 24px 80px rgba(18, 30, 67, .18);
}

.gift-success-modal::backdrop {
  background: rgba(11, 19, 45, .48);
}

.gift-success-modal:focus {
  outline: none;
}

.gift-success-mark {
  align-items: center;
  background: #eef2ff;
  border-radius: 50%;
  color: #2747ae;
  display: flex;
  height: 56px;
  justify-content: center;
  margin: 0 auto 20px;
  width: 56px;
}

.gift-success-modal h2 {
  color: #263fba;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 12px;
}

.gift-success-modal p {
  color: #4d5363;
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 28px;
}

.gift-success-confirm {
  background: #263fba;
  border: 0;
  border-radius: 12px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  min-height: 52px;
  padding: 14px 24px;
  text-align: center;
  width: 100%;
}

.gift-success-confirm:hover {
  background: #1e3299;
}

.gift-success-modal-open {
  overflow: hidden;
}

.gift-photo-modal[hidden] {
  display: none !important;
}

.gift-photo-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10050;
}

.gift-photo-modal-backdrop {
  background: rgba(0, 0, 0, .48);
  inset: 0;
  position: absolute;
}

.gift-photo-modal-dialog {
  background: #fff;
  border-radius: 20px;
  box-sizing: border-box;
  max-width: 500px;
  padding: 32px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.gift-photo-modal-dialog h2 {
  font-size: 28px;
  margin: 0 40px 8px 0;
}

.gift-photo-modal-dialog > p {
  color: #666;
  margin: 0 0 22px;
}

.gift-photo-modal-close {
  background: #f1f1f1;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  height: 36px;
  line-height: 1;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 36px;
}

.gift-photo-upload-zone {
  align-items: center;
  background: #f4f6fc;
  border: 1px dashed #2747ae;
  border-radius: 14px;
  color: #2747ae;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  text-align: center;
}

.gift-photo-upload-zone span {
  font-weight: 600;
}

.gift-photo-upload-zone small {
  color: #777;
}

.gift-photo-file-input {
  height: 1px;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.gift-photo-preview-shell {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.gift-photo-preview-shell img {
  border-radius: 8px;
  height: 72px;
  object-fit: cover;
  width: 72px;
}

.gift-photo-error {
  color: #b3261e !important;
  font-size: 14px;
  margin: 14px 0 0 !important;
}

.gift-photo-modal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
}

.gift-photo-modal-actions button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 16px;
}

.gift-photo-secondary-button {
  background: #f1f1f1;
  color: #212121;
}

.gift-photo-primary-button {
  background: #2747ae;
  color: #fff;
}

.gift-photo-primary-button:disabled {
  cursor: default;
  opacity: .45;
}

.gift-photo-modal-open {
  overflow: hidden;
}

.gift-hint-modal[hidden] {
  display: none !important;
}

.gift-hint-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10060;
}

.gift-hint-modal-backdrop {
  background: rgba(0, 0, 0, .48);
  inset: 0;
  position: absolute;
}

.gift-hint-modal-dialog {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-radius: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-width: 476px;
  padding: 30px 32px 26px;
  position: relative;
  text-align: center;
  width: 100%;
  z-index: 1;
}

.gift-hint-modal-dialog h2 {
  align-self: stretch;
  color: #212121;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 28px 18px 0;
  text-align: left;
}

.gift-hint-modal-dialog > p:not(.gift-hint-copy-status) {
  color: #424242;
  font-size: 16px;
  line-height: 1.4;
  margin: 14px 0 12px;
  max-width: 360px;
}

.gift-hint-modal-close {
  align-items: center;
  background: #eef0f6;
  border: 0;
  border-radius: 50%;
  color: #50608d;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
}

.gift-hint-envelope {
  color: #2747ae;
  height: 108px;
  width: 136px;
}

.gift-hint-envelope svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  width: 100%;
}

.gift-hint-envelope .gift-hint-heart {
  fill: currentColor;
  stroke: none;
}

.gift-hint-share-label {
  color: #777;
  font-size: 14px;
}

.gift-hint-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.gift-hint-social {
  align-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: 700 11px/1 Arial, sans-serif;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.gift-hint-social svg {
  fill: currentColor;
  height: 22px;
  width: 22px;
}

.gift-hint-social .gift-hint-icon-outline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.gift-hint-social--whatsapp svg {
  height: 24px;
  width: 24px;
}

.gift-hint-social--vk { background: #2787f5; }
.gift-hint-social--telegram { background: #2aabee; font-size: 19px; }
.gift-hint-social--whatsapp { background: #25d366; font-size: 18px; }
.gift-hint-social--ok { background: #ee8208; }
.gift-hint-social--copy { background: #edf0fa; color: #2747ae; font-size: 20px; }

.gift-hint-social:focus-visible,
.gift-hint-modal-close:focus-visible {
  outline: 3px solid rgba(33, 63, 180, .5);
  outline-offset: 3px;
}

.gift-hint-copy-status {
  color: #2747ae;
  font-size: 13px;
  min-height: 18px;
  margin: 6px 0 0;
}

.gift-hint-modal-open {
  overflow: hidden;
}

/* The initializer grows overflowing copy while retaining the accepted fixed minimum. */
[data-cms-region="certificate-intro"] .GiftBanner-module--mainGiftBanner--4dab6 {
  overflow-wrap: anywhere;
}

.gift-sum-modal-dialog,
.gift-hint-modal-dialog,
.gift-photo-modal-dialog {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}

.gift-hint-modal-dialog > * {
  flex-shrink: 0;
}

[data-certificate-form-error] {
  white-space: pre-line;
}

[data-certificate-invalid] {
  outline: 2px solid #b3261e;
  outline-offset: 4px;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .gift-photo-options,
  .gift-photo-modal-actions {
    grid-template-columns: 1fr;
  }

  .gift-photo-modal-dialog {
    border-radius: 16px;
    padding: 24px 18px;
  }

  .gift-hint-modal-dialog {
    border-radius: 20px;
    padding: 26px 20px 22px;
  }

  .gift-hint-modal-dialog h2 {
    font-size: 24px;
  }

  .gift-sum-modal-dialog {
    border-radius: 20px;
    padding: 28px 20px 24px;
  }

  .gift-sum-modal-dialog h2 {
    font-size: 24px;
  }

  .gift-sum-options {
    gap: 8px;
  }

  .gift-sum-options button {
    font-size: 18px;
    min-height: 72px;
    padding: 14px 8px;
  }

  .gift-success-modal {
    border-radius: 20px;
    padding: 36px 24px 24px;
  }
}
