/**
 * MyVisit360 – Consent-Banner & Modals v1.4.2
 * Alle Selektoren mit .mv360- präfixiert – kein Konflikt mit Kundenseite.
 */

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.mv360-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  animation: mv360-fade-in .25s ease forwards;
  pointer-events: all;
}

/* ── Banner ───────────────────────────────────────────────────────────────── */
.mv360-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #ffffff;
  border-top: 3px solid #1a1a2e;
  padding: 18px 20px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
  font-family: system-ui, -apple-system, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  transform: translateY(100%);
  animation: mv360-slide-up .3s ease .1s forwards;
}

@media (min-width: 640px) {
  .mv360-consent {
    bottom: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    animation: mv360-slide-up-center .3s ease .1s forwards;
    width: min(580px, calc(100vw - 40px));
    border-radius: 10px;
    border-top: none;
    border-left: 4px solid #1a1a2e;
  }
}

.mv360-consent:focus {
  outline: none;
}

/* ── Banner-Inhalt ────────────────────────────────────────────────────────── */
.mv360-consent-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #1a1a2e;
  background: #eef0fa;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mv360-consent-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
}

.mv360-consent-text {
  margin: 0 0 12px;
  color: #555;
  font-size: 13.5px;
}

/* ── Details / Was wird erfasst ───────────────────────────────────────────── */
.mv360-details {
  margin-bottom: 14px;
  border: 1px solid #e8e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.mv360-details-toggle {
  display: block;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  background: #f5f5fc;
  user-select: none;
  list-style: none;
}

.mv360-details-toggle::-webkit-details-marker { display: none; }

.mv360-details-toggle::before {
  content: '▶ ';
  font-size: 10px;
  opacity: .6;
}

.mv360-details[open] .mv360-details-toggle::before {
  content: '▼ ';
}

.mv360-details-toggle:hover {
  background: #ebebf8;
}

.mv360-details-body {
  padding: 10px 12px;
  font-size: 12.5px;
  color: #555;
  line-height: 1.6;
}

.mv360-details-body p {
  margin: 6px 0 4px;
}

.mv360-details-body ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.mv360-details-body li {
  margin-bottom: 3px;
}

.mv360-details-body code {
  background: #f0f0f5;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
}

/* ── Buttons (gleichwertig) ───────────────────────────────────────────────── */
.mv360-consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.mv360-btn {
  flex: 1 1 140px;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.mv360-btn:focus {
  outline: none;
}

.mv360-btn:focus-visible {
  outline: 3px solid rgba(47, 130, 96, 0.35);
  outline-offset: 3px;
}

.mv360-btn:active {
  transform: scale(.98);
}

/* Zustimmen und Ablehnen – bewusst gleichwertig */
.mv360-btn-accept,
.mv360-btn-decline {
  background: #ffffff;
  color: #1a1a2e;
  border: 2px solid #1a1a2e;
}

.mv360-btn-accept:hover,
.mv360-btn-decline:hover {
  background: #f0f0f5;
  border-color: #1a1a2e;
}

.mv360-btn-accept:active,
.mv360-btn-decline:active {
  background: #e7e7f0;
}

/* ── Legal-Links (Impressum / Datenschutz) ────────────────────────────────── */
.mv360-consent-legal {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.mv360-legal-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #777;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.mv360-legal-link:hover {
  color: #1a1a2e;
}

.mv360-legal-link:focus-visible {
  outline: 2px solid #4a4aaa;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Legal-Modal Overlay ──────────────────────────────────────────────────── */
.mv360-legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mv360-legal-modal-box {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .3);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, Arial, sans-serif;
  overflow: hidden;
}

.mv360-legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e8e8f0;
  flex-shrink: 0;
}

.mv360-legal-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
}

.mv360-legal-modal-close {
  background: none;
  border: 1px solid #d0d0e0;
  border-radius: 5px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv360-legal-modal-close:hover {
  background: #f0f0f8;
  color: #1a1a2e;
}

.mv360-legal-modal-close:focus-visible {
  outline: 2px solid #4a4aaa;
  outline-offset: 2px;
}

.mv360-legal-modal-content {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
}

.mv360-legal-loading {
  color: #888;
  font-style: italic;
}

.mv360-legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #e8e8f0;
  flex-shrink: 0;
}

.mv360-legal-link-ext {
  font-size: 12.5px;
  color: #555;
  text-decoration: underline;
}

.mv360-legal-link-ext:hover {
  color: #1a1a2e;
}

.mv360-legal-close-btn {
  flex: none !important;
  padding: 8px 16px !important;
}

@media (max-width: 480px) {
  .mv360-legal-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .mv360-legal-close-btn { width: 100%; }
}

/* ── Animationen ──────────────────────────────────────────────────────────── */
@keyframes mv360-fade-in   { to { opacity: 1; } }
@keyframes mv360-fade-out  { to { opacity: 0; pointer-events: none; } }

@keyframes mv360-slide-up  { to { transform: translateY(0); } }
@keyframes mv360-slide-down { to { transform: translateY(110%); } }

@keyframes mv360-slide-up-center   { to { transform: translateX(-50%) translateY(0); } }
@keyframes mv360-slide-down-center { to { transform: translateX(-50%) translateY(110%); } }

.mv360-consent.mv360-hiding             { animation: mv360-slide-down .25s ease forwards; }
.mv360-consent-overlay.mv360-hiding     { animation: mv360-fade-out .25s ease forwards;   }

@media (min-width: 640px) {
  .mv360-consent.mv360-hiding { animation: mv360-slide-down-center .25s ease forwards; }
}

@media (prefers-reduced-motion: reduce) {
  .mv360-consent,
  .mv360-consent-overlay { animation: none; transform: none; }
  @media (min-width: 640px) {
    .mv360-consent { transform: translateX(-50%); }
  }
}
