/* Document library styling (cards/rows) */

.eha-doc-library{
  margin: 12px 0 28px;
}

/* Year accordion */
.eha-doc-year{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: var(--eha-radius);
  background: #FFFFFF;
  overflow: hidden;
  margin: 10px 0;
}

.eha-doc-year__summary{
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--eha-text);
  background: rgba(0,0,0,.02);
  list-style: none;
}

/* remove default disclosure marker, replace with subtle caret */
.eha-doc-year__summary::-webkit-details-marker{ display:none; }
.eha-doc-year__summary::after{
  content: "";
  float: right;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0,0,0,.45);
  border-bottom: 2px solid rgba(0,0,0,.45);
  transform: rotate(45deg);
  margin-top: 3px;
  transition: transform 180ms ease;
}
.eha-doc-year[open] .eha-doc-year__summary::after{
  transform: rotate(-135deg);
  margin-top: 6px;
}

.eha-doc-year__content{
  padding: 10px 12px 14px;
}

/* Document grid */
.eha-docs{
  display: grid;
  gap: 10px;
}

/* Cards by default */
.eha-docs--cards{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 768px){
  .eha-docs--cards{ grid-template-columns: 1fr; }
}

/* List layout (if you choose layout="list") */
.eha-docs--list{
  grid-template-columns: 1fr;
}

.eha-doc{
  display: flex;
  gap: 12px;
  align-items: center;

  padding: 12px;
  border-radius: calc(var(--eha-radius) + 2px);
  text-decoration: none;

  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.08);

  transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.eha-doc:hover{
  transform: translateY(-1px);
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.12);
}

.eha-doc:focus-visible{
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 2px;
}

/* Icon */
.eha-doc__icon{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0,0,0,.06);
  color: var(--eha-primary);
  flex: 0 0 auto;
}
.eha-doc__icon svg{
  width: 20px;
  height: 20px;
}

/* Text */
.eha-doc__body{
  display: grid;
  gap: 3px;
  min-width: 0;
}
.eha-doc__title{
  font-weight: 800;
  color: var(--eha-text);
  line-height: 1.2;
  word-break: break-word;
}
.eha-doc__meta{
  font-size: 13px;
  opacity: .75;
  color: var(--eha-text);
}

/* Disabled (edge case: no link) */
.eha-doc.is-disabled{
  opacity: .65;
  cursor: not-allowed;
}

/* Contracts table */
.eha-contracts-wrap{
  overflow-x: auto;
  margin: 10px 0 28px;
}

.eha-contracts{
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: var(--eha-surface);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: var(--eha-radius);
  overflow: hidden;
}

.eha-contracts th,
.eha-contracts td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,.10);
  text-align: left;
  color: var(--eha-text);
}

.eha-contracts th{
  background: rgba(0,0,0,.03);
  font-weight: 800;
}

.eha-contracts tbody tr:nth-child(even){
  background: rgba(0,0,0,.015);
}

.eha-doc-link{
  color: var(--eha-primary);
  text-decoration: none;
  font-weight: 800;
}

.eha-doc-link:hover{
  text-decoration: underline;
  opacity: .92;
}
