body.mynote-calculator-page {
  overflow-x: hidden;
}

.mynote-compact-nav {
  position: fixed;
  z-index: 99990;
  top: 0;
  right: 0;
  left: 0;
  display: block;
  min-height: 42px;
  padding: 4px 12px;
  border-bottom: 1px solid rgba(194,145,35,.72);
  background: rgba(10,11,13,.97) url("notepad/background.png") center 18% / cover no-repeat;
  box-shadow: 0 5px 15px rgba(0,0,0,.28);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.mynote-compact-nav.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mynote-compact-nav__inner { display: flex; width: min(1180px, 100%); min-height: 33px; align-items: center; justify-content: flex-end; margin: 0 auto; }
.mynote-compact-nav .mynote-nav { position: static; display: flex; align-items: center; flex-direction: row; gap: clamp(20px, 3vw, 42px); padding: 0; border: 0; background: transparent; box-shadow: none; }
.mynote-compact-nav .mynote-nav > a,
.mynote-compact-nav .mynote-nav-types > summary { padding: 6px 2px; color: #fffaf0; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; }
.mynote-compact-nav .mynote-nav-types__menu { top: calc(100% + 8px); }
body.admin-bar .mynote-compact-nav { top: 32px; }

.mynote-product-description { position: relative; z-index: 3; margin: 4px 20px 12px 34px; padding: 22px 28px; border: 1px solid rgba(132,96,28,.18); border-radius: 13px; background: rgba(255,254,249,.82); color: #3b2815; font-size: 16px; line-height: 1.58; }
.mynote-product-description h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.15; }
.mynote-product-description h3 { margin: 24px 0 7px; font-size: 20px; line-height: 1.2; }
.mynote-product-description p { margin: 0 0 12px; }
.mynote-product-description p:last-child { margin-bottom: 0; }
.mynote-product-description .mynote-definition { font-style: italic; color: #624925; }
.mynote-calculator-shell.is-design-studio-open > .mynote-product-description { display: none; }

@media (max-width: 782px) {
  body.admin-bar .mynote-compact-nav { top: 46px; }
  .mynote-compact-nav { padding-inline: 7px; }
  .mynote-compact-nav .mynote-nav { display: flex; flex-direction: row; gap: 10px; }
  .mynote-compact-nav .mynote-nav > a,
  .mynote-compact-nav .mynote-nav-types > summary { padding: 7px 2px; font-size: 12px; }
  .mynote-compact-nav .mynote-nav-types__menu { position: absolute; top: calc(100% + 7px); right: 0; left: auto; min-width: 210px; padding: 7px; border: 1px solid rgba(215,174,93,.35); border-radius: 9px; background: var(--mynote-wood, #17120d); box-shadow: 0 15px 28px rgba(0,0,0,.28); transform: none; }
  .mynote-product-description { margin: 4px 8px 10px 22px; padding: 17px 16px; }
  .mynote-product-description h2 { font-size: 24px; }
}

@media (hover: hover) and (pointer: fine) {
  body.mynote-calculator-page .entry-content.wp-block-post-content,
  body.mynote-calculator-page .mynote-calculator-shell {
    min-width: 0;
  }

  body.mynote-calculator-page .mynote-calculator-shell {
    max-width: calc(100vw - 32px) !important;
  }
}

body.mynote-calculator-page main {
  position: relative;
  isolation: isolate;
  margin-block-start: 0 !important;
  padding-top: 16px;
  padding-bottom: 16px;
  background: transparent !important;
  min-height: calc(100vh - 57px);
}

body.admin-bar.page-id-8 main {
  min-height: calc(100vh - 89px);
}

body.mynote-calculator-page header.wp-block-group + .wp-block-separator {
  display: none !important;
  margin: 0 !important;
}

body.mynote-calculator-page main::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    #111 url("notepad/background.png")
    center top / cover no-repeat;
  pointer-events: none;
}

body.mynote-calculator-page .entry-content.wp-block-post-content {
  width: 100%;
  max-width: none !important;
}

body.mynote-calculator-page header.wp-block-group {
  min-height: 57px;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  border-bottom: 1px solid rgba(194, 145, 35, 0.72);
  background:
    #0a0b0d url("notepad/background.png")
    center 18% / cover no-repeat !important;
}

body.mynote-calculator-page header.wp-block-group .wp-block-site-title {
  width: 1600px;
  max-width: calc(100vw - 80px);
  margin: 0 auto;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.mynote-calculator-page header.wp-block-group .wp-block-site-title a {
  display: block;
  position: relative;
  width: 100%;
  height: 51px;
  overflow: hidden;
  color: transparent !important;
  background:
    url("mynote-logo-gold-v2.png") 18px center / 64px 51px no-repeat,
    url("mynote-logo-gold-v2.png") 18px center / 64px 51px no-repeat;
  text-decoration: none !important;
}

body.mynote-calculator-page header.wp-block-group .wp-block-site-title a::after {
  content: "Калькулятор блокнотів";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #e1b64e;
  font-size: 19px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mynote-calculator-shell {
  position: relative;
  width: 1600px !important;
  max-width: calc(100vw - 80px) !important;
  margin: 0 auto 20px;
  padding: 8px 6px 18px 32px;
  box-sizing: border-box;
  overflow: visible;
  background: transparent;
}

.mynote-order-page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999990;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .58);
  cursor: default;
}

.mynote-calculator-horizontal-pan {
  position: fixed;
  z-index: 999980;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  border-top: 1px solid rgba(132, 96, 28, .42);
  background: rgba(255, 249, 225, .96);
}

.mynote-calculator-horizontal-pan.is-visible {
  display: block;
}

.mynote-calculator-horizontal-pan-spacer {
  height: 1px;
  min-width: 100%;
  pointer-events: none;
}

.mynote-calculator-shell.is-order-modal-open {
  z-index: 999991;
}

.mynote-calculator-shell.is-order-modal-open .mynote-calculator-frame {
  position: fixed !important;
  z-index: 999991;
  inset: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: transparent !important;
}

.mynote-calculator-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  z-index: 2;
  width: 54px;
  overflow: hidden;
  background: url("spring-wire-v2.svg") left top / 54px 6% repeat-y;
  pointer-events: none;
}

.mynote-calculator-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 18px;
  display: block;
  border: 1px solid rgba(132, 96, 28, 0.26);
  border-radius: 18px;
  box-shadow:
    0 16px 34px rgba(51, 39, 18, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(rgba(255, 254, 249, .52), rgba(255, 254, 249, .52)),
    #f3e8c8 url("paper-texture-v1.png")
    left top / 480px 480px repeat;
  -webkit-mask-image:
    linear-gradient(#000 0 0),
    repeating-linear-gradient(
      to bottom,
      transparent 0 calc(3% - 4.68px),
      #000 calc(3% - 4.68px) calc(3% + 4.68px),
      transparent calc(3% + 4.68px) 6%
    );
  -webkit-mask-position:
    0 0,
    18px 10px;
  -webkit-mask-size:
    100% 100%,
    9.36px calc(100% - 20px);
  -webkit-mask-repeat:
    no-repeat,
    no-repeat;
  -webkit-mask-composite: xor;
  mask-image:
    linear-gradient(#000 0 0),
    repeating-linear-gradient(
      to bottom,
      transparent 0 calc(3% - 4.68px),
      #000 calc(3% - 4.68px) calc(3% + 4.68px),
      transparent calc(3% + 4.68px) 6%
    );
  mask-position:
    0 0,
    18px 10px;
  mask-size:
    100% 100%,
    9.36px calc(100% - 20px);
  mask-repeat:
    no-repeat,
    no-repeat;
  mask-composite: exclude;
  pointer-events: none;
}

.mynote-calculator-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: transparent !important;
  transition: none;
}

.mynote-calculator-admin-shell {
  max-width: 1600px;
  border: 1px solid #dcdcde;
  background: #ffffff;
}

@media (max-width: 960px) {
  body.mynote-calculator-page header.wp-block-group .wp-block-site-title {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    box-sizing: border-box;
  }

  .mynote-calculator-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 0;
    padding-right: 12px;
    padding-left: 55px;
  }

  .mynote-calculator-shell::before {
    background-size: 54px 6%;
  }
}

@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
  body.mynote-calculator-page header.wp-block-group {
    min-height: 49px;
  }

  body.mynote-calculator-page header.wp-block-group .wp-block-site-title {
    padding-left: 6px;
  }

  body.mynote-calculator-page header.wp-block-group .wp-block-site-title a {
    height: 45px;
    background:
      url("mynote-logo-gold-v2.png") 3px center / 51px 41px no-repeat,
      url("mynote-logo-gold-v2.png") 3px center / 51px 41px no-repeat;
  }

  body.mynote-calculator-page header.wp-block-group .wp-block-site-title a::after {
    left: 59%;
    font-size: 13.5px;
    letter-spacing: 0.02em;
  }

  .mynote-calculator-shell {
    padding-right: 6px;
    padding-left: 6px;
  }

  .mynote-calculator-shell::before {
    display: none;
  }

  .mynote-calculator-shell::after {
    left: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  body.mynote-calculator-page main {
    padding-top: 16px;
    padding-right: 8px;
    padding-bottom: 36px;
    padding-left: 8px;
  }
}
