* {
    margin: 0;
    box-sizing: border-box;
}

.wrapper {
    min-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.top-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background-image: url("../images/food.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 10%;
}

.top-section__header {
    display: flex;
    padding: 90px;
    gap: 80px;
    justify-content: space-between;
    flex-direction: column;
}

.top-section__main {
    font-size: 50px;
    font-weight: 900;
}

.top-section__main-title {
    font-size: 30px;
}

.top-section__search {
    border-radius: 8px;
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.destination-width {
    width: 31%;
}

.top-section__input {
    width: 100%;
    border: 8px;
    border-radius: 8px 0 0 8px;
    font-weight: 400;
    font-size: 18px;
   /*padding-left: 25px;*/
}

.top-section__button {
    width: 33%;
    height: 51px;
    cursor: pointer;
    background-color: rosybrown;
    border-radius: 8px;
    font-size: 16px;
    color: white;
    padding: 0;
}

.dropbtn {
    background-color: #a3d7a5;
    color: white;
    padding: 16px;
    font-size: 16px;
    width: 67%;
    border-radius: 8px;
    cursor: pointer;
}

.dropdown {
    display: contents;
    width: 63%;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    width: 100%;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #ddd;}

.dropdown:hover .dropdown-content {display: block;}

.dropdown:hover .dropbtn {background-color: #3e8e41;}

.button {
    width: 96%;
    height: 20px;
    display: contents;
}

.searchTitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    background-color: #d4cbcb;
}

.section_Search {
    display: flex;
    flex-direction: column;
    background-color: #a3d7a5;
}

.picture_Block {
    display: flex;
    flex-direction: column;
    background-color: #f1f1f1;

}

.recepts_container {
    display: flex;
    padding: 10px 20px;
    gap: 20px;
}

.recepts_name {
    display: flex;
    width: 100%;
    flex-direction: column;
    font-size: 20px;
    gap: 20px;
}

.images {
    width: 100%;
}

.picture {
    width: 100%;
    height: auto;
}

.name {
    font-weight: 900;
}

.ingredients {
    white-space: pre-line;
}

/* Общие стили для PDF просмотра */
#pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 8px;
  box-sizing: border-box;
}

#pdf-modal .content {
  background: white;
  border-radius: 6px;
  padding: 8px;
  width: min(800px, 95vw);
  height: min(90vh, 90vh);
  max-height: 90vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Верхняя панель */
#pdf-modal .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px 5px;
  margin-bottom: 3px;
}

#page-info {
  font-size: 15px;
  font-weight: bold;
  color: #555;
  margin-left: 8px;
}

.pdf-close-btn {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  padding: 0;
}

/* Область просмотра */
#view-area {
  flex-grow: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  overflow: hidden;
  padding: 0;
}

.pdf-canvas-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
  box-sizing: border-box;
}

.pdf-canvas-container canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

/* Кнопки навигации */
.nav-btn-container {
  display: flex;
  align-items: center;
  z-index: 10;
  padding: 0 4px;
}

.nav-btn-container.left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

.nav-btn-container.right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}

.pdf-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: all 0.2s;
}

.pdf-nav-btn svg {
  width: 18px;
  height: 18px;
}

.pdf-nav-btn:hover:not(.disabled) {
  background: white;
  transform: scale(1.05);
}

.pdf-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Индикатор загрузки */
#pdf-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5;
  font-size: 16px;
  color: #666;
}

/* Нижняя панель */
#pdf-modal .footer {
  display: flex;
  justify-content: center;
  padding: 6px 0 4px;
  margin-top: 2px;
}

.pdf-download-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #4CAF50;
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.pdf-download-btn:hover {
  background: #3d8b40;
}

/* Адаптивность */
@media (max-width: 768px) {
  #pdf-modal {
    padding: 5px;
  }

  #pdf-modal .content {
    padding: 6px;
    height: 88vh;
    max-height: 88vh;
  }

  .pdf-nav-btn {
    width: 30px;
    height: 30px;
  }

  .pdf-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  #page-info {
    font-size: 14px;
  }

  .pdf-download-btn {
    padding: 7px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  #pdf-modal .content {
    width: 98vw;
    height: 95vh;
    max-height: 95vh;
    padding: 5px;
  }

  .pdf-close-btn {
    font-size: 20px;
    width: 30px;
    height: 30px;
  }

  .pdf-canvas-container {
    padding: 3px;
  }

  .pdf-nav-btn {
    width: 28px;
    height: 28px;
  }

  .pdf-download-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  #page-info {
    margin-left: 5px;
    font-size: 13px;
  }
}

/* Стили для чекбоксов ингредиентов */
.ingredient-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.ingredient-checkbox {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

