/* prices.css */

/* Modal overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  /* Modal content box */
  .modal-content {
    font-size: 12px;
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  .modal-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  /* Обёртка для таблицы с горизонтальным скроллом */
  .modal-table-scroll {
    width: 100%;
    overflow-x: auto;
  }
  
  /* Close button */
  .modal-content .close {
    position: absolute;
    top: 12px;
    right: 18px;
    z-index: 10;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 2px 10px;
    background: none !important;
    box-shadow: none !important;
    border: none;
    transition: background 0.2s;
}
.modal-content .close:hover {
    background: #ededed !important;
    cursor: pointer;
    border-radius: 50%;
}
  
  /* Table styling */
  #pricesModal .modal-table-scroll table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
  }
  #pricesModal .modal-table-scroll table {
    table-layout: fixed;
  }
  #pricesModal .modal-table-scroll th:nth-child(3),
  #pricesModal .modal-table-scroll td:nth-child(3),
  #pricesModal .modal-table-scroll th:nth-child(4),
  #pricesModal .modal-table-scroll td:nth-child(4),
  #pricesModal .modal-table-scroll th:nth-child(5),
  #pricesModal .modal-table-scroll td:nth-child(5) {
    width: 20%;
  }

  
  /* Мобильная оптимизация */
@media (max-width: 600px) {
    /* Разрешаем оверлею скроллиться */
    .modal {
      align-items: flex-start;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
  
    .modal-content {
      padding: 10px 2vw;
      max-width: 98vw;
      width: 98vw;
      min-width: 0;
      font-size: 9px;
      height: 95vh;
      max-height: 95vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
  
    .modal-content .close {
      top: 6px;
      right: 8px;
      font-size: 28px;
      padding: 2px 10px;
    }
  
    #pricesModal h2 {
      font-size: 1.1em;
      margin-bottom: 6px;
    }
  
    .modal-table-scroll {
      margin: 0 -2vw;
      padding: 0 2vw;
    }
  
    #pricesModal th,
    #pricesModal td {
      padding: 5px 6px;
      font-size: 0.95em;
      word-break: break-word;
    }
  
    #pricesModal th {
      font-size: 0.98em;
    }
  }
  
  /* Глобальные стили таблицы (не изменять) */
  #pricesModal th,
  #pricesModal td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
  }
  #pricesModal th {
    background-color: #f5f5f5;
    font-weight: 600;
  }
  #pricesModal h2 {
    margin: 0 0 10px;
    font-size: 1.5em;
    text-align: center;
  }
  