/**
 * Statistics Modal CSS
 * 
 * @title Statistics Modal Styles
 * @description עיצוב למסך הסטטיסטיקות
 * @author Gateway to the Past Team
 * @version 1.0.0
 * @date 2024
 */


 .statistics-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  z-index: 10000;
  background-color:#dfdcd6bb;
  justify-content: center;
  align-items: center;
  direction: rtl;
}

.statistics-modal.active {
  display: flex;
}

.statistics-modal.open {
  display: flex;
}

.statistics-modal-content {
  padding-top: 20px;
padding-left: 20px;
  padding-right: 20px;
  max-width: 1200px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  direction: rtl;
  background: #33322E;
}



.statistics-modal-header {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 24px; /* או הגובה של .stats-row */
  margin-bottom: 24px;
}

.statistics-modal-title {
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  margin: 0;
  color:#DFDCD6;
}

.statistics-modal-close {
  position: absolute;
  right: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1;
}

.statistics-modal-close svg {
  width: 32px;
  height: 32px;
}

.statistics-modal-close:hover {
  pointer-events: pointer;
  opacity: 0.7;
}


.statistics-modal-body {
  direction: rtl;
}

.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.stats-box {
  background: #3E3D39;
  flex: 1;
  padding: 20px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.stats-label {
  font-size: 1rem;
  color: #DFDCD6;
  margin-bottom: 8px;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: left;
}

.stats-value {
  font-size: 3rem;
  font-weight: bold;
  color: #DFDCD6;
  margin-bottom: 4px;
  font-family: 'Masada-Book';
  font-weight: 400;
  text-align: left;
}

.stats-sub-label {
  font-size: 1rem;
  color: #DFDCD6;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: left;
}

.stats-chart {
  background: #3E3D39;
  flex: 1;
  padding: 20px 16px 16px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stats-chart-title {
  color: #DFDCD6;
  font-size: 1rem;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: left;
}

.stats-period-container {
  width: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.stats-period-boxes {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: stretch;
}

.stats-period-box {
  flex: 1;
  min-width: 0;
  padding: 20px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  background: #3E3D39;
  margin: 0;
}

.stats-period-label {
  color: #DFDCD6;
  font-size: 1rem;
  margin-bottom: 8px;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: right;
}

.stats-period-value {
  color: #DFDCD6;
  font-size: 3rem;
  font-family: 'Masada-Book';
  font-weight: 400;
  margin-bottom: 4px;
  text-align: center;
}

.stats-period-sub-label {
  color: #DFDCD6;
  font-size: 1rem;
  margin-right: 4px;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: right;
}

.stats-period-title {
  color: #DFDCD6;
  font-size: 1rem;
  margin-bottom: 12px;
  font-family: 'GretaSans-Regular', sans-serif;
  font-weight: 400;
  text-align: right;
  width: 100%;
}

.stats-chart canvas {
  width: 100% !important;
  height: 250px !important;
  max-height: 300px;
  min-height: 180px;
  display: block;
}



@media (min-width: 2048px) {

  .statistics-modal-close {
    position: absolute;
    right: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1;
  }
  
  .statistics-modal-close svg {
    width: 36px;
    height: 36px;
  }

  .statistics-modal-title {
    top:0;
    font-size: 1.2rem;
  }
  .stats-label, .stats-sub-label, .stats-period-label, .stats-chart-title {
    font-size: 1.2rem;
  }

  .stats-period-sub-label {
    margin-right: 4px;
    font-size: 1rem;
  }

  .stats-value, .stats-period-value {
    font-size: 3.5rem;
  }
  .stats-chart {
    padding: 32px 24px 24px 24px;
  }

  .stats-box, .stats-period-box {
    padding: 32px 24px 24px 24px;
  }
  
  .stats-row {
    gap: 32px;
  }
  .stats-chart canvas {
    height: 350px !important;
    min-height: 250px;
  }
  .statistics-modal-content {
    max-width: 90vw;
    width: 90vw;
    height: auto;
  }
  
  .stats-source p {
    font-size: 1.1rem;
  }
} 


.stats-source p {
  font-family: 'GretaSans-Regular', sans-serif;
  font-size: 0.9rem;
  color: #DFDCD6;
  margin: 0;
  line-height: 1.5;
}

.stats-source a {
  color: #DFDCD6;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.stats-source a:hover {
  opacity: 0.7;
}

.stats-source .credit {
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: justify;
}

.newspaper-credits {
  margin-top: 1rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid rgba(223, 220, 214, 0.2);
  border-radius: 4px;
}

.newspaper-credits p {
  font-size: 0.75rem;
  margin: 0.2rem 0;
  color: #DFDCD6;
  font-family: 'GretaSans-Regular', sans-serif;
}

img, svg {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
}