/* Radio Vision Kara — Demandes de chansons */

.rvk-request-toggle,
.rvk-request-panel,
.rvk-request-panel * {
  box-sizing: border-box;
}

.rvk-request-toggle {
  position: fixed;
  right: 16px;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  z-index: 1498;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  cursor: pointer;
}

.rvk-request-toggle:hover,
.rvk-request-toggle:focus-visible {
  transform: translateY(-1px);
}

.rvk-request-toggle:focus-visible,
.rvk-request-close:focus-visible,
.rvk-request-search:focus-visible,
.rvk-request-action:focus-visible {
  outline: 3px solid rgba(11, 111, 90, .30);
  outline-offset: 2px;
}

.rvk-request-panel[hidden] {
  display: none !important;
}

.rvk-request-panel {
  position: fixed;
  right: 16px;
  bottom: calc(210px + env(safe-area-inset-bottom, 0px));
  z-index: 1497;
  width: min(430px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 230px));
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(11, 111, 90, .18);
  border-radius: 22px;
  background: #fff;
  color: #17211f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.rvk-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 13px;
  background: #111;
  color: #fff;
}

.rvk-request-header h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.25;
}

.rvk-request-header p {
  margin: 4px 0 0;
  color: rgba(255,255,255,.74);
  font-size: .74rem;
}

.rvk-request-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.rvk-request-status {
  min-height: 36px;
  padding: 9px 14px;
  border-bottom: 1px solid #e8efec;
  background: #f7faf9;
  color: #61706c;
  font-size: .78rem;
}

.rvk-request-status[data-kind="error"] {
  color: #982f2f;
  background: #fff5f5;
}

.rvk-request-status[data-kind="success"] {
  color: #075445;
  background: #edf9f4;
}

.rvk-request-search-wrap {
  padding: 11px 12px;
  border-bottom: 1px solid #e8efec;
  background: #fff;
}

.rvk-request-search {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #cedbd6;
  border-radius: 12px;
  background: #fff;
  color: #17211f;
  font: inherit;
}

.rvk-request-results {
  overflow-y: auto;
  padding: 10px;
  background:
    radial-gradient(circle at 10% 10%, rgba(11,111,90,.05), transparent 35%),
    #f7faf9;
  overscroll-behavior: contain;
}

.rvk-request-empty {
  padding: 34px 18px;
  text-align: center;
  color: #71807c;
  font-size: .86rem;
  line-height: 1.5;
}

.rvk-request-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding: 11px;
  border: 1px solid #e1eae7;
  border-radius: 14px;
  background: #fff;
}

.rvk-request-song {
  min-width: 0;
}

.rvk-request-title {
  margin: 0;
  overflow: hidden;
  color: #1c2b26;
  font-size: .87rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rvk-request-artist {
  margin: 3px 0 0;
  overflow: hidden;
  color: #73817d;
  font-size: .75rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rvk-request-action {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #0b6f5a;
  color: #fff;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}

.rvk-request-action:disabled {
  cursor: wait;
  opacity: .58;
}

.rvk-request-footer {
  padding: 10px 13px 12px;
  border-top: 1px solid #e5ece9;
  background: #fff;
  color: #81908b;
  font-size: .68rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .rvk-request-toggle {
    right: 12px;
    bottom: calc(137px + env(safe-area-inset-bottom, 0px));
    min-height: 45px;
    padding: 0 14px;
  }

  .rvk-request-panel {
    left: 8px;
    right: 8px;
    bottom: calc(190px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(650px, calc(100dvh - 205px));
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .rvk-request-toggle-label {
    display: none;
  }

  .rvk-request-toggle {
    width: 48px;
    padding: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rvk-request-toggle,
  .rvk-request-panel {
    transition: transform .18s ease, opacity .18s ease;
  }
}
