/* =========================================
   OBJECT INFO PAGE - ISOLATED STYLES
   Scope: only inside .left-block on objects-info page
   ========================================= */

/* =========================================
   DETAILS LIST - Scoped Styles
   ========================================= */

/* Override global .detailsList styles for objects-info page */
.left-block .detailsList{
  /* 2-column flex layout (override global grid) */
  display: flex; /* Override global grid at 991px+ */
  flex-wrap: wrap;
  gap: 0 40px; /* Minimal row gap - no vertical spacing */
  margin: 0 0 40px 0;
  padding: 0;
  list-style: none;
  /* Reset global grid properties */
  grid-template-columns: none;
  column-gap: 0;
}

/* Default item = half width on desktop */
/* Override global .detailsList li styles */
.left-block .detailsList > li{
  width: calc(50% - 20px); /* Override global width: 100% */
  display: flex; /* Override global display: inline-block */
  align-items: center;
  min-height: 32px; /* Minimal min-height */
  padding: 2px 0; /* Minimal padding */
  margin: 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 1.35rem;
  font-weight: 600;
  color: #333;
  /* Reset global inline-block properties */
  vertical-align: unset;
}

/* Full width rows */
.left-block .detailsList > li.full-width-row{
  width: 100%;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 3px 0; /* Minimal padding */
  min-height: 34px; /* Minimal min-height */
}

/* Phone row should be full width (better UX) */
/* Target the button itself */
.left-block .detailsList > li > button[data-cy="ad-contact-phone"]{
  width: 100%;
}

/* Price row full width (anchor element) */
.left-block .detailsList > li .price-info{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px; /* Improved padding for better visual weight */
  border-radius: 10px;
  background: rgba(237, 91, 3, 0.06);
  border: 1px solid rgba(237, 91, 3, 0.12);
  margin-top: 2px; /* Slight top spacing */
}

.left-block .detailsList > li .price-info > b{
  color: #ed5b03;
  font-weight: 800;
  font-size: 1.65rem;
}

/* Icons – normalize both FA6 (.fa-solid) and old FA (.fa) */
/* Icons = secondary visual element, text = primary */
.left-block .detailsList > li i{
  flex: 0 0 18px; /* Slightly reduced width for better proportion */
  text-align: center;
  margin-right: 12px; /* Increased gap for better separation */
  font-size: 1.25rem; /* Slightly smaller (was 1.3rem) - icons support text */
  color: #0c93d2;
  opacity: 0.75; /* Reduced opacity - icons are secondary */
  /* FontAwesome 6 font family - critical for icon rendering */
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome";
  font-weight: 900; /* Solid icons require font-weight: 900 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Ensure icon visibility */
  speak: none;
  text-rendering: auto;
}

/* Labels */
.left-block .detailsList > li b{
  color: #888;
  font-weight: 500;
  margin-right: 8px; /* Increased gap for better readability */
  white-space: nowrap;
  flex-shrink: 0; /* Prevent label wrapping */
}

/* Placeholder ("уточняется") */
.left-block .detailsList .text-muted{
  font-size: 1.2rem;
  font-style: italic;
  color: #999;
  opacity: 0.8;
}

/* Phone CTA styling (button + a) */
.left-block .detailsList button[data-cy="ad-contact-phone"]{
  padding: 0;
  border: 0;
  background: transparent;
}

.left-block .detailsList button[data-cy="ad-contact-phone"] a{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px; /* Reduced from 12px */
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(12,147,210,0.15);
  background: rgba(12,147,210,0.06);
  /* Improve phone number readability */
  color: #0c93d2;
  font-weight: 600;
}

.left-block .detailsList button[data-cy="ad-contact-phone"] a:hover{
  background: rgba(12,147,210,0.10);
}

  /* Phone icon inside button - ensure visibility */
  .left-block .detailsList button[data-cy="ad-contact-phone"] a i{
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome";
    font-weight: 900; /* Solid icons require font-weight: 900 */
    opacity: 1; /* Keep full opacity in CTA button */
  color: #0c93d2;
  font-size: 1.3rem; /* Slightly larger for CTA visibility */
  flex: 0 0 auto;
  margin-right: 0; /* Gap handled by parent flex gap */
}

/* Guest segments/icons returned as HTML – make them look like neat chips */
/* These are icons inside "Для кого" value area (not the leading icon) */
.left-block .detailsList > li i + b + * i,
.left-block .detailsList > li b + i{
  padding: 4px 8px;
  margin: 0 4px 0 0; /* Horizontal spacing between chips */
  border-radius: 6px;
  background: rgba(12,147,210,0.08);
  opacity: 1; /* Full opacity for chip icons */
  font-size: 1.1rem; /* Smaller than leading icons */
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Weekend price row has no icon – align it nicely */
.left-block .detailsList > li span.price{
  font-weight: 700;
}

/* =========================================
   MOBILE-FIRST FINE TUNING
   ========================================= */

/* Responsive: single column on mobile */
@media (max-width: 991px){
  .left-block .detailsList{
    gap: 4px 0; /* Tighter row gap to reduce scroll fatigue */
    /* Ensure flex is maintained on mobile (override any global grid) */
    display: flex;
    margin-bottom: 32px; /* Reduced bottom margin on mobile */
  }
  
  .left-block .detailsList > li{
    width: 100%;
    padding: 10px 0; /* Increased padding for better touch comfort */
    min-height: 44px; /* Minimum 44px touch target (iOS/Android standard) */
    font-size: 1.3rem; /* Slightly smaller for better mobile readability */
  }
  
  /* Icons slightly larger on mobile for better visibility */
  .left-block .detailsList > li i{
    font-size: 1.35rem; /* Larger icons on mobile */
    flex: 0 0 22px; /* More space for icon */
    margin-right: 10px; /* Slightly reduced gap on mobile */
    opacity: 0.85; /* Slightly more visible on mobile */
  }
  
  /* Labels - better mobile readability */
  .left-block .detailsList > li b{
    font-size: 1.3rem; /* Match row font size */
    margin-right: 6px; /* Tighter spacing on mobile */
  }
  
  /* Full-width rows - optimized for mobile */
  .left-block .detailsList > li.full-width-row{
    padding: 12px 0; /* More padding for stars/recommended */
    min-height: 48px; /* Better touch target */
  }
  
  /* Phone CTA - primary action, make it stand out on mobile */
  .left-block .detailsList button[data-cy="ad-contact-phone"] a{
    padding: 14px 16px; /* Larger touch target (minimum 44px height) */
    font-size: 1.4rem; /* Larger text for better readability */
    border-width: 2px; /* Thicker border for better visibility */
    background: rgba(12,147,210,0.10); /* Slightly more prominent background */
  }
  
  /* Phone icon in CTA - larger on mobile */
  .left-block .detailsList button[data-cy="ad-contact-phone"] a i{
    font-size: 1.5rem; /* Larger icon for CTA visibility */
  }
  
  /* Price badge - primary action, enhance on mobile */
  .left-block .detailsList > li .price-info{
    padding: 10px 14px; /* Larger padding for better touch/visibility */
    margin-top: 4px; /* More top spacing */
    border-width: 2px; /* Thicker border for prominence */
  }
  
  .left-block .detailsList > li .price-info > b{
    font-size: 1.8rem; /* Larger price text on mobile */
    line-height: 1.2; /* Tighter line height */
  }
  
  /* Placeholder text - smaller on mobile to reduce noise */
  .left-block .detailsList .text-muted{
    font-size: 1.15rem; /* Slightly smaller */
    opacity: 0.7; /* More subtle */
  }
  
  /* Guest segments chips - better mobile spacing */
  .left-block .detailsList > li i + b + * i,
  .left-block .detailsList > li b + i{
    padding: 5px 10px; /* Slightly larger padding for touch */
    margin: 0 6px 0 0; /* More spacing between chips */
    font-size: 1.15rem; /* Slightly larger on mobile */
  }
}

/* Extra small screens (360-480px) - further optimization */
@media (max-width: 480px){
  .left-block .detailsList{
    gap: 3px 0; /* Even tighter gap on very small screens */
    margin-bottom: 28px;
  }
  
  .left-block .detailsList > li{
    padding: 8px 0; /* Slightly reduced padding */
    min-height: 42px; /* Still above 40px minimum */
    font-size: 1.25rem; /* Slightly smaller font */
  }
  
  /* Icons on very small screens */
  .left-block .detailsList > li i{
    font-size: 1.3rem;
    flex: 0 0 20px;
    margin-right: 8px;
  }
  
  /* Phone CTA - maintain prominence */
  .left-block .detailsList button[data-cy="ad-contact-phone"] a{
    padding: 12px 14px; /* Slightly reduced but still comfortable */
    font-size: 1.35rem;
  }
  
  /* Price - maintain readability */
  .left-block .detailsList > li .price-info > b{
    font-size: 1.7rem; /* Slightly smaller on very small screens */
  }
  
  /* Labels - prevent wrapping */
  .left-block .detailsList > li b{
    font-size: 1.25rem;
    max-width: 45%; /* Prevent label from taking too much space */
  }
}

/* Override global grid media query for scoped version */
@media screen and (min-width: 991px) {
  .left-block .detailsList {
    /* Ensure flex layout overrides global grid */
    display: flex;
    grid-template-columns: none;
  }
}

/* =========================================
   OBJECTS INFO - Description Section
   ========================================= */

.objects-info {
  width: 100%;
  display: block;
  margin-bottom: 50px;
}

.objects-info .content {
  font-size: 1.44rem; /* 20% kattalashtirildi (1.2rem * 1.2) */
}

.objects-info .content p {
  font-size: 1.44rem; /* 20% kattalashtirildi */
}

/* =========================================
   PRINT STYLES - Minimal, Safe Print View
   ========================================= */

@media print {
  /* Hide non-essential UI elements - hide only parent blocks */
  .filter-block,
  .objects-link-btn,
  .galleryBox,
  .map-block,
  .blue-title,
  .objectRow,
  .adm-comment {
    display: none;
  }
  
  /* Ensure essential content is visible */
  .left-block {
    width: 100%;
    max-width: 100%;
  }
  
  /* Title - clean typography */
  .left-block .inside-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
    padding: 0;
    page-break-after: avoid;
  }
  
  .left-block .inside-title .dacha-name-style {
    display: inline-block;
    margin-right: 8px;
    padding: 4px 8px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
  }
  
  /* Details List - optimized for print */
  .left-block .detailsList {
    display: block;
    margin: 0 0 30px 0;
    padding: 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  .left-block .detailsList > li {
    width: 100%;
    display: block;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
    font-size: 1.1rem;
    color: #000;
    page-break-inside: avoid;
  }
  
  /* Icons - grayscale, smaller for print */
  .left-block .detailsList > li i {
    display: inline-block;
    width: 16px;
    margin-right: 8px;
    font-size: 1rem;
    color: #666;
    opacity: 1;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome";
    font-weight: 900;
  }
  
  /* Labels - readable */
  .left-block .detailsList > li b {
    color: #333;
    font-weight: 600;
    margin-right: 6px;
  }
  
  /* Price badge - readable, no background */
  .left-block .detailsList > li .price-info {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid #000;
    background: transparent;
    border-radius: 4px;
    margin-top: 0;
  }
  
  .left-block .detailsList > li .price-info > b {
    color: #000;
    font-weight: 800;
    font-size: 1.4rem;
  }
  
  /* Phone CTA - plain readable text, no styling */
  .left-block .detailsList button[data-cy="ad-contact-phone"] a {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    text-decoration: none;
    border-radius: 0;
  }
  
  .left-block .detailsList button[data-cy="ad-contact-phone"] a i {
    color: #000;
    opacity: 1;
  }
  
  /* Placeholder text - subtle */
  .left-block .detailsList .text-muted {
    color: #666;
    font-style: italic;
    opacity: 1;
  }
  
  /* Guest segments chips - simple borders */
  .left-block .detailsList > li i + b + * i,
  .left-block .detailsList > li b + i {
    padding: 2px 6px;
    margin: 0 4px 0 0;
    border: 1px solid #999;
    background: transparent;
    border-radius: 3px;
    opacity: 1;
  }
  
  /* Description section */
  .left-block .objects-info {
    margin: 0 0 30px 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  .left-block .objects-info .content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #000;
  }
  
  .left-block .objects-info .content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 12px 0;
    color: #000;
  }
  
  /* Remove all backgrounds and shadows */
  .left-block * {
    background: transparent;
    box-shadow: none;
    text-shadow: none;
  }
  
  /* Ensure links are readable */
  .left-block a {
    color: #000;
    text-decoration: underline;
  }
  
  /* Page breaks - strengthened prevention */
  .left-block .detailsList,
  .left-block .objects-info {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  /* Full-width rows - centered for print */
  .left-block .detailsList > li.full-width-row {
    text-align: center;
    padding: 10px 0;
  }
}
