:root {
  --text-main: #24292d;
}

body {
  background: #fdfdf9;
}

footer {
  background: linear-gradient(180deg, #0a90bc 0%, #0a6a8c 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.app-subtitle {
  max-width: 780px;
}

.app-footer-row {
  justify-content: flex-end;
}

/* Use full-width layout without a card container */
.octofind-shell {
  width: 100%;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(77, 84, 91, 0.18);
  border-radius: 12px;
  padding: 14px 16px 12px;
}

/* Popup strip --------------------------------------------------- */
.popup-strip {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #24292d;
  border: 1px solid #FFCC33;
  font-size: 0.85rem;
  color: #FFCC33;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.popup-strip-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.popup-strip span.icon {
  font-size: 1.1rem;
}

.popup-strip button {
  border-radius: 999px;
  border: 1px solid #FFCC33;
  background: transparent;
  color: #FFCC33;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.popup-strip button:hover {
  background: rgba(255, 204, 51, 0.14);
}

.popup-strip button:focus-visible {
  outline: 2px solid #0099CC;
  outline-offset: 2px;
}

/* Legacy card wrapper is no longer used in OctoFind */
.tool-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
}

/* Header inside card -------------------------------------------- */
.tool-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

/* We reuse .tool-title-pill from blizlab-ui.css for font + layout */

.tool-title-pill svg {
  width: 45px;
  height: 45px;
}

/* Subtitle text */
.tool-subtitle {
  font-size: 0.95rem;
  color: #5b6a74;
  max-width: 780px;
  margin: 0 0 14px;
}

/* SEARCH BAR ---------------------------------------------------- */
.search-card {
  margin-top: 4px;
  border-radius: 16px;
  border: 2px solid rgba(77, 84, 91, 0.9);
  background: #D2D7DC;
  padding: 14px 14px 10px;
}

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

.input-wrap {
  flex: 1 1 260px;
  min-width: 220px;
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  background: #ffffff;
  font-size: 0.96rem;
  color: var(--text-main);
}

.input-wrap input::placeholder {
  color: #5b6a74;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5b6a74;
}

.btn-main {
  border-radius: 9px;
  border: 1px solid #24292d;
  background: #3b434a;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.btn-main:hover {
  background: #4d545b;
}

.btn-main span.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.btn-main.videos span.dot { background: #ff6b81; }
.btn-main.photos span.dot { background: var(--blue); }
.btn-main.public span.dot { background: #ff914d; }
.btn-main.png span.dot    { background: #16a085; }

.search-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #5b6a74;
}

/* GROUPS + SITE LISTS ------------------------------------------ */
.groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 22px;
  margin-top: 16px;
  align-items: start;
}

.group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #24292D;
  font-weight: 800;
  margin-bottom: 6px;
}

.chips {
  display: grid;
  gap: 9px;
}

.site-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #24292d;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.site-check {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.site-label {
  color: inherit;
}

.site-option.off {
  opacity: 0.68;
  color: #4d545b;
}

.tip-line {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #5b6a74;
}

/* FOOTER INSIDE CARD ------------------------------------------- */
.tool-footer {
  margin-top: 16px;
  border-top: 1px solid rgba(77, 84, 91, 0.16);
  padding-top: 10px;
  font-size: 0.78rem;
  color: #5b6a74;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-footer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-ghost {
  border-radius: 9px;
  border: 1px solid #24292d;
  background: #3b434a;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover {
  background: #4d545b;
}

.btn-ghost .icon-img {
  width: 14px;
  height: 14px;
  display: block;
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: 0.95;
}

/* MODAL -------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 41, 45, 0.58);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 140;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(860px, calc(100% - 28px));
  max-height: 84vh;
  background: #e4e8eb;
  border-radius: 12px;
  border: 1px solid rgba(77, 84, 91, 0.38);
  padding: 0;
  box-shadow: 0 22px 48px rgba(24, 29, 33, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #3b434a;
  border-bottom: 1px solid rgba(228, 232, 235, 0.2);
}

.modal-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.site-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(220px, 2.35fr) minmax(96px, 0.95fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 2px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(77, 84, 91, 0.22);
  background: transparent;
}

.site-row input[type="text"],
.site-row select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid rgba(77, 84, 91, 0.34);
  background: #ffffff;
  font-size: 0.84rem;
  color: #24292d;
}

.site-row select {
  background: #3b434a;
  border-color: #24292d;
  color: #ffffff;
  font-weight: 600;
}

.site-row select option {
  background: #3b434a;
  color: #ffffff;
}

.site-row input[type="text"]:focus,
.site-row select:focus {
  outline: none;
  border-color: #0099cc;
  box-shadow: 0 0 0 1px rgba(0, 153, 204, 0.32);
}

.site-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.site-row button.remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(77, 84, 91, 0.25);
  background: #e4e8eb;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.site-row button.remove img {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.82;
}

.site-row button.remove:hover {
  background: #d2d7dc;
  border-color: rgba(77, 84, 91, 0.46);
}

.site-row button.remove:hover img {
  opacity: 1;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(77, 84, 91, 0.24);
  font-size: 0.8rem;
  color: #4d545b;
  background: #d2d7dc;
}

.modal-foot-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-small {
  border-radius: 8px;
  border: 1px solid #24292d;
  background: #3b434a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-small:hover {
  background: #4d545b;
}

.modal-head .btn-small {
  border-color: rgba(228, 232, 235, 0.4);
  background: #24292d;
}

.modal-head .btn-small:hover {
  background: #4d545b;
  border-color: rgba(228, 232, 235, 0.6);
}

/* RESPONSIVE --------------------------------------------------- */
@media (max-width: 700px) {
  .tool-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-title-pill {
    margin-bottom: 4px;
  }

  .site-row {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
  }

  .tool-footer {
    justify-content: flex-start;
  }

  .modal-foot {
    align-items: flex-start;
  }
}
