/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./app/documenti/page.css ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
#documenti .copertina-tilted {
  border-radius: 2px;
  /* transform: perspective(1000px) rotateY(20deg); */
  transition: .4s;
}

#documenti .copertina-tilted:hover {
  /* transform: perspective(1000px) rotateY(0deg); */
  /* translate 2 px y axis */
  transform: translateY(-5px);
}

.documenti-list-container {
  max-width: 75%;
}

/* mobile breakpoint */
@media (max-width: 767px) {
  #documenti .copertina-tilted {
    height: 220px;
  }

  .documenti-list-container {
    max-width: 90%;
  }
}

/* Funding Programs Table Styles */
.funding-programs-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0;
  align-items: stretch;
}

.header-cell {
  padding: 15px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.header-cell:last-child {
  border-right: none;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

/* .table-row:hover {
  background-color: #f9fafb;
} */

.table-row:last-child {
  border-bottom: none;
}

/* Row background colors */
.row-light-green {
  background-color: #dcfce785;
  /* Light green */
}

.row-light-green:hover {
  background-color: #dcfce7;
}

.row-light-blue {
  background-color: #dbeafe85;
  /* Light blue */
}

.row-light-blue:hover {
  background-color: #dbeafe;
}

.row-light-red {
  background-color: #fef2f285;
  /* Light red */
}

.row-light-red:hover {
  background-color: #fef2f2;
}

.program-cell {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border-right: 1px solid #e5e7eb;
}

.program-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.icon-green {
  background-color: #16a34a;
  /* Darker green */
}

.icon-blue {
  background-color: #1e40af;
  /* Dark blue */
}

.icon-red {
  background-color: #dc2626;
  /* Red */
}

.program-content {
  flex: 1;
}

.program-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  font-size: 16px;
}

.program-subtitle {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.program-subtitle div {
  margin-bottom: 4px;
}

.program-link a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.program-link a:hover {
  text-decoration: underline;
}

.data-cell {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e5e7eb;
  font-weight: 600;
  color: #1f2937;
  font-size: 16px;
}

.data-cell:last-child {
  border-right: none;
}

/* Responsive design */
@media (max-width: 1200px) {

  .table-header,
  .table-row {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

@media (max-width: 992px) {

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
  }

  .header-cell,
  .program-cell,
  .data-cell {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .header-cell:last-child,
  .program-cell:last-child,
  .data-cell:last-child {
    border-bottom: none;
  }

  .table-header {
    display: none;
  }

  .table-row {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }

  .program-cell {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
  }

  .data-cell {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
  }

  .data-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!../../packages/ui/Switch/index.css ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.switch-container {
    border-radius: 50px;
    background-color: #ebeced;
    width: fit-content;
}

.non-active-switch {
    background-color: #ebeced !important;
}

.switch-button {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    max-height: 40px;
}
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.2.1_@babel+core@7.28.0_react-dom@19.1.0_react@19.1.0__react@19.1.0_sass@1.89.2/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!../../packages/ui/ChartTable/ChartTable.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.chart-table-container {
  position: relative;
  /* border: 1px solid #e5e7eb; */
  /* border-radius: 8px; */
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 
  overflow: visible;
  border-radius: 0px 0px 40px 40px !important;
}

.chart-table-container .chart-content {
  position: relative;
  background: white;
  min-height: 400px; /* Ensure enough space for chart and axis */
  /* border-radius: 0px 0px 40px 40px !important; */
  border-radius: 0px 0px 0px 0px !important;
}

/* Export dropdown styling */
.chart-table-container .export-dropdown {
  position: relative;
}

.chart-table-container .dropdown-menu {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  margin-top: 0.25rem;
}

.chart-table-container .dropdown-item {
  padding: 0.5rem 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  transition: background-color 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.chart-table-container .dropdown-item:hover {
  background: #f3f4f6;
  color: #0066cc;
}

/* Button styling */
.chart-table-container .btn-outline-secondary {
  border-color: #d1d5db;
  color: #374151;
}

.chart-table-container .btn-outline-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #0066cc;
}

/* Switch styling in container */
.chart-table-container .btn-group-toggle .btn {
  font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .chart-table-container {
    padding: .2rem;
  }

  .chart-table-container .d-flex.justify-content-between {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .chart-table-container .d-flex.align-items-center {
    justify-content: flex-end;
  }

  /* Tools row: allow wrapping on mobile to prevent overcrowding */
  .chart-table-container .tools-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
  }

  /* Left group: chart/table and relative/absolute switches */
  .chart-table-container .tools-row > div:first-child {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
  }

  /* Right group: project/funding toggle and export */
  .chart-table-container .tools-row > div:last-child {
    flex: 0 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    margin-left: auto;
  }

  /* When groups wrap to separate rows, ensure consistent left alignment */
  @media (max-width: 600px) {
    .chart-table-container .tools-row > div:last-child {
      margin-left: 0;
      flex-basis: 100%;
      margin-top: 0.5rem;
    }
  }

  /* Switch stays inline, can shrink slightly */
  .chart-table-container .switch-container {
    display: inline-flex !important;
    width: auto !important;
    flex: 0 1 auto;
    min-width: 0;
    gap: 0.25rem !important;
  }

  /* Reduce switch button padding slightly on mobile for better fit */
  .chart-table-container .switch-button {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  /* Export dropdown stays inline on the right */
  .chart-table-container .export-dropdown {
    display: inline-flex !important;
    flex: 0 0 auto;
  }

  /* Increase tap target on mobile */
  .chart-table-container .export-button {
    width: 44px !important;
    height: 44px !important;
  }

  /* Turn dropdown into a bottom sheet on mobile */
  .chart-table-container .dropdown-menu {
    position: fixed !important;
    right: 1rem !important;
    left: 1rem !important;
    bottom: 1rem !important;
    top: auto !important;
    transform: none !important;
    min-width: unset !important;
    width: auto;
    z-index: 1050;
  }

  .chart-table-container .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}

/* Dark mode disabled
@media (prefers-color-scheme: dark) {
  .chart-table-container {
    background: #1f2937;
    border-color: #374151;
  }

  .chart-table-container .chart-content {
    background: #1f2937;
  }

  .chart-table-container .dropdown-menu {
    background: #374151;
    border-color: #4b5563;
  }

  .chart-table-container .dropdown-item {
    color: #d1d5db;
  }

  .chart-table-container .dropdown-item:hover {
    background: #4b5563;
    color: #3b82f6;
  }

  .chart-table-container .btn-outline-secondary {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
  }

  .chart-table-container .btn-outline-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
    color: #3b82f6;
  }
}
*/

.export-button {
  border: none;
  background-color: var(--primary) !important;
  color: white !important;
  cursor: pointer;
  border-radius: 36px !important;
  width: 50px !important;
  height: 40px !important;
}

.tools-row {
  background-color: #F7F7F7;
}
