/* =========================
   FullFlow API Documentation
   ========================= */

.ff-api {
  margin-top: 0.25rem;
  color: var(--ink);
}

.ff-summary,
.ff-summary p {
  width: 100%;
  max-width: none !important;
}

/* Object path */
.ff-object-path {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.22rem 0.6rem;
  line-height: 1.2;
  background: rgba(8, 33, 63, 0.92);
  color: #fff7e8;
  border: 1px solid var(--cyan);
  border-left: 5px solid var(--red);
  box-shadow: 3px 3px 0 #000;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Sections */
.ff-section {
  margin-top: 1.4rem;
}

.ff-section h2 {
  margin: 0 0 0.55rem;
  padding-bottom: 0.18rem;
  border-bottom: 3px solid var(--red);
  color: var(--blue);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* Tables */
.ff-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0.4rem 0 1.4rem;
  background: rgba(234, 220, 196, 0.25);
  border: 2px solid rgba(7, 21, 38, 0.75);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.9);
}

.ff-col-name {
  width: 28%;
}

.ff-col-type {
  width: 22%;
}

.ff-col-description {
  width: 50%;
}

.ff-table th {
  padding: 0.45rem 0.55rem;
  background: var(--navy);
  color: var(--gold);
  border-bottom: 2px solid var(--red);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ff-table td {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(7, 21, 38, 0.18);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.42;
  vertical-align: top;
}

.ff-table tr:last-child td {
  border-bottom: none;
}

/* Name column */
.ff-name,
.ff-name code {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

/* Type column */
.ff-type,
.ff-type code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Description column */
.ff-desc {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Generic code */
.ff-table code,
.ff-object-path code {
  padding: 0;
  border: none;
  background: transparent;
  color: #14314f;
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Keep path bright */
.ff-object-path code {
  color: #fff7e8;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Description formatting */
.ff-summary ul,
.ff-desc ul {
  margin: 0.4rem 0 0.7rem 1.4rem;
  padding-left: 0.2rem;
}

.ff-summary li,
.ff-desc li {
  margin: 0.15rem 0;
  line-height: 1.5;
}

.ff-desc p {
  margin: 0 0 0.35rem;
  max-width: none;
}

.ff-desc p:last-child {
  margin-bottom: 0;
}

/* Inline code inside descriptions */
.ff-desc code,
.ff-table td:nth-child(3) code {
  display: inline;
  padding: 0.04rem 0.28rem;
  background: rgba(8, 33, 63, 0.92);
  color: #fff7e8;
  border: 1px solid var(--cyan);
  box-shadow: 2px 2px 0 #000;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Display equation blocks */
.ff-equation {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0.45rem 0 0.65rem;
  padding: 0.55rem 0.7rem;
  background:
    linear-gradient(rgba(127, 216, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 216, 255, 0.04) 1px, transparent 1px),
    #111827;
  background-size: 12px 12px;
  border: 2px solid var(--cyan);
  border-left: 6px solid var(--red);
  box-shadow: 3px 3px 0 #000;
  color: #b7ffb7;
  font-family: "Courier New", monospace;
  font-size: 0.72rem !important;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
}

/* Override inline-code styling inside display equations */
.ff-table td:nth-child(3) .ff-equation code,
.ff-desc .ff-equation code,
.ff-equation code {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit !important;
  font-weight: inherit;
  line-height: inherit;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Mobile */
@media screen and (max-width: 700px) {
  .ff-object-path {
    font-size: 0.86rem;
    padding: 0.24rem 0.55rem;
  }

  .ff-col-name,
  .ff-col-type,
  .ff-col-description {
    width: auto;
  }

  .ff-table th,
  .ff-table td {
    padding: 0.4rem;
  }

  .ff-desc code,
  .ff-table td:nth-child(3) code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}