/* =====================================================
   QuickStand – Create Modal (Bottom Sheet)
   Ziel: kompakt, modern, iOS-safe, responsive für jede Größe
===================================================== */

.qs-create-modal{
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
}
.qs-create-modal.is-open{ display: block; }

.qs-create-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 180ms ease;
  touch-action: none;
}

/* ====== Bottom Sheet (Mobile/Tablet bis 1023px) ====== */
.qs-create-sheet{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  width: auto;
  max-width: 100%;
  margin: 0;

  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(0,0,0,.20);

  /* kompakter, damit es nicht "zu groß" wirkt */
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  box-sizing: border-box;

  /* responsive max-height: nie riesig, nie zu klein */
  max-height: clamp(190px, 40vh, 320px);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  --qs-sheet-y: 0px;
  transform: translateY(var(--qs-sheet-y));
  transition: transform 220ms ease;
}

/* iOS: svh verhindert "zu groß" wegen Safari Address-Bar */
@supports (height: 100svh){
  .qs-create-sheet{
    max-height: clamp(190px, 40svh, 320px);
  }
}

/* Sehr kleine Geräte: noch etwas kompakter */
@media (max-width: 360px){
  .qs-create-sheet{
    padding: 9px 12px calc(11px + env(safe-area-inset-bottom));
    max-height: clamp(180px, 44vh, 300px);
  }
  @supports (height: 100svh){
    .qs-create-sheet{ max-height: clamp(180px, 44svh, 300px); }
  }
}

/* Landscape / kleine Höhe: noch kompakter, damit nix "drüber" wirkt */
@media (max-height: 520px){
  .qs-create-sheet{
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
    max-height: clamp(170px, 58vh, 280px);
  }
  @supports (height: 100svh){
    .qs-create-sheet{ max-height: clamp(170px, 58svh, 280px); }
  }
}

/* Handle */
.qs-create-handle{
  flex: 0 0 auto;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  margin: 2px auto 8px;
  touch-action: none;
}

/* Header */
.qs-create-header{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.qs-create-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #0b2a4a;
}

/* Close Button (mit close.png) */
.qs-create-close{
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);

  /* WICHTIG: nicht "background:" verwenden, sondern background-color */
  background-color: rgba(0,0,0,.03);

  /* Icon */
  background-image: url("/assets/icons/close.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;

  /* Das "×" im HTML bleibt als Fallback, wird aber unsichtbar */
  color: transparent;
  font-size: 0;
  line-height: 0;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.qs-create-close:hover{
  background-color: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.14);
}

.qs-create-close:active{
  transform: scale(0.96);
  background-color: rgba(0,0,0,.08);
}

.qs-create-close:focus-visible{
  outline: 2px solid rgba(11,42,74,.35);
  outline-offset: 2px;
}

/* Content: scrollt nur wenn’s mal mehr Einträge werden */
.qs-create-actions{
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 2px;
}

/* Buttons (etwas kompakter & moderner) */
.qs-create-action{
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  color: #0b2a4a;

  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.qs-create-action.primary{
  border: 0;
  background: linear-gradient(180deg, #0b2a4a, #071d33);
  color: #fff;
}

.qs-create-action:not([disabled]):active{
  transform: scale(0.99);
}

.qs-create-action:disabled,
.qs-create-action[disabled]{
  opacity: .45;
}

/* Body-Lock (JS ergänzt das iOS-feste Locking) */
html.qs-modal-open,
body.qs-modal-open{
  height: 100%;
  overflow: hidden;
}

/* ====== Desktop: Center-Dialog erst ab 1024px ====== */
@media (min-width: 1024px){
  .qs-create-sheet{
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;

    width: min(520px, calc(100vw - 32px));
    max-width: none;

    border-radius: 18px;
    padding: 18px;

    max-height: min(80vh, 560px);
    overflow: hidden;

    transform: translate(-50%, -50%) translateY(var(--qs-sheet-y));
  }

  .qs-create-handle{ display: none; }

  .qs-create-header{
    padding-bottom: 12px;
  }

  .qs-create-title{
    font-size: 22px;
  }
}


/* =====================================================
   Milestone 1 — Home / Hub Create Chooser uplift
===================================================== */
.qs-create-copy{
  display:grid;
  gap:8px;
  min-width:0;
}
.qs-create-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:28px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid rgba(11,42,74,.08);
  background:rgba(238,246,255,.94);
  color:#5a789a;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.qs-create-desc{
  color:#68809a;
  font-size:14px;
  line-height:1.6;
  max-width:48ch;
}
.qs-create-action{
  position:relative;
  min-height:72px;
  height:auto;
  padding:16px 18px;
  gap:14px;
  justify-content:flex-start;
  text-align:left;
  box-shadow:0 14px 32px rgba(11,42,74,.06);
}
.qs-create-action-icon{
  width:46px;
  height:46px;
  flex:0 0 46px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:900;
  border:1px solid rgba(11,42,74,.08);
  background:#eef6ff;
  color:#0b2a4a;
}
.qs-create-action.primary .qs-create-action-icon{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.16);
  color:#fff;
}
.qs-create-action-copy{
  display:grid;
  gap:5px;
  min-width:0;
}
.qs-create-action-title{
  font-size:18px;
  font-weight:900;
  line-height:1.15;
}
.qs-create-action-note{
  font-size:13px;
  line-height:1.5;
  color:#627892;
  font-weight:700;
}
.qs-create-action.primary .qs-create-action-note{
  color:rgba(255,255,255,.82);
}
.qs-create-action-cancel{
  background:#fff;
}

@media (max-width: 1023px){
  .qs-create-sheet{
    border-radius:28px 28px 0 0;
    padding:14px 16px calc(16px + env(safe-area-inset-bottom));
    max-height:min(76svh, 560px);
  }
  .qs-create-header{
    align-items:flex-start;
    gap:14px;
    padding-bottom:14px;
  }
  .qs-create-actions{
    gap:12px;
    margin-top:14px;
  }
}

@media (min-width: 1024px){
  .qs-create-sheet{
    width:min(680px, calc(100vw - 48px));
    padding:24px;
    border-radius:30px;
    border:1px solid rgba(11,42,74,.08);
    background:
      radial-gradient(circle at top right, rgba(0,148,255,.08), transparent 38%),
      linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,251,255,.99) 100%);
    box-shadow:0 28px 70px rgba(11,42,74,.18);
  }
  .qs-create-header{
    align-items:flex-start;
    gap:18px;
    padding-bottom:16px;
    border-bottom:1px solid rgba(11,42,74,.08);
  }
  .qs-create-title{
    font-size:clamp(34px, 2.5vw, 42px);
    line-height:1.02;
    letter-spacing:-.03em;
  }
  .qs-create-close{
    width:52px;
    height:52px;
    min-width:52px;
    min-height:52px;
    border-radius:18px;
    background-size:20px 20px;
  }
  .qs-create-actions{
    gap:14px;
    margin-top:18px;
  }
  .qs-create-action{
    min-height:96px;
    border-radius:22px;
    padding:18px 20px;
  }
}


/* =====================================================
   Milestone 1 refresh — chooser lighter / calmer
===================================================== */
.qs-create-backdrop{
  background: rgba(7, 23, 38, .22);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.qs-create-sheet{
  background:
    radial-gradient(circle at top right, rgba(0,148,255,.04), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.985) 0%, rgba(249,252,255,.985) 100%);
  border-color: rgba(11,42,74,.08);
  box-shadow: 0 18px 44px rgba(11,42,74,.12);
}
.qs-create-header{
  padding-bottom: 10px;
  border-bottom-color: rgba(11,42,74,.06);
}
.qs-create-title{
  font-size: clamp(1.7rem, 1.15rem + 1vw, 2.35rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  color: #0b2a4a;
}
.qs-create-desc{
  max-width: 41ch;
  font-size: 13px;
  line-height: 1.5;
  color: #67819b;
}
.qs-create-close{
  border-color: rgba(11,42,74,.09);
  background-color: rgba(247,251,255,.96);
  box-shadow: none;
}
.qs-create-actions{
  gap: 10px;
}
.qs-create-action{
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 20px;
  border-color: rgba(11,42,74,.08);
  background: rgba(255,255,255,.97);
  box-shadow: 0 8px 18px rgba(11,42,74,.05);
  gap: 12px;
}
.qs-create-action:hover{
  box-shadow: 0 12px 24px rgba(11,42,74,.08);
}
.qs-create-action.primary{
  background: linear-gradient(180deg, rgba(239,247,255,.98) 0%, rgba(232,242,255,.98) 100%);
  border: 1px solid rgba(0,148,255,.22);
  color: #0b2a4a;
}
.qs-create-action.primary .qs-create-action-note{
  color: #5d7892;
}
.qs-create-action.primary .qs-create-action-icon{
  background: #0b2a4a;
  border-color: rgba(11,42,74,.08);
  color: #fff;
}
.qs-create-action-cancel{
  background: rgba(255,255,255,.9);
}
.qs-create-action-icon{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  font-size: 18px;
  box-shadow: none;
}
.qs-create-action-title{
  font-size: 17px;
  line-height: 1.12;
}
.qs-create-action-note{
  font-size: 12px;
  line-height: 1.42;
  font-weight: 700;
  color: #69829c;
}
@media (max-width: 1023px){
  .qs-create-sheet{
    max-height: min(66svh, 480px);
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .qs-create-header{
    gap: 12px;
    padding-bottom: 12px;
  }
  .qs-create-actions{
    gap: 10px;
    margin-top: 12px;
  }
}
@media (min-width: 1024px){
  .qs-create-sheet{
    width: min(610px, calc(100vw - 56px));
    padding: 18px 18px 16px;
    border-radius: 26px;
    max-height: none;
    overflow: visible;
    box-shadow: 0 22px 52px rgba(11,42,74,.14);
  }
  .qs-create-header{
    gap: 14px;
    padding-bottom: 12px;
  }
  .qs-create-close{
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 16px;
    background-size: 18px 18px;
  }
  .qs-create-actions{
    margin-top: 14px;
    overflow: visible;
  }
  .qs-create-action{
    min-height: 80px;
    padding: 14px 16px;
    border-radius: 20px;
  }
}


/* === Milestone 24 — Create chooser icons + button weight after QA === */
.qs-create-actions{
  gap:14px;
}

.qs-create-action{
  min-height:96px;
  height:auto;
  padding:18px 18px;
  justify-content:flex-start;
  gap:14px;
  border-radius:22px;
  border:1px solid rgba(11,42,74,.10);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,250,255,.98) 100%);
  box-shadow:0 14px 30px rgba(15,23,42,.05), inset 0 1px 0 rgba(255,255,255,.72);
}

.qs-create-action:hover{
  box-shadow:0 18px 36px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.75);
  border-color:rgba(11,42,74,.14);
}

.qs-create-action.primary{
  border:1px solid rgba(0,72,156,.10);
  background:linear-gradient(180deg, rgba(237,245,255,.98) 0%, rgba(228,239,252,.98) 100%);
  color:#0b2a4a;
  box-shadow:0 18px 36px rgba(22,55,97,.08), inset 0 1px 0 rgba(255,255,255,.82);
}

.qs-create-action.primary .qs-create-action-note{
  color:#58718b;
}

.qs-create-action-cancel{
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,251,253,.98) 100%);
}

.qs-create-action-icon{
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:18px;
  border:1px solid rgba(11,42,74,.10);
  background:linear-gradient(180deg, rgba(14,40,76,.95) 0%, rgba(10,32,62,.98) 100%);
  color:#fff;
  box-shadow:0 12px 24px rgba(12,30,54,.16), inset 0 1px 0 rgba(255,255,255,.10);
}

.qs-create-action.primary .qs-create-action-icon{
  background:linear-gradient(180deg, #1f4d80 0%, #143b67 100%);
  border-color:rgba(18,59,103,.18);
  color:#fff;
}

.qs-create-action-cancel .qs-create-action-icon{
  background:linear-gradient(180deg, #f4f7fb 0%, #eef2f7 100%);
  border-color:rgba(11,42,74,.10);
  color:#0b2a4a;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}

.qs-create-action-icon svg{
  width:24px;
  height:24px;
  display:block;
}

.qs-create-action-icon svg *{
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.qs-create-action-title{
  font-size:17px;
  letter-spacing:-.01em;
}

.qs-create-action-note{
  color:#667f97;
  font-size:13px;
  line-height:1.45;
}

@media (max-width: 767px){
  .qs-create-action{
    min-height:90px;
    padding:16px 16px;
    gap:12px;
  }

  .qs-create-action-icon{
    width:48px;
    height:48px;
    flex-basis:48px;
    border-radius:16px;
  }

  .qs-create-action-title{
    font-size:16px;
  }
}


/* =====================================================
   Story Milestone 1 — Create Chooser schlanker/klicksicher
   ===================================================== */
.qs-create-modal{
  pointer-events:none;
}
.qs-create-modal.is-open{
  pointer-events:auto;
}
.qs-create-backdrop{
  background:rgba(7,23,38,.20);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.qs-create-sheet{
  isolation:isolate;
  color:#0b2a4a;
}
.qs-create-header{
  align-items:flex-start;
  gap:12px;
}
.qs-create-kicker{
  min-height:24px;
  padding:0 9px;
  font-size:11px;
  letter-spacing:.075em;
}
.qs-create-title{
  font-size:clamp(1.65rem, 1.2rem + 1vw, 2.05rem);
  line-height:1.04;
}
.qs-create-desc{
  max-width:38ch;
  font-size:13px;
  line-height:1.45;
}
.qs-create-close{
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  border-radius:15px;
}
.qs-create-actions{
  gap:9px;
}
.qs-create-action{
  min-height:62px;
  padding:12px 14px;
  border-radius:18px;
  box-shadow:0 8px 18px rgba(11,42,74,.045);
  gap:11px;
}
.qs-create-action:hover{
  transform:translateY(-1px);
}
.qs-create-action-icon{
  width:38px;
  height:38px;
  flex-basis:38px;
  border-radius:13px;
}
.qs-create-action-title{
  font-size:16px;
}
.qs-create-action-note{
  font-size:12px;
  line-height:1.35;
}
.qs-create-action,
.qs-create-action *,
.qs-create-close,
.qs-create-backdrop{
  pointer-events:auto;
}
@media (min-width:1024px){
  .qs-create-sheet{
    width:min(520px, calc(100vw - 64px));
    padding:18px;
    border-radius:24px;
    max-height:min(86vh, 520px);
    overflow:auto;
    box-shadow:0 20px 50px rgba(11,42,74,.13);
  }
  .qs-create-header{
    padding-bottom:10px;
  }
  .qs-create-actions{
    margin-top:12px;
    gap:10px;
  }
  .qs-create-action{
    min-height:66px;
    padding:12px 14px;
  }
}
@media (max-width:560px){
  .qs-create-title{
    font-size:1.55rem;
  }
  .qs-create-desc{
    font-size:12.5px;
  }
  .qs-create-action{
    min-height:58px;
    padding:11px 12px;
  }
  .qs-create-action-note{
    display:none;
  }
}

