/* includes/settings/settings.css (ADAPTED FULL) */

.st-shell{ padding-bottom: 120px; }

/* Sticky settings title */
.st-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.st-title-wrap{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.st-title{
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1;
}

.st-underline{
  width: 100%;
  height: 3px;
  border-radius: 999px;
  margin-top: 10px;
  background: var(--accent);
  opacity: 0.95;
}

.st-card{
  background: rgba(18,20,24,0.62);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
}

.st-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

.st-label{
  color: rgba(255,255,255,0.78);
  font-weight: 850;
  font-size: 13px;
}

/* Icon dropdown wrapper */
.st-selectwrap{
  position: relative;
  min-width: 190px;
  max-width: 260px;
  width: 52%;
}

.st-select{
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  font-weight: 900;
  padding: 0 36px 0 40px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.st-select option{ color: #111; }

/* keep dropdown going DOWN (native select already does) */
.st-select:focus{ border-color: rgba(205,231,190,0.55); }

/* icon */
.st-selecticon{
  position:absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.72);
  pointer-events:none;
}
.st-selecticon svg{ width: 18px; height: 18px; }

/* chevron */
.st-selectchev{
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.62);
  pointer-events:none;
}
.st-selectchev svg{ width: 18px; height: 18px; }

/* Tabs sticky */
.st-lib-head{
  position: sticky;
  top: 60px;
  z-index: 40;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 0 12px;
  background: rgba(18,20,24,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin: -6px 0 12px;
}

/* left group for tabs */
.st-tabs{
  display:flex;
  gap: 10px;
  align-items:center;
  min-width: 0;
}

/* tab buttons */
.st-tab{
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-weight: 950;
  cursor: pointer;

  display:flex;
  align-items:center;
  gap: 8px;
}

.st-tab-ico{ width: 18px; height: 18px; display:inline-flex; }
.st-tab-ico svg{ width: 18px; height: 18px; }

.st-tab.is-active{
  background: rgba(205,231,190,0.95);
  border-color: rgba(0,0,0,0);
  color: #101214;
}

.st-count{ opacity: .9; font-weight: 950; }

/* OPTIONAL: tab-level clear button (if JS injects it) */
.st-clear-mini{
  margin-left: auto;
  height: 34px;
  width: 40px;
  border-radius: 12px;

  border: 1px solid rgba(255,120,120,0.35);
  background: rgba(255,120,120,0.12);
  color: rgba(255,170,170,0.98);

  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.st-clear-mini svg{ width: 18px; height: 18px; }
.st-clear-mini:active{ transform: scale(0.98); }

/* Grid */
.st-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* per item wrapper (for delete) */
.st-bookitem{ position: relative; }

/* item card (borderless) */
.st-book{
  display:block;
  text-decoration:none;
  color: inherit;

  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

/* cover no radius */
.st-book-cover{
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 0;
  overflow:hidden;
  background: rgba(0,0,0,0.22);
}
.st-book-cover img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  border-radius: 0;
}
.st-book-cover-ph{
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.25);
}

/* badge (START/ACTIVE) */
.st-badge{
  position:absolute;
  left: 8px;
  top: 8px;
  z-index: 4;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .4px;
  padding: 6px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
}
.st-badge.is-active{
  background: rgba(205,231,190,0.85);
  color: #101214;
  border-color: rgba(0,0,0,0);
}

/* thin progress line */
.st-book-progress{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255,255,255,0.18);
  overflow:hidden;
}
.st-book-progress-fill{
  height:100%;
  width:0%;
  background: rgba(205,231,190,0.95);
}

.st-book-meta{ padding-top: 10px; }

.st-book-title{
  font-weight: 950;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.st-book-author{
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.st-book-pct{
  font-weight: 950;
  color: rgba(205,231,190,0.95);
  font-size: 12.5px;
}

/* delete/clear button (top-right per item) */
.st-item-del{
  position: absolute;
  top: -7px;
  right: -7px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: solid;
  background: rgba(252,4,4,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.st-item-del svg{ width: 13px; height: 13px; }
.st-item-del:hover{
  background: rgba(220,38,38,0.85);
  color: #fff;
}
.st-item-del:active{ transform: scale(0.92); }

/* ✅ remove any borders around listening/reading items (just in case old styles exist) */
.st-bookitem,
.st-book,
.st-book-cover{ outline: none; }
.st-bookitem{ border: 0 !important; }

/* empty state */
.st-empty{
  display:none;
  color: rgba(255,255,255,0.68);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 2px 0;
}

/* modal */
.st-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}
.st-modal.is-open{ display: block; }

.st-modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.st-modal-card{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);

  background: rgba(18,20,24,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  padding: 14px;
  color: rgba(255,255,255,0.92);
}

.st-modal-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.st-modal-title{
  font-weight: 950;
  font-size: 14px;
}

.st-modal-x{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.st-modal-x svg{ width: 18px; height: 18px; }

.st-modal-msg{
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
  margin: 8px 0 14px;
}

.st-modal-actions{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
}

.st-modal-btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-weight: 950;
  cursor: pointer;
}
.st-modal-btn:active{ transform: scale(0.99); }

.st-modal-danger{
  border: 1px solid rgba(255,120,120,0.35);
  background: rgba(255,120,120,0.14);
  color: rgba(255,170,170,0.98);
}

/* small screens */
@media (max-width: 520px){
  .st-selectwrap{ width: 60%; }
}
