:root{
  --wk-bg: rgba(15, 23, 42, .35);
  --wk-card: #f4f6fb;
  --wk-text: #0f172a;
  --wk-muted: #475569;
  --wk-border: rgba(15, 23, 42, .12);
  --wk-btn: rgba(15, 23, 42, .06);
  --wk-btn2: rgba(15, 23, 42, .10);
  --wk-good: #16a34a;
  --wk-bad: #dc2626;
  --wk-warn: #d97706;

  --wk-input-bg: #ffffff;
  --wk-item-bg: rgba(15, 23, 42, .03);
  --wk-shadow: 0 10px 40px rgba(2,6,23,.18);
}

*, *::before, *::after { box-sizing: border-box; }

html,body{
  height:100%;
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  overflow-x: hidden;
}

.wk-root{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--wk-bg);
  padding: 14px;
  overflow-x: hidden;
}

.wk-card{
  width:min(720px,100%);
  max-height: min(86vh, 760px);
  display:flex;
  flex-direction:column;
  background: var(--wk-card);
  color: var(--wk-text);
  border: 1px solid var(--wk-border);
  border-radius: 14px;
  box-shadow: var(--wk-shadow);
  overflow:hidden;
}

.wk-head{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--wk-border);
  background: var(--wk-card);
}

.wk-title{
  font-weight:800;
  font-size:16px;
}

.wk-close{
  background: transparent;
  color: var(--wk-text);
  border:0;
  font-size:18px;
  cursor:pointer;
  opacity:.75;
}
.wk-close:hover{opacity:1;}

.wk-body{
  flex: 1 1 auto;
  overflow:auto;
  -webkit-overflow-scrolling: touch;

  padding:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.wk-row{
  display:flex;
  gap:10px;
  align-items:center;
}

.wk-ac{
  flex: 1 1 auto;
  min-width:0;
}

.wk-ac .wk-input{
  width:80%;
}

.wk-row > .wk-btn{
  flex: 0 0 auto;
}

.wk-input{
  width:100%;
  background: var(--wk-input-bg);
  border: 1px solid var(--wk-border);
  color: var(--wk-text);
  border-radius: 10px;
  padding: 11px 12px;
  outline:none;
}
.wk-input:focus{
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.wk-btn{
  border: 1px solid var(--wk-border);
  background: var(--wk-btn);
  color: var(--wk-text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor:pointer;
  white-space:nowrap;
}
.wk-btn:hover{background: var(--wk-btn2);}
.wk-btn[disabled]{opacity:.5;cursor:not-allowed;}

.wk-btn-primary{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.35);
}

.wk-btn-lite{
  padding:7px 10px;
  font-size: 13px;
}

.wk-hint{
  color: var(--wk-muted);
  font-size: 13px;
  margin-top:8px;
}

.wk-subhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.wk-meta{
  color: var(--wk-muted);
  font-size: 13px;
}

/* Wichtig: ID selector, weil dein HTML id="wk-results-list" nutzt */
#wk-results-list{
  max-height: 40vh;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.wk-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.wk-item{
  display:flex;
  gap:10px;
  align-items:center;
  border: 1px solid var(--wk-border);
  background: var(--wk-item-bg);
  border-radius: 12px;
  padding: 10px;
}

.wk-cover{
  width:46px;
  height:46px;
  border-radius: 10px;
  background: rgba(15,23,42,.04);
  border:1px solid var(--wk-border);
  flex: 0 0 auto;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--wk-muted);
  font-size: 12px;
}
.wk-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* kleiner Cover im Suggest */
.wk-cover.wk-cover-sm{
  width:38px;
  height:38px;
  border-radius: 10px;
}

.wk-item-main{
  flex:1;
  min-width:0;
}

.wk-artist{
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wk-title2{
  color: var(--wk-muted);
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:2px;
}

.wk-item-actions{
  flex: 0 0 auto;
  display:flex;
  gap:8px;
  align-items:center;
}

.wk-pmeta{
  margin-top:6px;
  font-size:12px;
  color: var(--wk-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wk-msg{
  margin-top:6px;
  font-size: 14px;
}
.wk-msg.good{color: var(--wk-good);}
.wk-msg.bad{color: var(--wk-bad);}
.wk-msg.warn{color: var(--wk-warn);}

.wk-hidden{display:none;}

.wk-search{ position:relative; z-index:50; }
.wk-ac{ position:relative; }

.wk-search, .wk-row, .wk-ac{ overflow:visible; }

/* After submit: only pending visible */
.wk-only-pending .wk-search,
.wk-only-pending .wk-results,
.wk-only-pending .wk-form{
  display:none;
}
.wk-only-pending #wk-again-row{
  display:flex;
}

/* Suggest dropdown */
.wk-ac-list{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 6px);
  z-index: 2000;
  border: 1px solid var(--wk-border);
  background: var(--wk-card);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(2,6,23,.14);
  overflow:hidden;
}

.wk-ac-scroll{
  max-height: 240px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.wk-ac-item{
  width:100%;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border:0;
  background: transparent;
  color: var(--wk-text);
  text-align:left;
  cursor:pointer;
}

.wk-ac-item + .wk-ac-item{
  border-top: 1px solid rgba(15,23,42,.08);
}

.wk-ac-item:hover,
.wk-ac-item.is-active{
  background: rgba(37,99,235,.06);
}

.wk-ac-left{
  min-width:0;
  flex: 1 1 auto;
}

.wk-ac-artist{
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wk-ac-title{
  margin-top:2px;
  font-size:13px;
  color: var(--wk-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wk-ac-right{
  flex: 0 0 auto;
  color: var(--wk-muted);
}

.wk-ac-foot{
  padding: 10px 12px;
  border-top: 1px solid var(--wk-border);
}

.wk-selected{
  border: 1px solid var(--wk-border);
  background: rgba(34,197,94,.06);
  border-radius: 12px;
  padding: 10px;
}

.wk-selected-inner{
  display:flex;
  gap:10px;
  align-items:center;
}

.wk-selected-label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color: var(--wk-good);
  font-weight:700;
  margin-bottom:3px;
}

.wk-selected-artist{
  font-weight:800;
  line-height:1.2;
}

.wk-selected-title{
  color: var(--wk-muted);
  line-height:1.2;
}

.wk-item.wk-recent{
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.10);
}

.wk-item.wk-recent .wk-artist{
  color: #166534;
}

/* Primary CTA stärker hervorheben */
.wk-actions{
  margin-top: 4px;
}

#wk-submit-btn.wk-btn-primary{
  width: 100%;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .2px;
  padding: 14px 14px;
  border-radius: 12px;

  background: linear-gradient(180deg, rgba(34,197,94,.28), rgba(34,197,94,.18));
  border: 1px solid rgba(34,197,94,.55);

  box-shadow:
    0 10px 24px rgba(2,6,23,.14),
    0 0 0 4px rgba(34,197,94,.14);

  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}

#wk-submit-btn.wk-btn-primary{
  background: linear-gradient(180deg, rgba(49,111,179,.25), rgba(49,111,179,.15));
  border: 1px solid rgba(49,111,179,.55);

  box-shadow:
    0 10px 24px rgba(2,6,23,.14),
    0 0 0 4px rgba(49,111,179,.14);
}

#wk-submit-btn.wk-btn-primary:active{
  transform: translateY(1px);
}

#wk-submit-btn.wk-btn-primary[disabled]{
  opacity: .55;
  filter: grayscale(.2);
  box-shadow: none;
}

/* Captcha */
.wk-captcha{
  border: 1px solid var(--wk-border);
  background: rgba(15, 23, 42, .02);
  border-radius: 12px;
  padding: 12px;
}

.wk-captcha-hint{
  font-size: 13px;
  color: var(--wk-muted);
  margin: 0 0 8px 0;
}

.wk-captcha-q{
  font-weight: 800;
  font-size: 16px;
  margin: 0 0 10px 0;
}

.wk-captcha .wk-row{
  align-items: stretch;
}

.wk-captcha .wk-btn{
  min-width: 88px;
}
/* ===== EMBED MODE ===== */

.wk-embed body{
  background: transparent;
}

.wk-embed .wk-root{
  position: static !important;
  inset: auto !important;
  background: transparent !important;
  padding: 0 !important;
}

.wk-embed .wk-card{
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.wk-embed .wk-close{
  display: none !important;
}


.wk-ad{
  margin-top: 14px;
  padding: 2px 0 0 0;
}

.wk-ad-label{
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--wk-muted);
  opacity: .75;
  margin: 0 0 8px 4px;
  text-transform: uppercase;
}



.wk-scroll-spacer{
  height: 80px;
}

@media (max-width:520px){
  .wk-captcha .wk-btn{ width:100%; }
}
@media (max-width:520px){
  .wk-row{flex-direction:column; align-items:stretch;}

  /* nur im Action Bereich volle Breite, nicht bei Auswählen */
  .wk-actions .wk-btn{width:100%;}

  .wk-item{align-items:flex-start;}
  .wk-item-actions{
    width:auto;
    align-self:flex-end;
  }

  /* prevent iOS zoom */
  .wk-input{ font-size:16px; }

  .wk-ac-scroll{ max-height: 45vh; }
  .wk-artist,
  .wk-title2{
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .wk-pmeta{
    white-space:normal;
    overflow:visible;
    text-overflow:unset;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height:1.3;
  }
}

@media (max-width: 520px){
  .wk-body{
    padding-bottom: 40px;
  }

  .wk-ad-bottom{
    margin-bottom: 28px;
  }
}
