/* Daigu Pasaulis disease guide page styles */

.dp-tomato-diseases {
  --dp-green: #23391f;
  --dp-leaf: #7fb11d;
  --dp-sage: #f4ffd9;
  --dp-clay: #b76b4b;
  --dp-ink: #253027;
  --dp-muted: #657064;
  font-family: inherit;
  color: var(--dp-ink);
  line-height: 1.7;
}

.dp-tomato-diseases * {
  box-sizing: border-box;
}

.dp-tomato-diseases a {
  color: var(--dp-green);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dp-disease-kicker {
  margin: 0 0 12px;
  color: var(--dp-clay);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.dp-disease-section {
  margin: 26px 0;
}

.dp-disease-section h2 {
  margin: 0 0 16px;
  color: var(--dp-green);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

/* Tabs container */
.dp-disease-tabs {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #dfe6d5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8 0%, #f5faef 100%);
}

.dp-tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dp-guide-chooser h2 {
  margin: 0 0 10px;
  color: var(--dp-green);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.dp-guide-chooser {
  scroll-margin-top: 150px;
}

@media (max-width: 767px) {
  .dp-guide-chooser {
    scroll-margin-top: 82px;
  }
}

.dp-guide-chooser > p:not(.dp-disease-kicker) {
  max-width: 760px;
  margin: 0 0 18px;
  color: #4d5a50;
  font-size: 17px;
  line-height: 1.65;
}

.dp-guide-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.dp-guide-option {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #dfe7d8;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(35, 77, 53, 0.08);
}

.dp-guide-option img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dp-guide-option::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 34, 24, 0.08) 25%, rgba(20, 34, 24, 0.82) 100%);
}

.dp-guide-option span,
.dp-guide-option small {
  position: relative;
  z-index: 1;
  color: #fff;
}

.dp-guide-option span {
  display: block;
  padding: 0 14px 3px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
}

.dp-guide-option small {
  display: block;
  padding: 0 14px 14px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.9;
}

#dp-tab-pomidorai:checked ~ .dp-guide-chooser .dp-guide-option[for="dp-tab-pomidorai"],
#dp-tab-agurkai:checked ~ .dp-guide-chooser .dp-guide-option[for="dp-tab-agurkai"],
#dp-tab-paprikos:checked ~ .dp-guide-chooser .dp-guide-option[for="dp-tab-paprikos"],
#dp-tab-braskes:checked ~ .dp-guide-chooser .dp-guide-option[for="dp-tab-braskes"] {
  border-color: var(--dp-green);
  box-shadow: 0 14px 30px rgba(35, 77, 53, 0.18);
}

/* Panels */
.dp-tab-panel {
  display: block;
  scroll-margin-top: 110px;
}

.dp-tab-panel + .dp-tab-panel {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #dfe6d5;
}

.dp-tab-panel h3 {
  margin: 0 0 12px;
  color: var(--dp-green);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.dp-disease-tabs .dp-panel-note {
  margin: -3px 0 12px;
  max-width: 820px;
  color: #5b6757;
  font-size: 14.5px;
  line-height: 1.5;
}

/* Symptom cards */
.dp-disease-tabs .dp-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dp-disease-tabs .dp-quick-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid #e1dece;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
  box-shadow: 0 6px 16px rgba(35, 77, 53, 0.06);
}

.dp-disease-tabs .dp-quick-card figure {
  margin: 0;
  width: 180px;
  height: 158px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--dp-sage);
  cursor: zoom-in;
}

.dp-disease-tabs .dp-quick-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dp-disease-lightbox-open {
  overflow: hidden;
}

.dp-disease-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(20, 34, 24, 0.78);
  cursor: zoom-out;
}

.dp-disease-lightbox__panel {
  position: relative;
  display: inline-flex;
  width: min(688px, 62vw);
  height: min(496px, 58vh);
  line-height: 0;
  border: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #142218;
  cursor: default;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.dp-disease-lightbox__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  box-shadow: none;
  transform: scale(1.08);
  transform-origin: center;
}

.dp-disease-lightbox__image--wide {
  width: 100%;
  height: 100%;
}

.dp-disease-lightbox__image--tall {
  width: 100%;
  height: 100%;
}

@media (max-width: 767px) {
  .dp-disease-lightbox {
    padding: 16px;
  }

  .dp-disease-lightbox__panel {
    width: 84vw;
    height: 46vh;
  }

  .dp-disease-lightbox__image--wide {
    width: 100%;
    height: 100%;
  }

  .dp-disease-lightbox__image--tall {
    width: 100%;
    height: 100%;
    max-height: none;
  }
}

.dp-disease-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--dp-green);
  font-size: 30px;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.dp-disease-lightbox__close:hover,
.dp-disease-lightbox__close:focus {
  background: #fff;
  outline: 2px solid var(--dp-leaf);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .dp-disease-lightbox__close {
    top: 9px;
    right: 9px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    font-size: 24px;
    line-height: 32px;
    box-sizing: border-box;
  }
}

.dp-disease-tabs .dp-quick-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.dp-disease-tabs .dp-quick-card strong {
  display: block;
  margin: 0 0 5px;
  color: var(--dp-green);
  font-size: 17px;
  line-height: 1.22;
}

.dp-disease-tabs .dp-probable {
  display: block;
  margin-bottom: 6px;
  color: var(--dp-clay) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.dp-disease-tabs .dp-quick-card p {
  margin: 0 0 5px;
  color: #596356;
  font-size: 14px;
  line-height: 1.38;
}

.dp-disease-tabs .dp-quick-card p:last-child {
  margin-bottom: 0;
}

.dp-disease-tabs .dp-quick-card b {
  color: var(--dp-green);
}

.dp-disease-tabs .dp-treatment {
  margin-top: auto !important;
  padding: 9px 10px;
  border-left: 4px solid var(--dp-leaf);
  border-radius: 7px;
  background: #f4ffd9;
  color: #23391f !important;
  font-size: 13.5px !important;
  line-height: 1.38 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.dp-disease-tabs .dp-treatment b {
  color: #23391f;
}

.dp-disease-tabs .dp-treatment a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--dp-green);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.dp-disease-tabs .dp-treatment a:hover,
.dp-disease-tabs .dp-treatment a:focus {
  background: var(--dp-leaf);
  color: #fff !important;
  outline: none;
}

.dp-disease-tabs .dp-pest-grid {
  margin-bottom: 28px;
}

.dp-disease-tabs .dp-pest-card {
  border-color: #dbe8c7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfff1 100%);
}

.dp-disease-tabs .dp-pest-card .dp-probable {
  color: #7fb11d !important;
}

.dp-disease-tabs .dp-pest-card .dp-treatment {
  border-left-color: #7fb11d;
}

.dp-disease-tabs .dp-pest-grid .dp-pest-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Care section */
.dp-care-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  padding: 24px;
  border-radius: 8px;
  background: var(--dp-green);
  color: #fff;
}

.dp-care-band h2,
.dp-care-band h3 {
  margin-top: 0;
  color: #fff;
  letter-spacing: 0;
}

.dp-care-band p,
.dp-care-band li {
  color: rgba(255, 255, 255, 0.9);
}

.dp-care-band ul {
  margin: 0;
  padding-left: 19px;
}

.dp-warning {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 4px solid var(--dp-clay);
  background: #fff7f0;
  color: #4d4036;
}

/* Motion */
.dp-disease-tabs .dp-quick-card figure img {
  transition: transform 0.28s ease, filter 0.28s ease;
  transform-origin: center;
}

.dp-disease-tabs .dp-quick-card figure:hover img,
.dp-disease-tabs .dp-quick-card:hover figure img {
  transform: scale(1.08);
  filter: saturate(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .dp-disease-tabs .dp-quick-card figure img {
    transition: none;
  }

  .dp-disease-tabs .dp-quick-card figure:hover img,
  .dp-disease-tabs .dp-quick-card:hover figure img {
    transform: none;
    filter: none;
  }
}

/* Responsive */
@media (max-width: 1180px) and (min-width: 701px) {
  .dp-disease-tabs .dp-quick-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dp-disease-tabs .dp-quick-card {
    grid-template-columns: minmax(190px, 32%) minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }

  .dp-disease-tabs .dp-quick-card figure {
    width: 100%;
    height: 100%;
    min-height: 190px;
  }

  .dp-disease-tabs .dp-quick-card strong {
    font-size: 18px;
  }

  .dp-disease-tabs .dp-quick-card p {
    font-size: 14.5px;
    line-height: 1.45;
  }

  .dp-disease-tabs .dp-pest-grid .dp-pest-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .dp-care-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dp-disease-tabs .dp-quick-card {
    grid-template-columns: 162px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .dp-disease-tabs .dp-quick-card figure {
    width: 162px;
    height: 142px;
  }
}

@media (max-width: 820px) {
  .dp-guide-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dp-guide-option {
    min-height: 150px;
  }
}

@media (max-width: 700px) {
  .dp-disease-tabs {
    padding: 16px;
  }

  .dp-guide-options {
    grid-template-columns: 1fr;
  }

  .dp-disease-tabs .dp-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .dp-disease-tabs .dp-quick-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    height: 100%;
  }

  .dp-disease-tabs .dp-quick-card figure {
    width: 100%;
    height: 156px;
    margin: 0 0 8px;
  }

  .dp-disease-tabs .dp-quick-copy {
    flex: 1 1 auto;
  }

  .dp-disease-tabs .dp-quick-card strong {
    font-size: 13.5px;
    line-height: 1.2;
  }

  .dp-disease-tabs .dp-probable {
    font-size: 11.5px !important;
    margin-bottom: 5px;
  }

  .dp-disease-tabs .dp-quick-card p {
    font-size: 12px;
    line-height: 1.32;
  }

  .dp-disease-tabs .dp-panel-note {
    font-size: 14px;
    line-height: 1.45;
  }
}

@media (max-width: 430px) {
  .dp-disease-tabs .dp-quick-card figure {
    height: 144px;
  }
}

/* End Daigu Pasaulis disease guide page styles */

.dp-guide-options{grid-template-columns:repeat(4,minmax(0,1fr));}
.dp-guide-option,.dp-guide-option:hover,.dp-guide-option:focus{text-decoration:none!important;color:#fff;}
.dp-guide-option span,.dp-guide-option small{text-decoration:none!important;}
.dp-tab-panel{scroll-margin-top:130px;}
.dp-disease-tabs .dp-treatment a,
.dp-disease-tabs .dp-treatment a:visited,
.dp-disease-tabs .dp-treatment a:active,
.dp-disease-tabs .dp-treatment a:focus{background:var(--dp-green)!important;color:#fff!important;outline:none!important;}
.dp-disease-tabs .dp-treatment a:hover,
.dp-disease-tabs .dp-treatment a:visited:hover,
.dp-disease-tabs .dp-treatment a:active:hover,
.dp-disease-tabs .dp-treatment a:focus:hover{background:var(--dp-leaf)!important;color:#fff!important;}
.dp-disease-tabs .dp-treatment a:focus-visible{outline:2px solid var(--dp-leaf)!important;outline-offset:2px;}

/* Keep the purchase button below the product name, including when the legacy
   child-theme stylesheet is still loaded after the plugin on the live site. */
.dp-tomato-diseases .dp-disease-tabs .dp-treatment a,
.dp-tomato-diseases .dp-disease-tabs .dp-treatment a:visited {
  display: flex !important;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 0 !important;
  clear: both;
}

/*
 * The child theme may still enqueue its legacy disease-guide stylesheet after
 * this plugin. Keep the chooser owned by the plugin so all four crops stay on
 * one row on desktop.
 */
.dp-tomato-diseases .dp-disease-tabs .dp-guide-options {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width:820px){
  .dp-tomato-diseases .dp-disease-tabs .dp-guide-options {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:700px){
  .dp-tomato-diseases .dp-disease-tabs .dp-guide-options {
    grid-template-columns:1fr !important;
  }
}
