/* CannaGrow 0.17.13 – Online-Accounts, responsive UI & Shop-Polish */

/* Header: CannaCoins bleiben auf Touchgeräten wirklich erreichbar. */
#openCoinWalletBtn,
.hud-coin-button {
  position: relative;
  z-index: 12;
  pointer-events: auto !important;
  touch-action: manipulation;
}

#headerLogoutBtn.cg-header-logout {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

@media (max-width: 900px), (pointer: coarse) {
  .topbar .hud {
    position: relative;
    z-index: 10;
  }
  #openCoinWalletBtn,
  .hud-coin-button {
    min-height: 48px !important;
    min-width: 76px !important;
  }
  #headerLogoutBtn.cg-header-logout {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }
}

/* Schneller trocknen: Kosten direkt im Button statt Hinweiszeile darunter. */
.cg-drying-quick-note { display: none !important; }
.cg-quick-dry-coins {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 8px;
  white-space: nowrap;
  vertical-align: middle;
}
.cg-quick-dry-coins .hud-coin-symbol { font-size: .9em; }

/* Aktive Technik: Werte und Wartung dürfen sich nicht überlagern. */
.cg-active-tech-01713 {
  min-width: 0 !important;
  overflow: hidden !important;
}
.cg-active-tech-01713 * { box-sizing: border-box; min-width: 0; }
.cg-active-tech-01713 .cg-tech-sidecopy-01713 {
  white-space: nowrap;
  text-align: right;
}
.cg-active-tech-01713 .cg-tech-maintenance-01713 {
  position: static !important;
  transform: none !important;
  max-width: 100%;
}
@media (max-width: 700px), (pointer: coarse) {
  .cg-active-tech-01713 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .cg-active-tech-01713 .cg-tech-maintenance-01713 {
    margin-left: auto !important;
    margin-top: 8px !important;
  }
  .cg-active-tech-01713 .cg-tech-sidecopy-01713 {
    font-size: .86rem !important;
  }
}

/* Kundenanfragen: alle Werte bleiben innerhalb ihrer Karten. */
.cg-customer-order-01713 {
  min-width: 0 !important;
  overflow: hidden !important;
}
.cg-customer-order-01713 * {
  box-sizing: border-box;
  min-width: 0;
}
.cg-customer-order-01713 .cg-order-price-01713 {
  overflow: hidden !important;
}
.cg-customer-order-01713 .cg-order-price-01713 strong,
.cg-customer-order-01713 .cg-order-price-01713 b,
.cg-customer-order-01713 .cg-order-price-01713 [class*="price"] {
  font-size: clamp(1.15rem, 2.1vw, 1.8rem) !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.cg-customer-order-01713 .cg-order-progress-value-01713 {
  position: static !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  display: inline-block !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
.cg-customer-order-01713 img { max-width: 100%; }
@media (max-width: 780px), (pointer: coarse) {
  .cg-customer-order-01713 {
    width: 100% !important;
    max-width: 100% !important;
  }
  .cg-customer-order-01713 .cg-order-price-01713 strong,
  .cg-customer-order-01713 .cg-order-price-01713 b,
  .cg-customer-order-01713 .cg-order-price-01713 [class*="price"] {
    font-size: clamp(1.05rem, 5vw, 1.55rem) !important;
  }
}

/* Admin: Buttons/Stepper bleiben innerhalb des verfügbaren Rasters. */
#adminView,
#adminView * { box-sizing: border-box; }
#adminView button,
#adminView input,
#adminView select {
  max-width: 100%;
  min-width: 0;
}
#adminView button {
  white-space: normal;
  overflow-wrap: anywhere;
}
#adminView input[type="number"] {
  width: 100% !important;
  min-width: 64px !important;
  text-align: center;
}
#adminView .stepper,
#adminView .number-stepper,
#adminView [class*="stepper"] {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
}
#adminView .stepper button,
#adminView .number-stepper button,
#adminView [class*="stepper"] > button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
@media (max-width: 900px) {
  #adminView .admin-grid,
  #adminView [class*="admin-grid"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Shop-Gruppen als einheitliche Accordions. */
.cg-shop-accordion-01713 {
  overflow: hidden;
}
.cg-shop-accordion-head {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding-right: 42px !important;
}
.cg-shop-chevron-01713 {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transition: transform .18s ease;
  font-size: 1.25rem;
  opacity: .8;
  pointer-events: none;
}
.cg-shop-accordion-01713.is-open .cg-shop-chevron-01713 {
  transform: translateY(-50%) rotate(0deg);
}
.cg-shop-accordion-body { display: none; }
.cg-shop-accordion-01713.is-open > .cg-shop-accordion-body { display: block; }

/* Account: kompakte aufklappbare Zeilen wie bei Passwort. */
.cg-account-accordion-01713 {
  width: 100%;
  border-top: 1px solid rgba(123, 255, 169, .13);
}
.cg-account-accordion-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  text-align: left;
}
.cg-account-accordion-toggle > span {
  font-size: 1.5rem;
  transition: transform .18s ease;
}
.cg-account-accordion-01713.is-open > .cg-account-accordion-toggle > span {
  transform: rotate(90deg);
}
.cg-account-accordion-body { display: none; padding: 6px 0 18px; }
.cg-account-accordion-01713.is-open > .cg-account-accordion-body { display: block; }
.cg-account-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.cg-account-inline-form input { width: 100%; min-width: 0; }
.cg-account-hint { margin-top: 0; }
@media (max-width: 600px) {
  .cg-account-inline-form { grid-template-columns: 1fr; }
  .cg-account-inline-form button { width: 100%; }
}

/* Pflanzenkunde bleibt im Code sichtbar, ist aber vorübergehend gesperrt. */
.cg-disabled-skill-01713 {
  position: relative;
  opacity: .72;
}
.cg-disabled-skill-01713 button { cursor: not-allowed !important; }
.cg-disabled-skill-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 92, .35);
  font-size: .78rem;
  font-weight: 700;
}

/* Credits für alle Spieler. */
.cg-public-credits-01713 {
  margin-top: 24px;
  padding: 24px;
}
.cg-credit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.cg-credit-grid > div {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
}
.cg-credit-grid span,
.cg-credit-grid strong { display: block; }
.cg-credit-grid span { opacity: .68; margin-bottom: 7px; }
.cg-credit-wide { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .cg-credit-grid { grid-template-columns: 1fr; }
  .cg-credit-wide { grid-column: auto; }
}

/* Landing / Login */
.cg-remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  cursor: pointer;
}
.cg-remember-row input {
  width: 20px;
  height: 20px;
  accent-color: #52e98a;
}
.cg-email-required-note {
  display: block;
  margin-top: 7px;
  opacity: .7;
  font-size: .78rem;
}
.cg-forgot-password {
  width: auto !important;
  min-height: 0 !important;
  margin: 8px 0 6px;
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-decoration: underline;
  font-size: .86rem;
}
.cg-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 8, 4, .78);
  backdrop-filter: blur(10px);
}
.cg-auth-modal.hidden { display: none !important; }
.cg-auth-modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(82, 233, 138, .35);
  border-radius: 24px;
  background: #071a10;
  color: #edf8f1;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.cg-auth-modal-card h2 { margin: 7px 0 12px; }
.cg-auth-modal-card p { opacity: .78; line-height: 1.5; }
.cg-auth-modal-card input {
  width: 100%;
  min-height: 50px;
  margin: 7px 0;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid rgba(82, 233, 138, .22);
  background: #06140d;
  color: inherit;
}
.cg-auth-modal-card button:not(.cg-auth-modal-close) {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border-radius: 13px;
  font-weight: 800;
}
.cg-auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.6rem;
}
.cg-auth-modal-status { min-height: 24px; margin-top: 12px; line-height: 1.4; }
.cg-reset-request.hidden,
.cg-reset-confirm.hidden { display: none !important; }
.cg-register-email-field { display: block; margin: 8px 0 12px; }
.cg-register-email-field > span { display: block; margin-bottom: 7px; font-weight: 700; }
.cg-register-email-field input { width: 100%; }
.cg-admin-mail-01713 { margin-top: 22px; padding: 22px; }
.cg-admin-mail-01713 h3 { margin: 6px 0 10px; }
.cg-admin-mail-01713 > small { display: block; margin-top: 10px; opacity: .68; }

/* 0.17.14 – Account-Accordion-Hotfix: exakt eine Zeile je Funktion. */
.cg-account-original-email-hidden-01714 { display: none !important; }
#cgAccountSettings01714.cg-account-settings-01714 {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #eef7f1;
}
.cg-account-row-01714 {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(82, 233, 138, .16);
  background: transparent;
}
.cg-account-row-toggle-01714 {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 14px 4px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #eef7f1 !important;
  box-shadow: none !important;
  text-align: left;
  cursor: pointer;
}
.cg-account-row-toggle-01714 strong {
  color: inherit !important;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
.cg-account-row-toggle-01714 > span {
  flex: 0 0 auto;
  color: #c9ded0 !important;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform .18s ease;
}
.cg-account-row-01714.is-open > .cg-account-row-toggle-01714 > span {
  transform: rotate(90deg);
}
.cg-account-row-body-01714 {
  padding: 0 4px 18px;
  color: #eef7f1;
}
.cg-account-row-body-01714[hidden] { display: none !important; }
.cg-account-hint-01714 {
  margin: 0 0 12px;
  color: #9eb3a7 !important;
  line-height: 1.45;
}
.cg-account-form-01714 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.cg-account-form-01714 input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  color: #eef7f1 !important;
  background: rgba(2, 18, 10, .62) !important;
  border: 1px solid rgba(82, 233, 138, .26) !important;
}
.cg-account-status-01714 {
  display: block;
  min-height: 20px;
  margin-top: 9px;
  color: #9eb3a7 !important;
}
@media (max-width: 600px) {
  .cg-account-row-toggle-01714 { min-height: 62px; }
  .cg-account-form-01714 { grid-template-columns: 1fr; }
  .cg-account-form-01714 button { width: 100%; }
}

/* 0.17.14 – Landing/Login: neue Optionen sichtbar und im bestehenden Stil. */
.cg-remember-row {
  color: #e8f5ec !important;
  font-weight: 700;
}
.cg-remember-row input {
  flex: 0 0 auto;
  cursor: pointer;
}
.cg-forgot-password {
  color: #69ee99 !important;
  cursor: pointer;
}
.cg-register-email-field,
.cg-register-email-field > span,
.cg-email-required-note {
  color: #d9ebe0 !important;
}

/* 0.17.32 – öffentlicher Login/Registrierung auf kleinen Displays aufräumen. */
@media (max-width: 820px) {
  body.cg-landing-auth-01732 .cg-landing-login-form-01732,
  body.cg-landing-auth-01732 .cg-landing-register-form-01732 {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
    align-items: start !important;
  }

  body.cg-landing-auth-01732 .cg-landing-field-01732,
  body.cg-landing-auth-01732 .cg-landing-field-01732 input,
  body.cg-landing-auth-01732 .cg-register-email-field,
  body.cg-landing-auth-01732 .cg-register-email-field input {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.cg-landing-auth-01732 .cg-landing-login-form-01732 input:not([type="checkbox"]),
  body.cg-landing-auth-01732 .cg-landing-register-form-01732 input:not([type="checkbox"]) {
    min-height: 46px !important;
  }

  body.cg-landing-auth-01732 .cg-remember-row {
    margin: 2px 0 0 !important;
    min-height: 38px;
    align-self: center;
  }

  body.cg-landing-auth-01732 .cg-forgot-password {
    display: block !important;
    margin: 6px 0 0 !important;
    line-height: 1.25 !important;
    text-align: left !important;
  }

  body.cg-landing-auth-01732 .cg-landing-submit-01732,
  body.cg-landing-auth-01732 .cg-landing-submit-wrap-01732 {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.cg-landing-auth-01732 .cg-landing-submit-01732 {
    min-height: 46px !important;
  }

  body.cg-landing-auth-01732 .cg-landing-submit-wrap-01732 {
    grid-column: 1 / -1 !important;
  }

  body.cg-landing-auth-01732 .cg-landing-nav-01732 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px 12px !important;
    width: 100% !important;
  }

  body.cg-landing-auth-01732 .cg-landing-nav-item-01732 {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 520px) {
  body.cg-landing-auth-01732 .cg-landing-login-form-01732,
  body.cg-landing-auth-01732 .cg-landing-register-form-01732 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
  }
  body.cg-landing-auth-01732 .cg-landing-submit-wrap-01732 {
    grid-column: auto !important;
  }
  body.cg-landing-auth-01732 .cg-landing-submit-01732 {
    width: 100% !important;
  }
}
