/* ----------------------------------------------------------
   CHECKSY LAYOUT & RESET
---------------------------------------------------------- */

/* Ensure the page behaves like a flexible column */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scrollbars */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fdfdf9;
}

/* MAIN CONTAINER */
.page-main {
  /* 1. Flex Grow: Pushes the footer down naturally */
  flex: 1;
  
  /* 2. Sizing: Full width but capped */
  width: 100%;
  max-width: 1100px;
  
  /* 3. Box Model: Vital! Keeps padding inside the 100% width */
  box-sizing: border-box; 
  
  /* 4. Spacing: 
     - Margin 0 auto centers it horizontally. 
     - Padding provides the visual space (48px top). 
  */
  margin: 0 auto;
  padding: 48px 16px 24px;
}

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

.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;
}

/* ----------------------------------------------------------
   TOOL CARD
---------------------------------------------------------- */
.tool-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
}

.tool-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 3px;
}

.tool-subtitle {
  font-size: 0.96rem;
  color: var(--text-muted);
  max-width: 560px;
}

.app-subtitle {
  max-width: 900px;
  line-height: 1.45;
}

.help-inline-link {
  border: 0;
  background: transparent;
  color: var(--brand-blue, #0099cc);
  font: inherit;
  font-weight: 700;
  padding: 0;
  margin: 0;
  text-decoration: underline;
  cursor: pointer;
}

.help-inline-link:hover {
  color: #007fad;
}

.help-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
}

.help-inline-icon img {
  display: block;
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(45%) sepia(97%) saturate(747%) hue-rotate(164deg) brightness(95%) contrast(101%);
}

.help-inline-icon:hover img {
  filter: brightness(0) saturate(100%) invert(55%) sepia(93%) saturate(1359%) hue-rotate(165deg) brightness(97%) contrast(101%);
}

.help-modal-body p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.help-modal-body ol {
  margin: 0 0 12px 20px;
  padding: 0;
}

.help-modal-body li {
  margin: 0 0 6px;
  line-height: 1.35;
}

#btnCheck {
  background: var(--brand-blue, #0099cc);
  border-color: #007aa3;
  color: #ffffff;
}

#btnCheck:hover {
  background: #007aa3;
  border-color: #006a8d;
}

/* ----------------------------------------------------------
   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;
  margin-bottom: 16px;
}

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

.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: #24292d;
}

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

.input-wrap input:focus {
  outline: none;
  border-color: #0099cc;
  box-shadow: 0 0 0 1px rgba(0, 153, 204, 0.25);
}

.input-wrap svg {
  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;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

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

.btn-main:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}

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

/* ----------------------------------------------------------
   GROUPS & CHIPS
---------------------------------------------------------- */
.groups {
  margin-top: 4px;
}

.groups-header {
  margin: 10px 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.group-title-main {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.group-block {
  margin-top: 8px;
}

.group-title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.chip:hover {
  border-color: var(--blue);
  background: #f0f9ff;
}

.chip.off {
  opacity: 0.45;
  background: #f9fafb;
}

.chip-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn-ghost-small {
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.16);
  background: transparent;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
}

.btn-ghost-small:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #eff6ff;
}

/* ----------------------------------------------------------
   FOOTER AREA
---------------------------------------------------------- */
.tip-line {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tool-footer {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-footer-count {
  font-weight: 500;
  color: #111827;
}

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

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

.popup-strip .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;
  white-space: nowrap;
}

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

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

/* ----------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 640px) {
  .tool-title-pill {
    font-size: 2.1rem;
  }
}
