/* Шапка */
.site-header {
  background: #000;
  border-bottom: 2px solid #a855f7; /* фиолетовая линия */
  padding: 12px 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 40px;
  width: auto;
}

.site-header h1 {
  font-size: 24px;
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Адаптив для мобил */
@media (max-width: 768px) {
  .logo-container {
    justify-content: center;
    text-align: center;
  }

  .site-header h1 {
    font-size: 20px;
  }
}
/* Общий стиль */
body {
  font-family: 'Montserrat', sans-serif;
  background: #000;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout helpers */
* {
  box-sizing: border-box;
}

h1, h2, h3 {
  font-weight: 700;
  color: #fff;
}

a {
  color: #a855f7; /* фиолетовый */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

/* Карточка заявки */
.order {
  background: #111;
  border: 1px solid #a855f7; /* фиолетовая обводка */
  border-radius: 12px;
  padding: 20px;
  margin: 0 8px 20px;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  position: relative;
}

.order:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* Status indicator: left stripe only (keeps purple border and dark background) */
.order.order--waiting {
  border-left-width: 6px;
  border-left-color: #eab308; /* yellow-500 - complementary to purple */
}
.order.order--done {
  border-left-width: 6px;
  border-left-color: #22c55e; /* green-500 - harmonious with purple theme */
}

/* Формы */
form {
  margin-top: 15px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
}

input:focus, select:focus, textarea:focus {
  border-color: #a855f7;
  outline: none;
  box-shadow: 0 0 6px #a855f7;
}

/* Кнопки */
button {
  background: linear-gradient(145deg, #d4d4d4, #a3a3a3); /* серебристый */
  border: none;
  color: #000;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: linear-gradient(145deg, #a855f7, #7c3aed); /* фиолетовый при наведении */
  color: #fff;
  transform: translateY(-2px);
}

/* Список ответов */
.reply {
  background: #1a1a1a;
  border-left: 3px solid #a855f7;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  position: relative;
}

/* Prevent long reply text from overflowing */
.reply p {
  white-space: pre-wrap; /* keep user line breaks */
  overflow-wrap: anywhere; /* break long words/URLs if needed */
  word-break: break-word;
  line-height: 1.5; /* better readability for multi-line text */
}


/* Simple horizontal carousel */
.carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.carousel__img {
  height: 120px;
  width: auto;
  border-radius: 6px;
  flex: 0 0 auto;
  cursor: zoom-in;
  transition: opacity 0.3s ease;
  opacity: 0.7;
}

.carousel__img.loaded {
  opacity: 1;
}

.reply__delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  cursor: pointer;
  line-height: 20px;
  text-align: center;
  padding: 0;
}

.reply__delete:hover {
  background: #a855f7;
}

.order__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  cursor: pointer;
  line-height: 24px;
  text-align: center;
  padding: 0;
}

.order__delete:hover {
  background: #a855f7;
}

@media (max-width: 768px) {
  .carousel__img {
    height: 100px;
  }
}

/* Lightbox modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(168,85,247,0.4);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: #a855f7;
  color: #fff;
  border: none;
  border-radius: 9999px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(168,85,247,0.45);
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
  opacity: .95;
  font-size: 28px;
  line-height: 1;
}

.lightbox__close { top: 16px; right: 16px; background: rgba(42,42,42,0.9); width: 40px; height: 40px; font-size: 22px; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__close:hover { transform: none; background: #a855f7; }

@media (max-width: 768px) {
  .lightbox__prev, .lightbox__next { width: 56px; height: 56px; font-size: 30px; }
}

/* Reply modal */
.replyModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.replyModal.is-open { display: flex; }

.replyModal__content {
  background: #111;
  border: 1px solid #a855f7;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 0 24px rgba(168,85,247,0.4);
}

.replyModal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
}

.replyModal__close:hover {
  background: #a855f7;
}

.replyModal h3 {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 20px;
}

.replyModal .replyForm {
  margin-top: 0;
}

.replyModal input,
.replyModal textarea {
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .replyModal__content {
    width: 95%;
    padding: 20px;
  }
}

/* Make hit areas larger on touch */
.statusSelect,
.deleteBtn,
.replyForm button {
  min-height: 44px;
}

/* Адаптив */
@media (max-width: 768px) {
  .container {
    padding: 0 16px 16px;
  }

  .order {
    padding: 16px;
    margin: 0 6px 16px;
  }

  /* Larger base font for readability */
  body {
    font-size: 18px;
  }

  input, select, textarea {
    font-size: 18px;
    padding: 14px 14px;
  }

  button {
    font-size: 18px;
    padding: 14px 20px;
  }

  .site-header h1 {
    font-size: 22px;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  padding: 20px 0;
  flex-wrap: wrap;
}

.pagination__btn {
  padding: 8px 12px;
  border: 2px solid #8b5cf6;
  background: white;
  color: #8b5cf6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 40px;
}

.pagination__btn:hover {
  background: #8b5cf6;
  color: white;
}

.pagination__btn--active {
  background: #8b5cf6;
  color: white;
}

.pagination__dots {
  color: #666;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .pagination {
    gap: 4px;
    margin: 16px 0;
    padding: 16px 0;
  }
  
  .pagination__btn {
    padding: 6px 10px;
    font-size: 16px;
    min-width: 36px;
  }
}
