/* Contact component adapted from Tehranto's active contact-form-v075.js.
   Circular 58/56px launcher, 410px desktop panel, 24/22px corners, 38px WhatsApp icon.
   K1 brand colours and contact destination remain local to this component. */
html { scrollbar-gutter:stable; }
body.contact-panel-open { overflow:hidden; }
.contact-launcher {
  position:fixed; z-index:40;
  right:clamp(16px,2.2vw,32px);
  bottom:max(clamp(16px,2.2vw,32px),env(safe-area-inset-bottom));
  display:grid; place-items:center;
  width:58px; height:58px; min-width:58px; min-height:58px;
  margin:0; padding:0; border:1px solid #ffffff4d; border-radius:50%;
  background:#292929; color:#fff;
  box-shadow:0 15px 38px #24242440;
  cursor:pointer; transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
.contact-launcher>svg { width:24px; height:24px; fill:currentColor; }
.contact-launcher:hover { background:#41403e; transform:translateY(-2px); box-shadow:0 19px 44px #2424244d; }
.contact-launcher:focus-visible,.contact-panel :focus-visible { outline:3px solid #b89b5f; outline-offset:4px; }
.contact-launcher-label {
  position:absolute; right:calc(100% + 12px); top:50%; transform:translate(4px,-50%);
  padding:9px 13px; border:1px solid var(--line); border-radius:12px;
  background:#fff; color:var(--ink); font-size:14px; font-weight:500; line-height:1.3;
  white-space:nowrap; box-shadow:0 5px 18px #24242412;
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity .2s,transform .2s,visibility .2s;
}
.contact-launcher:hover .contact-launcher-label,.contact-launcher:focus-visible .contact-launcher-label {
  opacity:1; visibility:visible; transform:translate(0,-50%);
}
dialog.contact-panel {
  position:fixed; inset:auto clamp(16px,2.2vw,32px) calc(clamp(16px,2.2vw,32px) + 72px) auto;
  width:min(410px,calc(100vw - 32px)); max-width:none;
  max-height:min(720px,calc(100dvh - 110px)); overflow:auto; overscroll-behavior:contain;
  margin:0; padding:20px; border:1px solid #29292921; border-radius:24px;
  background:#fffffff7; color:var(--ink); box-shadow:0 28px 80px #24242442;
  transform-origin:bottom right;
}
.contact-panel[open] { animation:contact-panel-in .22s ease both; }
.contact-panel::backdrop { background:#24242466; backdrop-filter:blur(3px); }
.contact-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.contact-panel-kicker { margin:0 0 7px; color:#8a713e; font-size:12px; font-weight:600; letter-spacing:.12em; line-height:1.4; }
.contact-panel h2 { margin:0; font-size:27px; font-weight:550; line-height:1.15; letter-spacing:-.035em; }
.contact-panel-close {
  display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px;
  margin:0; padding:0; border:1px solid #29292921; border-radius:50%;
  background:#fff; color:var(--ink); cursor:pointer;
}
.contact-panel-close svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.contact-panel-intro { margin:0 0 20px; color:#68645e; font-size:16px; line-height:1.65; }
.contact-panel-whatsapp {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  width:100%; min-height:78px; padding:15px 16px; border-radius:16px;
  background:#292929; color:#fff; box-shadow:0 10px 25px #24242420;
  text-decoration:none; transition:transform .2s ease,background .2s ease;
}
.contact-panel-whatsapp:hover { background:#41403e; transform:translateY(-1px); }
.contact-panel-wa-copy { display:flex; align-items:center; gap:12px; }
.contact-panel-wa-icon { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:#e5d8b9; color:var(--ink); }
.contact-panel-wa-icon svg { width:21px; height:21px; fill:currentColor; }
.contact-panel-wa-label { display:block; font-size:16px; font-weight:550; line-height:1.3; }
.contact-panel-wa-note { display:block; margin-top:4px; color:#e2dcd1; font-size:13px; line-height:1.35; }
.contact-panel-arrow { font-size:25px; line-height:1; }
@keyframes contact-panel-in { from { opacity:0; transform:translateY(16px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media(max-width:620px) {
  .contact-launcher { right:16px; bottom:max(16px,env(safe-area-inset-bottom)); width:56px; height:56px; min-width:56px; min-height:56px; }
  .contact-launcher-label { display:none; }
  .contact-panel-open .contact-launcher { opacity:0; visibility:hidden; pointer-events:none; }
  dialog.contact-panel {
    inset:auto 16px max(16px,env(safe-area-inset-bottom)) 16px;
    width:auto; max-height:88dvh; padding:20px 16px max(18px,env(safe-area-inset-bottom));
    border-radius:22px; transform-origin:bottom center;
  }
  .contact-panel h2 { font-size:26px; }
}
@media(prefers-reduced-motion:reduce) {
  .contact-launcher,.contact-launcher-label,.contact-panel-whatsapp { transition:none; }
  .contact-panel[open] { animation:none; }
}
@media print { .contact-launcher,dialog.contact-panel { display:none; } }
