/* ================================================
   hostazar.com — Cookie Consent Banner & Modal
   ================================================ */

/* ---- Consent Banner ---- */
.hz-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent);
  padding: 20px 24px;
  z-index: 9999;
  box-shadow: 0 -4px 30px rgba(0,0,0,.5);
  transform: translateY(100%);
  transition: transform .4s ease;
}
.hz-consent-banner.show { transform: translateY(0); }
.hz-consent-banner .hz-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.hz-consent-banner p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
  min-width: 240px;
  line-height: 1.6;
}
.hz-consent-banner p a {
  color: var(--accent);
  text-decoration: underline;
}
.hz-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hz-btn {
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, opacity .2s;
}
.hz-btn-accept {
  background: var(--accent);
  color: #fff;
}
.hz-btn-accept:hover { background: var(--accent-hover); }
.hz-btn-reject {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.hz-btn-reject:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.hz-btn-settings {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.hz-btn-settings:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ---- Consent Modal ---- */
.hz-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hz-modal-overlay.open { display: flex; }
.hz-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: hzModalIn .3s ease;
}
@keyframes hzModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.hz-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.hz-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.hz-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.hz-modal-close:hover { color: var(--text-primary); }
.hz-modal-body {
  padding: 20px 24px;
}
.hz-modal-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.hz-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.hz-category:last-child { border-bottom: none; }
.hz-category-info { flex: 1; }
.hz-category-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.hz-category-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.hz-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.hz-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.hz-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #444;
  border-radius: 24px;
  transition: background .3s;
}
.hz-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
}
.hz-toggle input:checked + .hz-toggle-slider { background: var(--accent); }
.hz-toggle input:checked + .hz-toggle-slider::before { transform: translateX(20px); }
.hz-toggle input:disabled + .hz-toggle-slider { opacity: 0.5; cursor: not-allowed; }
.hz-toggle-required .hz-toggle-slider { background: var(--accent-dim); }
.hz-toggle-required input:disabled + .hz-toggle-slider::before { transform: translateX(20px); }
.hz-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hz-modal-footer .hz-btn { flex: 1; min-width: 120px; }

/* ---- Withdrawal Toast ---- */
.hz-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  box-shadow: var(--shadow);
  z-index: 99999;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  text-align: center;
}
.hz-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.hz-toast p {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hz-consent-banner { padding: 16px; }
  .hz-consent-banner p { font-size: 0.85rem; min-width: 100%; }
  .hz-banner-buttons { width: 100%; justify-content: center; }
  .hz-btn { font-size: 0.85rem; padding: 8px 16px; }
  .hz-modal { margin: 10px; }
  .hz-modal-body { padding: 16px; }
  .hz-modal-footer .hz-btn { min-width: 100%; }
}
