/* =====================================================
   DIVO SELLER CABINET
   Дизайн формы по макету Lovable
===================================================== */

.divo-seller-form-wrapper {
  display: flow-root !important;
  position: static !important;
  float: none !important;
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 32px 32px 56px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.divo-seller-intro {
  display: block !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  width: 100% !important;
  height: auto;
  max-width: none !important;
  padding: 0 !important;
}

.divo-seller-intro h1 {
  display: block !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
}

.divo-seller-intro p {
  display: block !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.divo-seller-form {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: both !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 1px solid #999;
  border-radius: 15px;
  margin-top: 20px !important;
}

/* Убираем фиксацию заголовка и описания при прокрутке */

.divo-seller-form-wrapper .divo-seller-intro,
.divo-seller-form-wrapper .divo-seller-intro h1,
.divo-seller-form-wrapper .divo-seller-intro p {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
}

/* Секции формы */

.divo-seller-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: static;
  margin: 0 0 36px;
  padding: 0;
}

.divo-seller-section:last-of-type {
  margin-bottom: 0;
}

.divo-seller-section h2 {
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.divo-seller-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.divo-seller-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.divo-seller-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: static;
  min-width: 0;
  margin: 0;
}

.divo-seller-field label {
  margin: 0;
  color: #111;
  font-size: 14px;
  font-weight: 500;
}

/* Поля ввода */

.divo-seller-form input:not([type="checkbox"]):not([type="file"]),
.divo-seller-form select,
.divo-seller-form textarea {
  display: block;
  position: static;
  float: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  border: 1px solid #999;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.divo-seller-form input:not([type="checkbox"]):not([type="file"]),
.divo-seller-form select {
  height: 44px;
  padding: 0 12px;
}

.divo-seller-form textarea {
  min-height: 130px;
  padding: 10px 12px;
  resize: vertical;
}

.divo-seller-form input:focus,
.divo-seller-form select:focus,
.divo-seller-form textarea:focus {
  border-color: #f57840;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 120, 64, 0.16);
}

.divo-seller-form input::placeholder,
.divo-seller-form textarea::placeholder {
  color: #777;
  opacity: 1;
}

/* Цена и валюта */

.divo-seller-price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 8px;
  min-width: 0;
}

/* Заголовок секции фотографий */

.divo-seller-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.divo-seller-photo-count {
  color: #666;
  font-size: 14px;
}

.divo-seller-help {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.55;
}

.divo-seller-help a {
  color: #f57840;
  text-decoration: none !important;
}

.divo-seller-help a:hover {
  text-decoration: underline;
}

/* Кнопка выбора фотографий */

.divo-seller-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #999 !important;
  border-radius: 5px;
  background: #fff !important;
  color: #111 !important;
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.divo-seller-upload-button:hover {
  border-color: #777;
  background: #fafafa;
}

/* Превью фотографий */

.divo-seller-photo-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.divo-seller-photo-preview:empty {
  display: none;
}

.divo-seller-photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f8f8f8;
}

.divo-seller-photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.divo-seller-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #f57840 !important;
  border-radius: 4px;
  background: #fff !important;
  color: #f57840 !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.divo-seller-photo-remove:hover {
  border-color: #f57840 !important;
  background: #f57840 !important;
  color: #fff !important;
}


/* Контакты и телефон */

.divo-seller-phone-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}


.divo-seller-consent label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 400;
}

.divo-seller-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 3px 0 0;
  accent-color: #f57840;
}

/* Нижняя часть формы */

.divo-seller-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #dedede;
}

.divo-seller-form-footer p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.divo-seller-form-footer p span,
.divo-seller-field label span {
  color: #f57840;
}

/* Основная кнопка */

.divo-seller-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 58px !important;
  border: 1px solid #f57840 !important;
  border-radius: 5px;
  background: #f57840 !important;
  color: #fff !important;
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.divo-seller-submit:hover {
  border-color: #e96b34;
  background: #e96b34;
}

.divo-seller-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Ошибки и сообщения */

.divo-seller-error {
  display: block;
  color: #c62828;
  font-size: 13px;
}

.divo-seller-error:empty {
  display: none;
}

.divo-seller-form-message {
  margin-top: 16px;
  font-size: 14px;
}

.divo-seller-form-message.is-success {
  padding: 14px;
  border: 1px solid #b7d8be;
  border-radius: 5px;
  background: #f3fbf4;
  color: #215d2d;
}

.divo-seller-form-message.is-error {
  padding: 14px;
  border: 1px solid #e8b9b9;
  border-radius: 5px;
  background: #fff5f5;
  color: #a11;
}

/* Скрытое антиспам-поле */

.divo-seller-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Окно подтверждения */

.divo-seller-review[hidden] {
  display: none !important;
}

.divo-seller-review {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.divo-seller-review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.divo-seller-review-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.divo-seller-review-dialog h2 {
  margin: 0 28px 22px 0;
  font-size: 22px;
  font-weight: 500;
}

.divo-seller-review-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  border: #f57840 !important;
  color: #f57840 !important;
  font-size: 28px;
  cursor: pointer;
}
.divo-seller-review-close:hover {
  border: #f57840 !important;
  background-color: #f57840 !important;
  color: #fff !important;
}

.divo-seller-review-dialog dl {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

.divo-seller-review-dialog dt {
  color: #666;
}

.divo-seller-review-dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.divo-seller-review-description {
  padding: 12px;
  border-radius: 5px;
  background: #f7f7f7;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.divo-seller-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
/* Скрываем заголовок страницы «Кабинет продавцов» */
body.page-id-4290 .entry-title {
  display: none !important;
}

/* Большие экраны */

@media (min-width: 1200px) {
  .divo-seller-form-wrapper {
    width: calc(100% - 64px);
    padding-top: 36px;
  }

  .divo-seller-intro h1 {
    font-size: 40px;
  }

  .divo-seller-form {
    padding: 36px 40px 40px;
  }

  .divo-seller-section {
    gap: 22px;
    margin-bottom: 38px;
  }
}

/* Ноутбуки и планшеты */

@media (max-width: 1024px) {
  .divo-seller-form-wrapper {
    width: calc(100% - 40px);
  }

  .divo-seller-form {
    padding: 28px;
  }

  .divo-seller-intro h1 {
    font-size: 36px;
  }
}

/* Телефоны */

@media (max-width: 767px) {
  .divo-seller-form-wrapper {
    width: calc(100% - 24px);
    padding: 24px 0 36px;
  }

  .divo-seller-intro {
    margin-bottom: 0 ;
  }

  .divo-seller-intro h1 {
    margin-bottom: 12px;
    font-size: 29px;
    letter-spacing: 0;
  }

  .divo-seller-intro p {
    font-size: 15px;
    line-height: 1.6;
  }

  .divo-seller-form {
    padding: 22px 18px;
  }
  .divo-seller-phone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

  .divo-seller-grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .divo-seller-section {
    gap: 17px;
    margin-bottom: 28px;
  }

  .divo-seller-section-heading {
    align-items: center !important;
    flex-wrap: wrap;
  }

  .divo-seller-photo-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .divo-seller-form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .divo-seller-submit {
    width: 100%;
  }

  .divo-seller-review-dialog {
    padding: 24px 18px;
  }

  .divo-seller-review-actions {
    flex-direction: column-reverse;
  }

  .divo-seller-review-actions button {
    width: 100%;
  }
}

/* Узкие телефоны */

@media (max-width: 380px) {
  .divo-seller-form {
    padding: 18px 13px;
  }

  .divo-seller-phone-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .divo-seller-price-grid {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .divo-seller-photo-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
}
