/* ===== Collapsible Card Base ===== */
.cite-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 12px;
  word-wrap: break-word;         /* Wrap long words */
  overflow-wrap: break-word;     /* Ensure breaking on long URLs */
  max-width: 100%;               /* Constrain width inside parent */
  box-sizing: border-box;        /* Padding included in width */
}

/* Reference text */
.cite-ref {
  font-size: 15px;
  line-height: 1.5;
  color: #222;
  margin-bottom: 8px;
  white-space: normal;           /* Allow wrapping */
  word-break: break-word;        /* Break very long strings */
  overflow-x: auto;              /* Scroll horizontally only if needed */
}

/* Clickable header for toggle */
.cite-header {
  background: #f7f7f7;
  padding: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #222;
}

.cite-header:hover {
  background: #eaeaea;
}

/* Hidden by default */
.cite-body {
  display: none;
  padding: 10px;
  font-size: 14px;
}

/* Annotation box */
.cite-annotation {
  background: #eaf7ea;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

/* In-text citation */
.cite-intext {
  background: #fff3e0;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  word-break: break-word;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .cite-header {
    font-size: 14px;
    padding: 8px;
  }
  .cite-body {
    font-size: 13px;
    padding: 8px;
  }
  .cite-card {
    margin-bottom: 12px;
    padding: 10px;
  }
  .cite-ref {
    font-size: 14px;
    line-height: 1.4;
  }
  #cite-search {
  font-size: 14px;
  box-sizing: border-box;
}

#cite-search:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 4px rgba(25, 118, 210, 0.3);
}

}
