/*
Theme Name: Stability Child
Theme URI: https://aurigapbm.aurigaspa.com/
Description: Stability Child Theme
Author: Auriga
Author URI: https://www.aurigaspa.com
Template: stability
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
*/

details.accordion {
  margin-bottom: 0;
  background: #f5f5f5;
  border-bottom: 1px solid #dcdcdc;
}
details.accordion:last-of-type {
  border-bottom: none;
}
details.accordion summary {
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #102ce5;
  padding: 15px 20px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.2s ease;
}
details.accordion summary:hover {
  background: #ebebeb;
}
details.accordion summary::-webkit-details-marker {
  display: none;
}
details.accordion summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid #102ce5;
  border-bottom: 2px solid #102ce5;
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1em;
}
details.accordion[open] summary::after {
  transform: rotate(45deg);
}
details.accordion[open] summary {
  border-bottom: 1px solid #dcdcdc;
  font-weight: 700;
}
details.accordion .accordion-content {
  padding: 15px 20px 20px;
  background: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
details.accordion .accordion-content h3 {
  color: #102ce5;
  font-size: 16px;
  margin-top: 1.2em;
}

.tr-pdfwrap{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items:start;
  margin: 18px 0;
}

.tr-list{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.tr-title{ margin:0 0 6px; font-size:20px; line-height:1.2; }
.tr-sub{ margin:0 0 14px; color:rgba(0,0,0,.65); font-size:14px; }
.tr-items{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }

.tr-item{
  width:100%;
  display:flex;
  gap:10px;
  align-items:flex-start;
  text-align:left;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.tr-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.18);
}
.tr-item.is-active{
  border-color: rgba(0,0,0,.28);
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
}
.tr-badge{
  flex:0 0 auto;
  font-weight:700;
  font-size:12px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}
.tr-itemtext{ font-size:14px; line-height:1.35; }

.tr-viewer{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  min-height: 520px;
}
.tr-toolbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  border-bottom:1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}
.tr-left, .tr-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tr-btn{
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:600;
  line-height:1;
}
.tr-btn:hover{ border-color: rgba(0,0,0,.24); }
.tr-link{ text-decoration:none; display:inline-flex; align-items:center; }
.tr-meta{ font-size:13px; color: rgba(0,0,0,.75); }

.tr-canvaswrap{
  position:relative;
  padding:12px;
  overflow:auto;
  max-height: 78vh;
  background: linear-gradient(180deg, rgba(0,0,0,.015), rgba(0,0,0,.00));
}
.tr-canvas{ display:block; margin: 0 auto; border-radius:10px; background:#fff; }
.tr-loading{
  position:absolute;
  top:14px; left:14px;
  padding:8px 10px;
  border-radius:10px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  font-weight:600;
  font-size:13px;
}
.tr-error{
  margin: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(160,0,0,.25);
  background: rgba(160,0,0,.06);
  color: rgba(120,0,0,.95);
  font-weight:600;
  font-size:14px;
}

@media (max-width: 980px){
  .tr-pdfwrap{ grid-template-columns: 1fr; }
  .tr-viewer{ min-height: 420px; }
  .tr-canvaswrap{ max-height: 70vh; }
}

.rapporti-tecnici-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.rapporti-tecnici-container {
    display: flex;
    height: 90vh;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Sidebar con la lista dei rapporti */
.rt-sidebar {
    width: 400px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
}

.rt-sidebar-header {
    padding: 30px 20px;
    background: #102ce5;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rt-sidebar-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.rt-sidebar-header p {
    font-size: 14px;
    opacity: 0.9;
}

.rt-reports-list {
    padding: 20px;
}

.rt-report-item {
    padding: 20px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.rt-report-item:hover {
    background: #e8f0fe;
    border-left-color: #102ce5;
    transform: translateX(5px);
}

.rt-report-item.active {
    background: #e8f0fe;
    border-left-color: #102ce5;
}

.rt-report-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #102ce5;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-report-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.rt-arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.rt-report-item:hover .rt-arrow-icon {
    transform: translateX(5px);
}

/* Viewer area */
.rt-viewer-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e0e0e0;
}

.rt-viewer-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-viewer-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.rt-viewer-controls {
    display: flex;
    gap: 10px;
}

.rt-viewer-controls button {
    padding: 8px 16px;
    background: #102ce5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.rt-viewer-controls button:hover {
    background: #0a1fb3;
}

.rt-pdf-container {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

.rt-pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rt-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.rt-placeholder svg {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.rt-placeholder h3 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 8px;
}

.rt-placeholder p {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .rapporti-tecnici-container {
        flex-direction: column;
    }

    .rt-sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
    }

    .rt-viewer-area {
        height: 50vh;
    }
}
