/* Shared styles for contract details and contract tools. */

/* contract-detail-inline-cleanup */
.yl-contract-viewer-breadcrumb {
  margin: 14px 0 18px;
  line-height: 2;
  font-weight: 800;
  color: #475569;
}

.yl-contract-viewer-breadcrumb a {
  color: inherit;
}

/* تحسين ظهور الشرح القانوني قبل نماذج العقود على الخلفية الداكنة */
.yl-contract-legal-explanation {
  color: #f8fafc;
}

.yl-contract-legal-explanation .section-head h2,
.yl-contract-legal-explanation .case-card h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.yl-contract-legal-explanation .section-head p,
.yl-contract-legal-explanation .case-card p {
  color: #e8eef8 !important;
  line-height: 2.25;
  font-weight: 700;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .30);
}

.yl-contract-legal-explanation .case-card {
  background: linear-gradient(180deg, rgba(30, 52, 88, .96), rgba(17, 35, 66, .98)) !important;
  border: 1px solid rgba(148, 163, 184, .38) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.yl-contract-legal-explanation .seo-internal-link {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .10);
}

@media (max-width: 700px) {
  .yl-contract-legal-explanation .section-head p,
  .yl-contract-legal-explanation .case-card p {
    font-size: .98rem;
    line-height: 2.15;
  }
}

/* Contract tools. */

/* أدوات صفحات العقود - مشتركة لكل ملفات العقود */
.contract-viewer-action-strip.seo-internal-links-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 16px auto 0 !important;
  direction: rtl !important;
}

.contract-viewer-action-strip .seo-internal-link {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 46px !important;
  padding: 10px 6px !important;
  border-radius: 16px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.contract-viewer-action-strip .seo-internal-link:active {
  transform: translateY(0) scale(.98) !important;
}

.yl-contract-tools-ready .yl-pdf-save-area.contract {
  margin: 16px auto 18px;
}

@media (max-width: 640px) {
  .contract-viewer-action-strip.seo-internal-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    max-width: 100% !important;
    margin-top: 12px !important;
  }

  .contract-viewer-action-strip .seo-internal-link {
    min-height: 38px !important;
    padding: 7px 3px !important;
    border-radius: 10px !important;
    font-size: clamp(9px, 2.6vw, 11px) !important;
    line-height: 1.25 !important;
  }
}

/* contract-hero-white-responsive-start */
/* تحسين وضوح نصوص هيرو صفحات العقود */
body.yl-contract-tools-ready .hero.hero-modern,
body.yl-contract-tools-ready section.hero.hero-modern {
  color: #ffffff !important;
}

body.yl-contract-tools-ready .hero.hero-modern .hero-content,
body.yl-contract-tools-ready .hero.hero-modern .hero-content * {
  text-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}

body.yl-contract-tools-ready .hero.hero-modern h1,
body.yl-contract-tools-ready .hero.hero-modern #heroContractTitle,
body.yl-contract-tools-ready #heroContractTitle {
  color: #ffffff !important;
  font-size: clamp(1.95rem, 5.2vw, 3rem) !important;
  line-height: 1.35 !important;
  font-weight: 950 !important;
  letter-spacing: -.02em;
}

body.yl-contract-tools-ready .hero.hero-modern p,
body.yl-contract-tools-ready .hero.hero-modern .hero-content p,
body.yl-contract-tools-ready .hero.hero-modern #contractIntro {
  color: rgba(255, 255, 255, .92) !important;
  font-size: clamp(1.02rem, 3.15vw, 1.28rem) !important;
  line-height: 1.85 !important;
  font-weight: 700 !important;
}

body.yl-contract-tools-ready .hero.hero-modern .hero-badge,
body.yl-contract-tools-ready .hero.hero-modern .hero-motto {
  color: #ffffff !important;
  font-size: clamp(.95rem, 2.9vw, 1.13rem) !important;
  font-weight: 900 !important;
}

body.yl-contract-tools-ready .hero.hero-modern .hero-motto {
  background: rgba(255, 255, 255, .10) !important;
  border-color: rgba(255, 255, 255, .45) !important;
}

body.yl-contract-tools-ready .contract-viewer-action-strip .seo-internal-link {
  color: #ffffff !important;
  font-size: clamp(.95rem, 2.8vw, 1.12rem) !important;
  font-weight: 950 !important;
}

@media (max-width: 640px) {
  body.yl-contract-tools-ready .hero.hero-modern h1,
  body.yl-contract-tools-ready .hero.hero-modern #heroContractTitle,
  body.yl-contract-tools-ready #heroContractTitle {
    font-size: clamp(1.65rem, 6.2vw, 2.15rem) !important;
    line-height: 1.35 !important;
  }

  body.yl-contract-tools-ready .hero.hero-modern p,
  body.yl-contract-tools-ready .hero.hero-modern .hero-content p,
  body.yl-contract-tools-ready .hero.hero-modern #contractIntro {
    font-size: clamp(.98rem, 3.8vw, 1.1rem) !important;
    line-height: 1.8 !important;
  }

  body.yl-contract-tools-ready .hero.hero-modern .hero-badge,
  body.yl-contract-tools-ready .hero.hero-modern .hero-motto {
    font-size: clamp(.86rem, 3.25vw, 1rem) !important;
  }

  body.yl-contract-tools-ready .contract-viewer-action-strip .seo-internal-link {
    font-size: clamp(.78rem, 3.25vw, .96rem) !important;
    line-height: 1.35 !important;
  }
}
/* contract-hero-white-responsive-end */

/* تحسين عنوان وروابط "روابط مرتبطة بالعقد" أسفل صفحات العقود */
body.yl-contract-tools-ready .related-links,
body.yl-contract-tools-ready .related-contracts,
body.yl-contract-tools-ready .seo-related-links,
body.yl-contract-tools-ready .contract-related-links,
body.yl-contract-tools-ready section[aria-label*="روابط"],
body.yl-contract-tools-ready section[aria-labelledby*="related"] {
  color: #ffffff !important;
}

body.yl-contract-tools-ready .related-links h2,
body.yl-contract-tools-ready .related-contracts h2,
body.yl-contract-tools-ready .seo-related-links h2,
body.yl-contract-tools-ready .contract-related-links h2,
body.yl-contract-tools-ready section h2,
body.yl-contract-tools-ready section h3 {
  color: #ffffff !important;
  font-size: clamp(1.35rem, 4.2vw, 2rem) !important;
  line-height: 1.45 !important;
  font-weight: 950 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.25) !important;
}

body.yl-contract-tools-ready .related-links a,
body.yl-contract-tools-ready .related-contracts a,
body.yl-contract-tools-ready .seo-related-links a,
body.yl-contract-tools-ready .contract-related-links a {
  color: #ffffff !important;
  font-size: clamp(1rem, 3.2vw, 1.18rem) !important;
  font-weight: 850 !important;
}

body.yl-contract-tools-ready .related-links p,
body.yl-contract-tools-ready .related-contracts p,
body.yl-contract-tools-ready .seo-related-links p,
body.yl-contract-tools-ready .contract-related-links p {
  color: rgba(255,255,255,.92) !important;
  font-size: clamp(.98rem, 3vw, 1.12rem) !important;
  line-height: 1.8 !important;
}
