/* Root Variables */
:root {
    --white: #FFFFFFff;
    --french-gray: #F6F8FB; /* #BFCBD9ff; */
    --air-superiority-blue: #1E3A8A; /* #789FB3ff; */
    --yinmn-blue: #1E3A8A; /* #3A567Fff; */
    --sandy-brown:  #FFA346ff;
    --pumpkin: #F97316; /*#FF853Fff; */

    /* Vertical split (top/bottom) */
    --separator-size: 8px;   /* thickness of horizontal bar */
    --min-panel: 80px;       /* min height for top/bottom */
    --top: 50vh;             /* initial top panel height */

    /* Side-by-side split (left/right) */
    --v-separator-size: 8px; /* thickness of vertical bar */
    --min-side: 120px;       /* min width for left/right */
    --left: 50vw;            /* initial left panel width */

    --footer-h: 68px;        /* fixed footer height */
}


/* Tipografia di base */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;        /* base size */
    line-height: 1.5;
    color: var(--yinmn-blue);
    background-color: var(--french-gray);
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Titoli */
h1 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.75rem;        /* circa 32px */
  font-weight: bold;
  margin: 0.5em 0;
}

h2 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.50rem;      /* circa 24px */
  font-weight: bold;
  margin: 0.75em 0 0.5em;
}

h3 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;     /* circa 18px */
  font-weight: bold;
  margin: 0.75em 0 0.5em;
}

h4 {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.9rem;     /* circa 18px */
  font-weight: bold;
  margin: 0.75em 0 0.5em;
}

/* Testo normale */
p {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 0.8rem;        /* 14px */
  margin: 0.5em 0;
}

/* Link */
a {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--pumpkin);
}


/* --- Topbar fissa --- */
.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0px 20px;
  background: var(--french-gray);
  border-bottom: 3px solid #44bcd7;

  /* ombreggiatura */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}


.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
}

.topbar-link {
  text-decoration: none;
  font-size: 14px;
  color: var(--yinmn-blue);
  font-weight: bold;
  opacity: 0.9;
}

.topbar-link:hover {
  opacity: 1;
}

.app-title{
  margin: 0;
  color: var(--yinmn-blue);
  font-weight: 800;
}

h1.app-subtitle {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1rem;        /* circa 32px */
  font-weight: normal;
  font-style: italic;
  color: #9ca3af;
  margin: 0;
}


/* Instructions */

.instructions {
    position: fixed; /* Make it float above everything */
    top: 56px;
    left: 0;
    right: 0;
    /* width: 100vw; */
    z-index: 1000;
    background: var(--pumpkin);
    color: white;
    border-bottom: 1px solid var(--french-gray);
    padding: 12px 20px;
    transition: max-height 0.3s, opacity 0.3s, min-width 0.3s;
    max-height: 320px;
    overflow: hidden;
    opacity: 1;
    box-sizing: border-box;
}


.instructions.collapsed {
  max-height: 0;
  padding-top: 0; padding-bottom: 0;
  opacity: 0;
  border-bottom: 0;
  background: transparent;
}

/* evita che la barra trasparente “copra” i click dietro */
.instructions { pointer-events: none; }
.instructions-header, #collapse-instructions { pointer-events: auto; }


.instructions.collapsed .instructions-title,
.instructions.collapsed .instructions-content {
    display: none;
}

.instructions-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-weight: bold;
    width: 100%;
}

#collapse-instructions {
    background-color: #ff8e20;
    color: var(--white);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#collapse-instructions:hover {
    background-color: #44bcd7;
    color: white;
}

#collapse-instructions i{ font-size: inherit; }

#collapse-instructions::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  font-weight: bold;
  border-radius: 50%;
  background-color: #fff;       /* cerchio bianco */
  color: #ff8e20;               /* testo verde */
}

#collapse-instructions:hover::before {
    background-color:#ff8e20;
    color: white;
}

/* CONTAINER */
.container {
    position: absolute;
    display: grid;
    grid-template-columns: var(--left) var(--v-separator-size) 1fr;
    /* grid-template-rows: 100vh; */
    grid-template-rows: 1fr;
    /* height: 100vh; */
    overflow: hidden;
    top: 56px;
    bottom: var(--footer-h); /* end exactly at the footer top */
}

/* Left side contains the top/bottom split */
.split {
    display: grid;
    grid-template-rows: var(--top) var(--separator-size) 1fr;
    height: 100%;
    overflow-y: none;
}

/* Sidebar */
.sidebar {
    background-color: var(--french-gray);
    padding: 20px;
    border-right: 2px solid var(--yinmn-blue);
    color: var(--yinmn-blue);
}

.sidebar h2 {
    display: inline-block;
    vertical-align: middle;
    font-weight: 700;
    color:var(--yinmn-blue);
}

/* Reset Button */
.reset-btn {
  background-color:#ff8e20;
  color: #fff;
  padding: 10px 20px;
  margin-left: 15px;
  border: none;
  border-radius: 25px;
  box-shadow: 0 2px 4px var(--yinmn-blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.5s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative; /* serve per posizionare l’icona */
}

.reset-btn:hover {
    background-color: #44bcd7;
}

.repo {
      background-color:#ff8e20;
    color: #fff;
    padding: 10px 20px;
    margin-left: 15px;
    border: none;
    border-radius: 25px;
    box-shadow: 0 2px 4px var(--yinmn-blue);
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.5s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.repo:hover {
    background-color: #44bcd7;
}

/* Resizer */
.resizer {
    width: 20px;
    background: var(--french-gray);
    cursor: ew-resize;
    position: relative;
    z-index: 2;
}

.resizer::after {
    content: "⋯";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: rotate(-90deg);
    color: var(--yinmn-blue);
}

.resizer-horizontal {
    width: 100%;
    height: 20px;
    background: var(--french-gray);
    cursor: ns-resize;
    position: relative;
    z-index: 2;
}

.resizer-horizontal::after {
    content: "⋯";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--yinmn-blue);
}

    /* Horizontal draggable bar (between top/bottom) */
.separator {
      background: #e5e7eb;
      cursor: row-resize;
      touch-action: none;
      user-select: none;
      display: grid;
      place-items: center;
}
    .separator::before {
      content: "";
      width: 48px;
      height: 3px;
      border-radius: 999px;
      background: #9ca3af;
    }

    /* Vertical draggable bar (between left/right) */
    .separator2 {
      background: #e5e7eb;
      cursor: col-resize;
      touch-action: none;
      user-select: none;
      display: grid;
      place-items: center;
    }
    .separator2::before {
      content: "";
      width: 3px;
      height: 48px;
      border-radius: 999px;
      background: #9ca3af;
    }

.rightpanel {
    padding: 16px;
    overflow: hidden;
    width: calc(95vw - var(--left) - var(--v-separator-size));
}
/* Content */
.content {
    height: 100%;
    display: flex;
    flex-direction: column;
    font-weight: 1700;
}

/* Features table */
.features-table {
    flex: 1 1 0;
    overflow-y: auto;
    padding: 1rem;
    min-height: 0; /* allow flex child to shrink below content size */
}

/* Tools */
.tools {
    background-color: var(--white);
    margin-top: 1rem;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* space between cards */
    justify-content: center;
    overflow-y: auto;
}

.tools::-webkit-scrollbar {
    width: 8px;
}
.tools::-webkit-scrollbar-track {
    background: var(--french-gray);
}
.tools::-webkit-scrollbar-thumb {
    background: #44bcd7;;
    border-radius: 4px;
}

.top {
    border-bottom: 2px solid var(--yinmn-blue);
    display: flex;
    flex-direction: column;
}

/* Card Styling */
.card {
    background-color: #192d67;
    border-radius: 10px;
    padding: 10px;
    /* box-sizing: border-box; */
    box-shadow: 0 2px 4px var(--yinmn-blue);
    color: var(--yinmn-blue);
    text-align: left;
    flex: 0 1 150px;         /* Cards are flexible, min width 220px */
    /* min-width: 180px;        Minimum width for small screens */
    word-break: break-word;  /* Prevent overflow for long names */
    transition:
    background 0.3s,
    box-shadow 0.3s,
    padding 0.3s,
    max-width 0.3s;
    height: 30px;       /* tutte esattamente uguali */
}

.card:hover {
    box-shadow: 0 4px 8px var(--french-gray); /* Add a raised shadow effect */
    transform: translateY(-5px); /* Slightly lift the card */
}

.card .plus,
.card .minus {
    background: #fff;
    color: #192d67;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: right;
}

.card .minus {
    display: none;
}
.card.expanded .plus {
    display: none;
}
.card.expanded .minus {
    display: inline-flex;
}

.card .plus:hover,
.card .minus:hover {
    color: white; /* Change plus sign to white on hover */
    background-color: #ff8e20; /* Optional darker background */
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
    color: var(--white);
    float: left;
}

.bottom {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tools-viz {
  display: grid;
  grid-template-columns: 40% 1fr;
  align-items: start;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* ── Tool detail: left column ── */
.viz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.viz-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  background-color: rgb(216, 216, 216);
  filter: grayscale(100%);
}

.viz-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.viz-title h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--pumpkin);
}

.viz-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--yinmn-blue);
  text-decoration: none;
}

.viz-link:hover {
  color: var(--pumpkin);
  text-decoration: underline;
}

.viz-description {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgb(61, 61, 61);
  margin-bottom: 8px;
}

.viz-additional {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 6px;
}

.viz-provider-note {
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
  margin-top: 4px;
}

/* ── Tool detail: right column heading ── */
.features-heading {
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  font-size: 1rem;
  color: var(--yinmn-blue);
  border-bottom: 2px solid var(--yinmn-blue);
}

.card.disabled {
    opacity: 0.4;
}

.card.disabled .plus,
.card.disabled .minus {
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: none !important;
}


/* Feature sections */
.feature-section {
    background: var(--french-gray);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--yinmn-blue);
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    transition: box-shadow 0.2s;
    position: relative;
}

.feature-section.collapsed:hover {
    transform: translateY(-5px); /* Slightly lift the card */
    background-color: #ff8e20;
    color: var(--white);
}

.feature-section.collapsed .feature-question {
    display: none;
}

.feature-section h3 {
    color: var(--yinmn-blue);
    margin: 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-section.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}

.feature-section .toggle-arrow {
    transition: transform 0.5s ease-in-out;
}

.feature-question h4 {
    color: #ff8e20;           /* Distinct color for question title */
    font-weight: 400;
    margin: 0.3rem 0 0.3rem 0;
    letter-spacing: 0.5px;
    position: relative;
    cursor: help;
    display: inline-block;
}

.feature-question h4[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #2c2c2c;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* Feature-value pairs */
.feature-question .value {
    display: inline-block;
    background: var(--pumpkin);
    color: var(--white);
    border-radius: 5px 0 0 5px;
    padding: 4px 10px;
    margin-right: 2px;
    font-weight: 500;
}

.feature-question .count {
    display: inline-block;
    background: var(--white);
    color: var(--yinmn-blue);
    border-radius: 0 5px 5px 0;
    padding: 4px 10px;
    margin-right: 8px;
    font-weight: 500;
    border-left: 2px solid var(--pumpkin);
}

.feature-question .value {
    transition: background 0.2s, color 0.2s;
}
.feature-question .value:hover {
    cursor: pointer;
    text-decoration: underline;
    background: var(--yinmn-blue);
}

.value {
    color: #aaa;
    background: var(--pumpkin);
    cursor: pointer;
    opacity: 0.7;
    transition: background 0.2s, color 0.2s, text-decoration 0.2s;
}

.value.selected {
    background: var(--pumpkin);
    color: var(--white);
    font-weight: bold;
    /* border: 2px solid var(--yinmn-blue); */
    opacity: 1;
}

.value.disabled {
    color: #484848;
    background: var(--white);
    opacity: 0.7;
    cursor: pointer !important;
    text-decoration: none !important;
}


.value:hover,
.value.disabled:hover,
.value.selected:hover {
    background: var(--yinmn-blue);
    color: var(--white);
    text-decoration: underline;
    opacity: 1;
}

.value.card-highlight {
    border: 2px solid var(--yinmn-blue);
    box-shadow: 0 0 4px var(--yinmn-blue);
}

/* Box sinistro */
.info-box {
  border-right: 2px solid var(--yinmn-blue); /* linea verticale di separazione */
  padding: 1rem;
}

/* Box destro */
.features-box {
  padding: 0.5rem;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2px;
}

.feature-values {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.tool-question {
    display: inline-block;
    flex-shrink: 0;
    background: var(--white);
    color: var(--pumpkin);
    border-radius: 5px 0 0 5px;
    padding: 4px 10px;
    margin-right: 2px;
    font-weight: 500;
    position: relative;
    cursor: help;
}

.tool-question[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #2c2c2c;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.tool-value {
    display: inline-block;
  background: var(--white);
  color: var(--yinmn-blue);
  border-radius: 0 5px 5px 0;
  padding: 4px 10px;
  margin-right: 8px;
  font-weight: 500;
  border-left: 2px solid var(--pumpkin);
}

.tool-section {
    display: block;
    background: var(--yinmn-blue);
    color: var(--white);
    border-radius: 4px;
    padding: 4px 10px;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Drag cursors */
.dragging-y, .dragging-y * { cursor: row-resize !important; }
.dragging-x, .dragging-x * { cursor: col-resize !important; }


/* FOOTER */

.site-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 10px 18px;
  z-index: 100;
  box-sizing: border-box;
}

.footer-container{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.footer-left,
.footer-section{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-left{
  /* display:flex; */
  justify-content:center;
  align-items:center;
}

.footer-section{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
}

.footer-logo{
  height: 48px;
  width: auto;
  object-fit: contain;
}

.footer-section h4{
  margin: 0 0 14px 0;
  font-size: 1rem;
  line-height: 1.2;
}

.footer-section p{
  margin: 0;
  line-height: 1.5;
}

.footer-section a{
  text-decoration: none;
}

/* .github-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
} */
.github-icon{
  font-size:30px;
  color:#5a2ca0;   /* same purple tone you already use */
  text-decoration:none;
}

.github-icon:hover{
  opacity:0.7;
}

.license-block{
  display:flex;
  align-items:center;
  gap:12px;
}

.cc-badge{
  height:28px;
  width:auto;
}