/* ==========================================================================
   Müşteri mesaj paneli (2026-10-09, inc/contact.php + assets/js/af-contact.js).
   Tema değişkenleri (--ink, --bg, --line, --mute); gölge/gradient yok; köşe 0; 48 px hedef.
   ========================================================================== */

/* Sağ alt düğme — küçük, sakin; çerez bandı açıkken, çekmece/menü/panel açıkken gizli. */
.af-contact-fab{ position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom,0px)); z-index:40;
  display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:0 16px 0 12px; border:1px solid var(--ink); border-radius:0;
  background:#D9D4C6 url("../img/paper-artefar.webp") 0 0 / 560px 560px repeat; color:var(--ink); cursor:pointer;
  font-family:'Plus Jakarta Sans',sans-serif; font-size:11px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; }
.af-contact-fab .af-svc__icon{ width:24px; height:24px; flex:none; }
html body .af-contact-fab:is(:hover,:focus,:active){ background:#D9D4C6 url("../img/paper-artefar.webp") 0 0 / 560px 560px repeat; color:var(--ink); border-color:var(--ink); box-shadow:none; }
.af-contact-fab:focus-visible{ outline:1px solid var(--ink); outline-offset:3px; }
body:has(#artefar-cookie-banner:not([hidden])) .af-contact-fab,
body:has(.af-overlay[data-open="1"]) .af-contact-fab,
body:has(.af-menu[data-open="1"]) .af-contact-fab,
html.af-contact-open .af-contact-fab,
html.afv-lock .af-contact-fab{ display:none; }
/* Ana sayfa: Edition Opening'in sabit "daktilo sesi" düğmesi sağ altta (bottom 28, 48 px) — mesaj
   düğmesi onun üstünde, aynı sağ hizada. */
body:has(.af10-edition__sound) .af-contact-fab{ right:var(--af10-gutter,16px); bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
@media (max-width:600px){ body:has(.af10-edition__sound) .af-contact-fab{ right:24px; } }
/* 2026-10-09 (site sahibi): masaüstünde daha kompakt ve sakin — normal harf aralıklı "Contact us",
   küçük ikon, ince düşük kontrastlı kenarlık, kâğıt yüzey; dokunma alanı 48 px (CLAUDE.md).
   Mobil yuvarlak düğme (≤768) değişmez. */
@media (min-width:769px){
  .af-contact-fab{ min-height:48px; height:48px; gap:8px; padding:0 16px 0 14px; border:1px solid rgba(23,12,11,.12); text-transform:none; letter-spacing:.01em; font-size:13px; font-weight:400; }
  .af-contact-fab .af-svc__icon{ width:20px; height:20px; }
  html body .af-contact-fab:is(:hover,:focus,:active){ border-color:var(--mute); }
}
/* Ana sayfa: hero görünürken yüzen düğme gizli (görünmez, tıklanamaz, odak almaz); hero tamamen
   geçilince (af-contact.js IntersectionObserver → html.af-past-hero) yumuşakça görünür, hero'ya
   dönünce yeniden gizlenir. İlk yüklemede de gizli başlar (sınıf yok). Diğer gizleme koşulları
   (display:none) önceliğini korur. */
body:has(.af10-hero) .af-contact-fab{ opacity:0; visibility:hidden; pointer-events:none; transition:opacity .3s ease, visibility 0s linear .3s; }
html.af-past-hero body:has(.af10-hero) .af-contact-fab{ opacity:1; visibility:visible; pointer-events:auto; transition:opacity .3s ease, visibility 0s; }
@media (prefers-reduced-motion:reduce){ body:has(.af10-hero) .af-contact-fab, html.af-past-hero body:has(.af10-hero) .af-contact-fab{ transition:none; } }
/* Mobil ürün sayfası: sabit "Add to Cart" çubuğunun üstünde. */
@media (max-width:768px){
  /* Mobilde yalnız ikon — yuvarlak 48 px (CLAUDE.md "yuvarlak ikon düğmesi" istisnası); ad aria'da. */
  .af-contact-fab{ right:12px; width:48px; padding:0; justify-content:center; border-radius:50%; }
  .af-contact-fab span{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  body.single-product .af-contact-fab{ bottom:calc(84px + env(safe-area-inset-bottom,0px)); }
}

/* Panel — masaüstünde sağ altta kompakt, mobilde alt panel. */
.af-contact{ position:fixed; inset:auto 16px 16px auto; margin:0; width:min(400px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto;
  padding:24px; border:1px solid var(--ink); border-radius:0; color:var(--ink);
  background:#D9D4C6 url("../img/paper-artefar.webp") 0 0 / 560px 560px repeat; }
.af-contact::backdrop{ background:rgba(23,12,11,.12); }
.af-contact__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.af-contact__title{ margin:0; font-family:'Cormorant Garamond',Georgia,serif; font-weight:400; font-size:var(--af-fs-h3); line-height:1.15; color:var(--ink);letter-spacing:var(--af-track-display)}
.af-contact__close{ flex:none; display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; margin:-12px -12px 0 0; padding:0; border:0; border-radius:0; background:transparent; color:var(--ink); cursor:pointer; }
html body .af-contact__close:is(:hover,:focus,:active){ background:transparent; color:var(--ink); box-shadow:none; }
.af-contact__close:focus-visible{ outline:1px solid var(--ink); outline-offset:-6px; }
.af-contact__desc{ margin:8px 0 16px; font-size:14px; line-height:1.6; color:var(--mute); }
.af-contact__about{ margin:0 0 16px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:14px; line-height:1.5; }
.af-contact__about a{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.af-contact__label, .af-contact__field label{ display:block; margin-bottom:6px; font-size:11px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--mute); }
.af-contact__field{ margin-bottom:16px; }
html body .af-contact .af-contact__field input, html body .af-contact .af-contact__field textarea{ display:block; width:100%; min-height:48px; padding:12px; border:1px solid var(--mute); border-radius:0; background:transparent; color:var(--ink); font:inherit; font-size:16px; line-height:1.4; box-shadow:none; }
.af-contact__field textarea{ min-height:120px; resize:vertical; }
html body .af-contact .af-contact__field input:focus, html body .af-contact .af-contact__field textarea:focus{ background:transparent;  outline:1px solid var(--ink); outline-offset:0; border-color:var(--ink); }
.af-contact__field [aria-invalid="true"]{ border-color:var(--ink); outline:1px solid var(--ink); }
.af-contact__err{ display:block; min-height:0; margin-top:6px; font-size:13px; line-height:1.4; color:var(--ink); }
.af-contact__err:empty{ display:none; }
.af-contact__hp{ position:absolute !important; left:-10000px !important; width:1px; height:1px; overflow:hidden; }
.af-contact__status{ margin:0 0 12px; font-size:14px; line-height:1.5; color:var(--ink); }
.af-contact__status:empty{ display:none; }
.af-contact__submit{ width:100%; }
.af-contact__submit:disabled{ opacity:1; cursor:progress; }
.af-contact__privacy{ margin:12px 0 0; font-size:12px; line-height:1.5; color:var(--mute); }
.af-contact__privacy a{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.af-contact__done:focus{ outline:none; }
.af-contact__done .af-contact__desc{ margin-bottom:24px; }
@media (max-width:640px){
  /* Mobil klavye açıkken (af-contact.js visualViewport): panel klavyenin üstünde, görünür alana sığar. */
  .af-contact{ inset:auto 0 var(--af-ctc-kb,0px) 0; width:100%; max-width:none; max-height:calc(var(--af-ctc-vh,100dvh) - 24px); overscroll-behavior:contain; padding:24px 16px calc(24px + env(safe-area-inset-bottom,0px)); border-width:1px 0 0; }
}
