/* ============================= */
/* Базові стилі */
/* ============================= */
body {
  font-family: 'Inter', sans-serif;
  background: #f8f9fa;
  color: #212529;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 900px;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  color: #212529;
}

/* ============================= */
/* Форма завантаження */
/* ============================= */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: 500;
  margin-bottom: 4px;
}

input, button {
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

input:focus {
  border-color: #0077ff;
  outline: none;
  box-shadow: 0 0 6px rgba(0,119,255,0.3);
}

button {
  background: #0077ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

button:hover {
  background: #0056cc;
}

/* ============================= */
/* Автопідказки */
/* ============================= */
.suggestions {
  border: 1px solid #ccc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  position: absolute;
  width: calc(100% - 64px);
  z-index: 1000;
  border-radius: 0 0 8px 8px;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: #f1f3f5;
}

/* ============================= */
/* Таблиця (резерв) */
/* ============================= */
.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

.data-table th {
  background: #f1f3f5;
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:hover {
  background: #f8f9fa;
}

.file-link {
  color: #0077ff;
  font-weight: 500;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.back-link {
  color: #0077ff;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ============================= */
/* Список лікарень (Accordion) */
/* ============================= */
.hospital-list {
  margin-top: 20px;
}

.hospital-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

.hospital-header {
  padding: 14px;
  background: #f1f3f5;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.hospital-header:hover {
  background: #e9ecef;
}

.hospital-files {
  display: none;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #dee2e6;
}

.hospital-files a {
  display: block;
  color: #0077ff;
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
}

.hospital-files a:hover {
  text-decoration: underline;
}

.no-files {
  margin: 0;
  color: #868e96;
  font-size: 0.9rem;
}

/* ============================= */
/* Пошук */
/* ============================= */
.search-bar {
  margin-bottom: 50px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-bar input {
  flex: 1; /* поле пошуку займає всю ширину */
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
}

.search-bar button {
  width: 80px; /* кнопка тільки 20px */
  height: 40px;
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; /* прибрали зайвий паддінг */
}

.search-bar button:hover {
  background: #0056cc;
}

/* ============================= */
/* Пагінація */
/* ============================= */
.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  color: #0077ff;
  transition: background 0.2s ease;
}

.pagination a:hover {
  background: #e9ecef;
}

.pagination a.active {
  background: #0077ff;
  color: #fff;
  font-weight: 600;
}
/* Попап */
/* Попап у стилі решти сайту */
.popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
}

.popup-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  margin-top: 60px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  animation: slideDown 0.3s ease;
}

.popup-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  text-align: center;
}

.popup-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-content input {
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
}

.popup-content input:focus {
  border-color: #0077ff;
  outline: none;
  box-shadow: 0 0 6px rgba(0,119,255,0.3);
}

.popup-content button {
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.popup-content button[type="submit"] {
  background: #0077ff;
  color: #fff;
}

.popup-content button[type="submit"]:hover {
  background: #0056cc;
}

.popup-content #closePopup {
  background: #e9ecef;
  color: #212529;
}

.popup-content #closePopup:hover {
  background: #dee2e6;
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

