/* =========================================================================
   LAPAKMU — COOKIE CONSENT STYLES
   File: /assets/css/cookie-consent.css
   Versi: 2.0 — Fix banner tidak muncul
   - Default display: none, .show → display: block
   - Tidak pakai opacity:0 + transform (rentan)
   - Semua ukuran tetap, desain sama
   ========================================================================= */

/* ============================================================
   BANNER UTAMA
   ============================================================ */
#lapakmu-cookie-banner.lapakmu-cookie {
  position: fixed !important;
  left: 50% !important;
  bottom: 20px !important;
  transform: translateX(-50%) !important;
  z-index: 99990 !important;
  width: calc(100% - 32px) !important;
  max-width: 640px !important;
  background: #ffffff !important;
  border: 1px solid #e8dfcf !important;
  border-radius: 18px !important;
  box-shadow:
    0 20px 50px -20px rgba(15, 81, 50, 0.35),
    0 8px 20px -8px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset !important;
  padding: 20px 22px !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
  isolation: isolate;
  /* DEFAULT: disembunyikan dengan display, bukan opacity */
  display: none;
}

#lapakmu-cookie-banner.lapakmu-cookie.show {
  display: block !important;
}

#lapakmu-cookie-banner.lapakmu-cookie.minimized {
  padding: 12px 16px;
}
#lapakmu-cookie-banner.lapakmu-cookie.minimized .lapakmu-cookie-body,
#lapakmu-cookie-banner.lapakmu-cookie.minimized .lapakmu-cookie-actions-primary,
#lapakmu-cookie-banner.lapakmu-cookie.minimized .lapakmu-cookie-detail {
  display: none;
}
#lapakmu-cookie-banner.lapakmu-cookie.minimized .lapakmu-cookie-head {
  margin-bottom: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.lapakmu-cookie-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.lapakmu-cookie-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8ede1, #b6dfc6);
  color: #0f5132;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lapakmu-cookie-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lapakmu-cookie-title-block { flex: 1; min-width: 0; }
.lapakmu-cookie-title {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.2px;
  margin: 0 0 2px;
  line-height: 1.3;
}
.lapakmu-cookie-subtitle {
  font-size: 12px;
  color: #8a857d;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* ============================================================
   BODY
   ============================================================ */
.lapakmu-cookie-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #4a4742;
  margin: 0 0 16px;
}
.lapakmu-cookie-body a {
  color: #0f5132;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(15, 81, 50, 0.3);
  transition: border-color 0.15s;
}
.lapakmu-cookie-body a:hover { border-bottom-style: solid; }

/* ============================================================
   ACTIONS
   ============================================================ */
.lapakmu-cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lapakmu-cookie-actions-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lapakmu-cookie-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s;
  white-space: nowrap;
  text-decoration: none;
}
.lapakmu-cookie-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lapakmu-cookie-btn-primary {
  background: #0f5132;
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(15, 81, 50, 0.5);
}
.lapakmu-cookie-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(15, 81, 50, 0.6);
}
.lapakmu-cookie-btn-ghost {
  background: #faf4ea;
  color: #4a4742;
  border: 1.5px solid #e8dfcf;
}
.lapakmu-cookie-btn-ghost:hover {
  background: #d8ede1;
  border-color: #b6dfc6;
  color: #0f5132;
}
.lapakmu-cookie-btn-link {
  background: transparent;
  color: #4a4742;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12.5px;
  height: 44px;
  padding: 0 8px;
}
.lapakmu-cookie-btn-link:hover { color: #0f5132; }

/* ============================================================
   DETAIL (expandable)
   ============================================================ */
.lapakmu-cookie-detail {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #e8dfcf;
  flex-direction: column;
  gap: 12px;
}
.lapakmu-cookie-detail.open { display: flex; }

.lapakmu-cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdf9f2;
  border: 1px solid #e8dfcf;
  transition: border-color 0.15s;
}
.lapakmu-cookie-option:hover { border-color: #d9cdb7; }
.lapakmu-cookie-option.locked { opacity: 0.75; }
.lapakmu-cookie-option-body { flex: 1; min-width: 0; }
.lapakmu-cookie-option-title {
  font-size: 13px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lapakmu-cookie-option-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #d8ede1;
  color: #0f5132;
}
.lapakmu-cookie-option-desc {
  font-size: 11.5px;
  color: #8a857d;
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   TOGGLE
   ============================================================ */
.lapakmu-cookie-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}
.lapakmu-cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.lapakmu-cookie-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9cdb7;
  transition: background 0.2s;
}
.lapakmu-cookie-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s;
}
.lapakmu-cookie-toggle input:checked + .lapakmu-cookie-toggle-track { background: #0f5132; }
.lapakmu-cookie-toggle input:checked + .lapakmu-cookie-toggle-track::after { transform: translateX(18px); }
.lapakmu-cookie-toggle input:disabled + .lapakmu-cookie-toggle-track { background: #0f5132; opacity: 0.85; cursor: not-allowed; }
.lapakmu-cookie-toggle input:disabled + .lapakmu-cookie-toggle-track::after { transform: translateX(18px); }

/* ============================================================
   MINIMIZE BUTTON
   ============================================================ */
.lapakmu-cookie-minimize {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #faf4ea;
  border: 1px solid #e8dfcf;
  color: #8a857d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.lapakmu-cookie-minimize:hover {
  background: #d8ede1;
  border-color: #b6dfc6;
  color: #0f5132;
}
.lapakmu-cookie-minimize svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   REOPEN BUTTON
   ============================================================ */
#lapakmuCookieReopen.lapakmu-cookie-reopen {
  position: fixed !important;
  left: 20px !important;
  bottom: 20px !important;
  z-index: 99989 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e8dfcf !important;
  box-shadow:
    0 8px 20px -6px rgba(15, 81, 50, 0.3),
    0 2px 6px -2px rgba(15, 23, 42, 0.08) !important;
  color: #0f5132 !important;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
#lapakmuCookieReopen.lapakmu-cookie-reopen.show {
  display: flex;
}
#lapakmuCookieReopen.lapakmu-cookie-reopen:hover {
  transform: scale(1.08);
}
#lapakmuCookieReopen.lapakmu-cookie-reopen svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  #lapakmu-cookie-banner.lapakmu-cookie {
    bottom: 16px !important;
    width: calc(100% - 24px) !important;
    padding: 18px 18px !important;
    border-radius: 16px !important;
  }
  .lapakmu-cookie-actions,
  .lapakmu-cookie-actions-primary {
    grid-template-columns: 1fr;
  }
  .lapakmu-cookie-title { font-size: 14.5px; }
  .lapakmu-cookie-body { font-size: 13px; }

  #lapakmuCookieReopen.lapakmu-cookie-reopen {
    left: 16px !important;
    bottom: 16px !important;
    width: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 360px) {
  #lapakmu-cookie-banner.lapakmu-cookie {
    padding: 16px 14px !important;
  }
  .lapakmu-cookie-icon { width: 36px; height: 36px; }
  .lapakmu-cookie-title { font-size: 14px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .lapakmu-cookie,
  .lapakmu-cookie-detail,
  .lapakmu-cookie-toggle-track,
  .lapakmu-cookie-toggle-track::after {
    transition: none !important;
    animation: none !important;
  }
}