/*
VIP Check – Frontend Styles
Scoped to .mrj-vip components and the VIP photo modal.
*/

/* Generic UI */

.mrj-vip.mrj-vip-box {
  padding: 20px;
  border: 2px solid #333;
  border-radius: 10px;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
}

.mrj-vip.mrj-vip-box h3 {
  margin-top: 0;
}

.mrj-vip-input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.mrj-vip-button {
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
}

.mrj-vip-button:disabled {
  background: #ccc;
  color: #666;
  cursor: default;
}

.mrj-vip-alert {
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.mrj-vip-alert--error {
  background: #f8d7da;
  color: #721c24;
}

/* VIP Card Legend */
.mrj-vip.mrj-vip-legend,
.mrj-vip.mrj-vip-legend * {
  color: #ffffff;
}
.mrj-vip.mrj-vip-legend {
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Über 18 Jahre */
.mrj-vip-age-ok,
.mrj-vip-age-ok * {
  color: #2ecc71; /* Grün */
}
.mrj-vip-age-ok {
  background-color: rgba(46, 204, 113, 0.15);
  padding: 0 8px;
}

/* Unter 18 Jahre */
.mrj-vip-age-warning,
.mrj-vip-age-warning * {
  color: #f1c40f; /* Gelb */
}
.mrj-vip-age-warning {
  background-color: rgba(241, 196, 15, 0.15);
  padding: 0 8px;
}

/* VIP Card UI */
.mrj-vip.mrj-vip-card {
  border: 5px solid var(--mrj-vip-frame, #28a745);
  padding: 20px;
  border-radius: 15px;
  background: #f9f9f9;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
}

.mrj-vip-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--mrj-vip-status, #28a745);
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.mrj-vip-name {
  margin-top: 15px;
}

.mrj-vip-status {
  background: var(--mrj-vip-status, #28a745);
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.mrj-vip-redeem {
  background: #28a745;
  color: #fff;
  padding: 15px;
  border-radius: 10px;
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.mrj-vip-redeem--disabled {
  background: #ccc;
  color: #666;
  cursor: default;
}

.mrj-vip-legend {
  max-width: 400px;
  margin: 10px auto 0;
  font-size: 14px;
  color: #333;
  text-align: left;
}

.mrj-vip-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--dot, #28a745);
  margin-right: 5px;
  border-radius: 2px;
}

/* Ensure we do not affect the whole site */
.mrj-vip p {
  padding-bottom: 0.3em;
}

/* VIP Photo Modal */
.mrj-vip-photo-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.mrj-vip-photo-modal.is-open {
  display: flex;
}

.mrj-vip-photo-modal-inner {
  position: relative;
  width: min(92vw, 980px);
  height: 92vh;
  max-height: 92vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mrj-vip-photo-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  font-size: 22px;
}

.mrj-vip-popup-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  object-position: center top;
  border-radius: 10px;
}

/* Mobile: Gesicht automatisch groesser (leichter Zuschnitt) */
@media (max-width: 768px) {
  .mrj-vip-photo-modal-inner {
    width: 92vw;
    height: 82vh;
    max-height: 82vh;
  }

  .mrj-vip-popup-img {
    width: 92vw;
    height: 82vh;
    max-height: 82vh;
    object-fit: cover;
    object-position: center 20%;
  }
}

/* Optional: Double-tap Zoom (JS toggles this class) */
.mrj-vip-popup-img.is-zoomed {
  object-fit: contain;
  transform: scale(2);
  transform-origin: center top;
}

/* Topbar (Logout) */
.mrj-vip .mrj-vip-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
}

.mrj-vip .mrj-vip-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #924391;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.15);
}

.mrj-vip .mrj-vip-logout:hover {
  opacity: 0.9;
}

.mrj-vip .mrj-vip-logout:active {
  transform: translateY(1px);
}

