/* ────────────────────────────────────────────────────────────
   Hill Knives — Purchase Request Drawer
   Reusable overlay + slide-in panel. Paste drawer-snippet.html
   into any page's body, then link this file + drawer.js.
   ──────────────────────────────────────────────────────────── */

/* ── OVERLAY (dims the page behind the drawer) ── */
#hk-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9998;
}

#hk-drawer-overlay.hk-open {
  opacity: 1;
  visibility: visible;
}

/* ── DRAWER PANEL ── */
#hk-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 460px;
  max-width: 92vw;
  background-color: rgb(46, 45, 7);
  border-left: 1px solid rgb(107, 104, 32);
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

#hk-drawer.hk-open {
  transform: translateX(0);
}

/* ── DRAWER HEADER ── */
#hk-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgb(100, 98, 20);
  flex-shrink: 0;
}

#hk-drawer-header h2 {
  color: rgb(207, 181, 59);
  font-size: 19px;
  font-weight: normal;
  margin: 0;
}

#hk-drawer-close {
  background: none;
  border: none;
  color: rgb(207, 181, 59);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.75;
}

#hk-drawer-close:hover {
  opacity: 1;
}

/* ── DRAWER BODY (scrollable) ── */
#hk-drawer-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

#hk-drawer-body p.intro {
  color: rgb(207, 181, 59);
  font-size: 13px;
  line-height: 19px;
  margin-bottom: 20px;
  opacity: 0.85;
}

/* ── FORM (shared look with request.html) ── */
#hk-drawer-body .form-row {
  display: flex;
  gap: 14px;
}

#hk-drawer-body .form-group {
  margin-bottom: 14px;
  flex: 1;
}

/* honeypot spam trap -- visually hidden from real visitors, still reachable by bots
   that blindly fill every field in the form (see send.php) */
.hk-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#hk-drawer-body label {
  display: block;
  color: rgb(207, 181, 59);
  font-size: 13px;
  margin-bottom: 4px;
}

#hk-drawer-body label .req {
  color: rgb(255, 165, 0);
}

#hk-drawer-body input[type="text"],
#hk-drawer-body input[type="email"],
#hk-drawer-body input[type="tel"],
#hk-drawer-body select,
#hk-drawer-body textarea {
  width: 100%;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13px;
  color: rgb(207, 181, 59);
  background-color: rgb(36, 35, 5);
  border: 1px solid rgb(107, 104, 32);
  padding: 6px 7px;
}

#hk-drawer-body input::placeholder,
#hk-drawer-body textarea::placeholder {
  color: rgb(100, 97, 35);
}

#hk-drawer-body input:focus,
#hk-drawer-body select:focus,
#hk-drawer-body textarea:focus {
  outline: 1px solid rgb(207, 181, 59);
}

#hk-drawer-body select option {
  background: rgb(46, 45, 7);
  color: rgb(207, 181, 59);
}

#hk-drawer-body textarea {
  height: 100px;
  resize: vertical;
}

#hk-drawer-body .submit-btn {
  display: inline-block;
  background-color: rgb(96, 56, 19);
  color: rgb(207, 181, 59);
  border: 1px solid rgb(140, 100, 40);
  padding: 7px 22px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 6px;
}

#hk-drawer-body .submit-btn:hover {
  background-color: rgb(120, 75, 30);
}

#hk-drawer-body .submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

#hk-drawer-body .form-note {
  color: rgb(207, 181, 59);
  font-size: 11px;
  opacity: 0.6;
  margin-top: 16px;
  line-height: 17px;
  border-top: 1px solid rgb(100, 98, 20);
  padding-top: 12px;
}

#hk-drawer-body .form-error {
  color: rgb(255, 120, 120);
  font-size: 12px;
  margin-top: 10px;
  display: none;
}

#hk-drawer-body .form-error.hk-show {
  display: block;
}

#hk-drawer-body .form-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

#hk-drawer-body .form-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  flex: none;
  cursor: pointer;
}

/* ── SUCCESS STATE ── */
#hk-drawer-success {
  display: none;
  text-align: center;
  padding: 40px 10px;
}

#hk-drawer-success.hk-show {
  display: block;
}

#hk-drawer-success h3 {
  color: rgb(207, 181, 59);
  font-size: 18px;
  margin-bottom: 10px;
}

#hk-drawer-success p {
  color: rgb(207, 181, 59);
  font-size: 13px;
  opacity: 0.85;
  line-height: 19px;
  margin-bottom: 18px;
}

/* ── FLOATING TRIGGER BUTTON ──
   Standalone, fixed-position button that opens the drawer. Used instead of a nav
   item because the site's nav bar is laid out by a legacy jQuery widget
   (jquery.musemenu.js) that doesn't tolerate an extra item being added to it. */
#hk-float-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9997;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgb(255, 165, 0);
  color: rgb(56, 0, 4);
  border: 1px solid rgb(56, 0, 4);
  border-radius: 6px;
  padding: 12px 20px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#hk-float-trigger svg {
  flex-shrink: 0;
}

#hk-float-trigger:hover {
  background-color: rgb(230, 145, 0);
}

/* hide the floating trigger while the drawer itself is open */
body.hk-drawer-locked #hk-float-trigger {
  display: none;
}

/* ── LOCK PAGE SCROLL WHILE OPEN ── */
body.hk-drawer-locked {
  overflow: hidden;
}

/* ── NAV "PURCHASE REQUEST" BUTTON HIGHLIGHT ──
   Add class="hk-cta" to a MenuItemContainer to highlight it as an action button
   instead of a plain nav link (used for the drawer trigger). */
.MenuItemContainer.hk-cta a.MenuItem {
  background-color: rgb(96, 56, 19) !important;
}

.MenuItemContainer.hk-cta a.MenuItem:hover,
.MenuItemContainer.hk-cta a.MenuItem.active {
  background-color: rgb(120, 75, 30) !important;
}

/* ── PER-KNIFE "REQUEST THIS KNIFE" BUTTON (for listing pages) ── */
.hk-request-btn {
  display: inline-block;
  background-color: rgb(96, 56, 19);
  color: rgb(207, 181, 59);
  font-size: 12px;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgb(140, 100, 40);
  cursor: pointer;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.hk-request-btn:hover {
  background-color: rgb(120, 75, 30);
}
