
.card .muted { padding:5px 10px}


/* Wrapper για horizontal scroll στα κινητά */
.table-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  min-width: max-content;
  position: relative;
  margin: 0;
  border-collapse: collapse;
}

/* Sticky header - θα λειτουργήσει ΜΟΝΟ αν αφαιρέσεις overflow-x από .table-wrap 
   ΓΙΑ ΑΥΤΟ χρειάζεται το JS solution */



/*.chip {
  display: inline-block;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 20px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
}*/

.chip:hover {
  background: #f3f4f6;
}

/* 3. Πίνακας Δεδομένων */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 8px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: top;
  text-align: left;
}

/* Headers (Ονόματα περιοχών) */
thead th {
  background: #f9fafb;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 200;
  border-top: 1px solid #d1d5db;
  border-bottom: 2px solid var(--bd);
  border-bottom: none !important;
  box-shadow: inset 0 -1px 0 #d1d5db;
}

/* Το κελί πάνω-αριστερά (Indicator Header) - sticky ΚΑΙ κάθετα ΚΑΙ οριζόντια */
thead th:first-child {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1060; /* ΠΑΝΩ από το JS clone (που είναι 1050) */
  background: #f9fafb;
}

/* ΟΛΟΚΛΗΡΗ η πρώτη στήλη - CSS sticky */
tbody tr td:first-child,
tbody tr th:first-child {
  position: sticky;
  left: 0;
  z-index: 100;
  background: #ffffff;
  /* Auto width για desktop */
}

/* Zebra striping - πρώτη στήλη */
tbody tr:nth-child(even) td:first-child,
tbody tr:nth-child(even) th:first-child {
  background: #f9fafb;
}

/* Hover state - πρώτη στήλη */
tbody tr:hover td:first-child,
tbody tr:hover th:first-child {
  background: #eef2ff;
}

/* Group rows - χωρίς ειδική λογική */
tbody tr.group-row td:first-child,
tbody tr.group-row th:first-child {
  background: #ffffff !important;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  /* Inherit από την πρώτη στήλη - position: sticky */
}

/* Ad rows - πρώτη στήλη */
tbody tr.ad-row td:first-child,
tbody tr.ad-row th:first-child {
  background: var(--bg);
}

/* Mobile: Πρώτη στήλη πιο στενή με text wrap */
@media (max-width: 768px) {
  /* Πρώτη στήλη (Indicator) - ΜΟΝΟ mobile */
  thead th:first-child,
  tbody td:first-child {
    width: 100px !important;
    max-width: 100px !important;
    white-space: normal;
    word-wrap: break-word;
    font-size: 13px;
  }
  
  /* Headers των data columns - wrap σε 2 γραμμές */
  thead th:not(:first-child) {
    max-width: 100px; /* Περιορισμός για να σπάσει σε 2 γραμμές */
    white-space: normal; /* Επιτρέπει wrap */
    word-wrap: break-word;
    font-size: 12px;
    line-height: 1.3;
    padding: 6px 4px; /* Πιο compact padding */
  }
  
  /* Data cells - κρατάμε το φυσικό τους πλάτος */
  tbody td:not(:first-child) {
    white-space: nowrap; /* ΔΕΝ κάνουν wrap */
    font-size: 13px;
  }
}

/* 4. Κατηγορίες (Μαύρες Μπάρες) */
/*.group-row td {
  background: #111827 !important;
  color: #ffffff !important;
  font-weight: 800;
  text-transform: uppercase;
  position: sticky;
  top: 0; 
  z-index: 150; 
  padding: 12px 10px !important;
}*/
.group-row td {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 8px;
  border-top: 2px solid #0f172a;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

/* Scroll offset για anchors - αποφυγή επικάλυψης από sticky headers */
.group-row {
  scroll-margin-top: 80px; /* Μεγαλύτερο για mobile - sticky-nav + thead + extra */
}

@media (min-width: 769px) {
  .group-row {
    scroll-margin-top: 120px; /* Desktop */
  }
}

tbody td:first-child{
  /*position: static;
  background: transparent;*/
}


/* 6. AdSense & Spacing */
.ad-row td {
  background: var(--bg) !important;
  padding: 30px 10px !important;
  text-align: center;
  border: none !important;
}

.ad-placeholder {
  display: inline-block;
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  background: #ebebeb;
  border: 1px dashed #bbb;
  line-height: 90px;
  color: #888;
  font-size: 12px;
}

/* Λοιπά Elements */
h1 { margin: 0 0 6px; font-size: 22px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.cmp-card { background: #fff; border: 1px solid var(--bd); border-radius: 12px; padding: 12px; margin: 0 0 14px; }
.cmp-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.cmp-btn { padding: 9px 12px; border: 1px solid var(--bd); background: #fff; border-radius: 10px; cursor: pointer; }
.cmp-btn-primary { background: #111827; color: #fff; border-color: #111827; }

/* Button grid - Responsive */
.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobile: 2x2 grid */
  gap: 10px;
  min-width: 220px;
  margin-top: 16px; /* Κενό από inputs όταν wrap κάτω */
}

.button-grid .cmp-btn {
  width: 100%;
  text-align: center;
}

/* Desktop: Vertical stack (original) */
@media (min-width: 620px) {
  .button-grid {
    display: flex;
    flex-direction: column;
    max-width: 220px;
    margin-top: 0; /* Αφαίρεση margin - είναι δίπλα στα inputs */
  }
  
  .button-grid .cmp-btn {
    text-align: center; /* Center-align για desktop */
  }
}
.muted { color: var(--muted); }

.is-cloned a.removeDecoration span.muted,
.is-cloned span.muted {
  color: #6b7280 !important;
}


.inputs { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 10px; flex: 1; }
@media(min-width:860px){ .inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.search { width: 100%; padding: 10px 12px; border: 1px solid var(--bd); border-radius: 10px; }
.suggestions { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border: 1px solid #ccd2d7; border-radius: 12px; z-index: 50; }
.err { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; border-radius: 12px; padding: 10px; margin: 0 0 14px; }
.removeDecoration {
  text-decoration: none;
}
.removeDecoration,
.removeDecoration:hover,
.removeDecoration:focus,
.removeDecoration:active,
.removeDecoration:visited {
  text-decoration: none;
}
.removeDecoration {
  text-decoration: none;
  color: inherit;
}
/******************************************************/
/* 2. Chips Navigation */
.sticky-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--bg)!important;
    background: #fafafa !important; /* Fallback */

  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  
  /* Padding χωρίς negative margins */
  margin: 0 0 8px 0;
  padding: 8px 0;
  width: 100%;
}

/* Για desktop: ίδιο styling */
@media (min-width: 769px) {
  .sticky-nav {
    margin: 0 0 8px 0;
    padding: 8px 0;
    width: 100%;
  }
}



/* Προαιρετικό: Κρύβει τη scrollbar για να μην κλέβει ύψος στο sticky */
.sticky-nav::-webkit-scrollbar {
  display: none;
}

.chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 12px;
  height: 32px;

  white-space: nowrap;
  flex: 0 0 auto;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;

  color: #111827;
  text-decoration: none;

  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Desktop - μεγαλύτερα chips */
@media (min-width: 769px) {
  .chip {
    padding: 8px 16px;
    height: 38px;
    font-size: 14px;
  }
}

.chip:hover{
  background: #f3f4f6;
  text-decoration: none;
}

.chip:active{
  background: #e5e7eb;
  text-decoration: none;
}

.chip:visited{
  color: #111827;
  text-decoration: none;
}

/* Αν υπάρχει span / strong μέσα */
.chip *{
  color: inherit;
  text-decoration: none;
}


@media (max-width: 768px){
  .sticky-nav{
    flex-wrap: wrap;
    align-content: flex-start;
  }
  
  /* Chip container */
  .chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    
    max-width: 85px;
    padding: 6px 12px !important;
    box-sizing: border-box;
    line-height: 1;
  }
  
  /* Span μέσα - εδώ γίνεται το truncate */
  .chip span {
    display: block; /* ΚΡΙΣΙΜΟ - χωρίς αυτό δεν δουλεύει το ellipsis */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%; /* Δεν ξεπερνά το parent */
  }
}

/***************************************************/


/* ===== Compare inputs + autocomplete (FIX) ===== */

/* grid 2 columns όπως το θες */
#inputs.inputs{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 860px){
  #inputs.inputs{ grid-template-columns: 1fr; }
}

/* ΚΡΙΣΙΜΟ: κάνει το dropdown να "δένεται" κάτω από το σωστό input */
#inputs .slot{
  position: relative;
  min-width: 0;
}

/* label */
#inputs .label{
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #111827;
}

/* input */
#inputs .search{
  width: 100%;
  display:block;
  box-sizing:border-box;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  outline: none !important;
}
#inputs .search:focus{
  border-color: #3b82f6;
}

/* dropdown (ίδιο “στυλ” με autocomplete.php) */
#inputs .suggestions{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 4px);
  background:#fff;
  border:1px solid #ccd2d7;
  border-radius: 12px 12px 6px 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  max-height: 260px;
  overflow-y:auto;
  z-index: 9999;
  padding: 3px;
}

/* items μέσα στο dropdown (αν τα φτιάχνεις σαν divs/anchors από JS) */
#inputs .suggestions .item{
  padding: 8px 10px;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
#inputs .suggestions .item:hover,
#inputs .suggestions .item.active{
  background: #f8f9fa;
}

/* highlight από το JS σου (<span class="hl">...) */
#inputs .suggestions .hl{
  color:#1a73e8;
  font-weight:700;
}
#inputs .suggestions{
  display: none;
}


/* ===== 2-row zebra striping (force) ===== */

/* Zebra striping για ΟΛΑ τα cells (εκτός πρώτης στήλης που έχει το δικό της) */

/* default */
tbody tr:not(.group-row):not(.ad-row) td:not(:first-child) {
  background: #ffffff;
}

/* κάθε δεύτερη γραμμή */
tbody tr:not(.group-row):not(.ad-row):nth-child(even) td:not(:first-child) {
  background: #f9fafb;
}

/* hover */
tbody tr:not(.group-row):not(.ad-row):hover td:not(:first-child) {
  background: #eef2ff;
}

/* group rows */
tbody tr.group-row td:not(:first-child) {
  background: #ffffff;
}

/* ad rows */
tbody tr.ad-row td:not(:first-child) {
  background: var(--bg);
}



/*.sticky-nav{
  backdrop-filter: blur(6px);
}*/




/* Κενό ανά 2 group-rows για αναπνοή */
.group-row.group-spacing {
  border-bottom: 24px solid transparent !important;
}

/* Mobile - μικρότερο κενό */
@media (max-width: 768px) {
  .group-row.group-spacing {
    border-bottom: 16px solid transparent !important;
  }
}
