/**
 * LGC Schloss Moyland - Progressive Web App (PWA) Stylesheet
 * Homescreen-Installation, Offline-Indikator & Dialog-Modale
 */

/* 1. Scorekarte PWA Install Banner (platziert im #lgc-pwa-slot) */
#lgc-pwa-slot {
  padding: 0 24px;
  display: block;
}

.lgc-pwa-banner {
  background: #fbf9f5;
  border: 1.5px solid #C8A96E;
  border-radius: 10px;
  padding: 12px 18px;
  margin: 14px 0 10px 0;
  color: #1F2923;
  box-shadow: 0 4px 14px rgba(14, 56, 34, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  box-sizing: border-box;
  animation: lgcPwaFadeIn 0.3s ease-out;
}

@keyframes lgcPwaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lgc-pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.lgc-pwa-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: #0E3822;
  padding: 3px;
  border: 1px solid #C8A96E;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  object-fit: contain;
}

.lgc-pwa-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lgc-pwa-title {
  font-size: 14px;
  font-weight: 800;
  color: #0E3822;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.25;
}

.lgc-pwa-badge-offline {
  display: inline-block;
  background: rgba(14, 56, 34, 0.08);
  color: #0E3822;
  border: 1px solid rgba(14, 56, 34, 0.2);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lgc-pwa-desc {
  font-size: 12.5px;
  color: #58695F;
  margin: 0;
  line-height: 1.35;
}

.lgc-pwa-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lgc-pwa-install-btn {
  background: #0E3822;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(14, 56, 34, 0.18);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: inherit;
}

.lgc-pwa-install-btn:hover {
  background: #185c39;
  transform: translateY(-1px);
}

.lgc-pwa-dismiss-btn {
  background: transparent;
  border: none;
  color: #8A9A90;
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lgc-pwa-dismiss-btn:hover {
  color: #0E3822;
  background: rgba(14, 56, 34, 0.08);
}

/* 2. Standalone Active Badge (wenn bereits als App geöffnet) */
.lgc-pwa-standalone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 56, 34, 0.12);
  color: #0E3822;
  border: 1px solid rgba(14, 56, 34, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 8px;
}

.lgc-pwa-standalone-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27ae60;
  box-shadow: 0 0 6px rgba(39, 174, 96, 0.6);
}

/* 3. Header Quick Install Button */
.lgc-pwa-header-action-btn {
  background: #ffffff;
  color: #0E3822;
  border: 1.5px solid #C8A96E;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lgc-pwa-header-action-btn:hover {
  background: #0E3822;
  color: #C8A96E;
}

/* 4. Step-by-Step Guidance Modals (iOS Safari & Android/Chrome) */
.lgc-pwa-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: lgcPwaFadeIn 0.25s ease;
}

.lgc-pwa-modal-card {
  background: #ffffff !important;
  opacity: 1 !important;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 24px 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  box-sizing: border-box;
  color: #2D3748;
  font-family: inherit;
}

.lgc-pwa-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8E4;
  margin-bottom: 16px;
}

.lgc-pwa-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.lgc-pwa-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0E3822;
  margin: 0;
  line-height: 1.25;
}

.lgc-pwa-modal-sub {
  font-size: 12px;
  color: #58695F;
  margin: 2px 0 0;
}

.lgc-pwa-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.lgc-pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lgc-pwa-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0E3822;
  color: #C8A96E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.lgc-pwa-step-text {
  font-size: 13px;
  line-height: 1.45;
  color: #2D3748;
}

.lgc-pwa-step-text strong {
  color: #0E3822;
}

.lgc-pwa-symbol {
  display: inline-block;
  background: #F1F4F2;
  border: 1px solid #D2DBD5;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  color: #0E3822;
}

.lgc-pwa-modal-share-btn {
  background: #C8A96E;
  color: #0E3822;
  font-weight: 800;
  font-size: 13.5px;
  padding: 11px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(200, 169, 110, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.lgc-pwa-modal-share-btn:hover {
  background: #DFCA95;
  transform: translateY(-1px);
}

.lgc-pwa-modal-benefit {
  background: #F8FAF9;
  border-left: 3px solid #C8A96E;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #58695F;
  margin-bottom: 18px;
  line-height: 1.4;
}

.lgc-pwa-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.lgc-pwa-modal-close-btn {
  background: #0E3822;
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lgc-pwa-modal-close-btn:hover {
  background: #144D30;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  #lgc-pwa-slot {
    padding: 0 12px;
  }
  .lgc-pwa-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
    margin: 10px 0 6px 0;
  }
  .lgc-pwa-banner-left {
    gap: 10px;
  }
  .lgc-pwa-app-icon {
    width: 38px;
    height: 38px;
  }
  .lgc-pwa-title {
    font-size: 13.5px;
  }
  .lgc-pwa-desc {
    font-size: 12px;
  }
  .lgc-pwa-banner-right {
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
  }
  .lgc-pwa-install-btn {
    flex: 1;
    justify-content: center;
    padding: 9px 12px;
    font-size: 13px;
  }
  .lgc-pwa-dismiss-btn {
    padding: 6px 10px;
  }
}
