/* ============================================================
   justapplai Cookie-Consent v1
   ============================================================ */

#ja-cc-banner, #ja-cc-modal, #ja-cc-sticky {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  color: #1f2937;
}
#ja-cc-banner *, #ja-cc-modal *, #ja-cc-sticky * { box-sizing: border-box; }

#ja-cc-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99998;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 18px 20px;
  display: none;
}
#ja-cc-banner.is-open { display: block; }
#ja-cc-banner-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
#ja-cc-banner-text { flex: 1 1 320px; font-size: 14px; line-height: 1.5; }
#ja-cc-banner-text strong { display: block; font-size: 15px; margin-bottom: 4px; color: #111827; }
#ja-cc-banner-text a { color: #d6007f; text-decoration: underline; }
#ja-cc-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ja-cc-btn {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
  transition: transform 0.05s, box-shadow 0.1s;
  white-space: nowrap; border: 1px solid transparent;
}
.ja-cc-btn:hover { transform: translateY(-1px); }
.ja-cc-btn-primary { background: linear-gradient(135deg, #d6007f, #7b2d8b); color: #fff; }
.ja-cc-btn-primary:hover { box-shadow: 0 4px 12px rgba(214, 0, 127, 0.3); }
.ja-cc-btn-secondary { background: #fff; color: #111827; border-color: #d1d5db; }
.ja-cc-btn-secondary:hover { background: #f9fafb; }
.ja-cc-btn-link { background: transparent; color: #6b7280; text-decoration: underline; padding: 10px 8px; }
.ja-cc-btn-link:hover { color: #d6007f; }

#ja-cc-sticky {
  position: fixed; bottom: 14px; left: 14px; z-index: 99997;
  width: 44px; height: 44px; border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  cursor: pointer; display: none;
  align-items: center; justify-content: center;
  transition: transform 0.15s; padding: 0;
}
#ja-cc-sticky.is-visible { display: flex; }
#ja-cc-sticky:hover { transform: scale(1.08); }
#ja-cc-sticky svg { width: 22px; height: 22px; color: #d6007f; }

#ja-cc-modal {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(17, 24, 39, 0.5);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#ja-cc-modal.is-open { display: flex; }
#ja-cc-modal-box {
  background: #fff; border-radius: 14px;
  max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
#ja-cc-modal-header { padding: 20px 24px 12px; border-bottom: 1px solid #e5e7eb; }
#ja-cc-modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #111827; }
#ja-cc-modal-header p { margin: 8px 0 0; font-size: 13px; color: #6b7280; line-height: 1.5; }
#ja-cc-modal-body { padding: 16px 24px; }
#ja-cc-modal-footer {
  padding: 16px 24px 20px; border-top: 1px solid #e5e7eb;
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}

.ja-cc-category {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px;
}
.ja-cc-category-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ja-cc-category-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: #111827; flex: 1; }
.ja-cc-category-desc { font-size: 12px; color: #6b7280; line-height: 1.5; margin: 8px 0 0 32px; }
.ja-cc-category-list { margin: 10px 0 0 32px; font-size: 11px; color: #6b7280; display: none; }
.ja-cc-category-list.is-open { display: block; }
.ja-cc-category-list table { width: 100%; border-collapse: collapse; font-family: monospace; font-size: 11px; }
.ja-cc-category-list th, .ja-cc-category-list td {
  text-align: left; padding: 5px 8px; border-bottom: 1px solid #e5e7eb;
}
.ja-cc-category-list th { font-weight: 600; color: #374151; background: #fff; }
.ja-cc-toggle-list {
  font-size: 11px; color: #d6007f; background: none; border: none;
  cursor: pointer; margin: 6px 0 0 32px; padding: 0; text-decoration: underline;
}

.ja-cc-switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.ja-cc-switch input { opacity: 0; width: 0; height: 0; }
.ja-cc-switch-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px;
  transition: background 0.15s;
}
.ja-cc-switch-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; top: 2px; left: 2px;
  transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ja-cc-switch input:checked + .ja-cc-switch-slider { background: #d6007f; }
.ja-cc-switch input:checked + .ja-cc-switch-slider::before { transform: translateX(16px); }
.ja-cc-switch input:disabled + .ja-cc-switch-slider { background: #d6007f; opacity: 0.6; cursor: not-allowed; }

@media (max-width: 640px) {
  #ja-cc-banner-inner { flex-direction: column; align-items: stretch; }
  #ja-cc-banner-actions { justify-content: stretch; }
  #ja-cc-banner-actions .ja-cc-btn { flex: 1 1 auto; text-align: center; }
  #ja-cc-modal-footer { flex-direction: column-reverse; }
  #ja-cc-modal-footer .ja-cc-btn { width: 100%; text-align: center; }
}
