/* ============================================
   INFOPORTAL.CSS - Content Components
   ============================================
   Inline Code, Lists, Callout / Alert / Info boxes
   ============================================ */


/* ============================================
   VERSION BANNER
   ============================================ */

.version-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: #FFF8F0;
    border-bottom: 1px solid #FFE0B2;
    color: #7A4F00;
    font-size: 13.5px;
    line-height: 1.4;
}

.version-banner svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: #E65100;
    opacity: 0.8;
}

.version-banner strong {
    font-weight: 600;
}

.version-banner a {
    color: #7A4F00;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.version-banner a:hover {
    color: #E65100;
}

@media (max-width: 600px) {
    .version-banner {
        padding: 8px 14px;
        font-size: 12.5px;
        align-items: flex-start;
    }

    .version-banner svg {
        margin-top: 2px; /* align icon to first text line when text wraps */
    }
}


/* ============================================
   TABLES
   ============================================ */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: var(--bg-white);
    white-space: nowrap;
}

/* Caption */
.table caption {
    caption-side: top;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    text-align: left;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

/* Header row */
.table th {
    padding: 12px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    border-bottom: 2px solid var(--primary);
}

/* Data cells */
.table td {
    padding: 12px 16px;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    line-height: 1.5;
}

/* Alternating row stripes */
.table tbody tr:nth-child(even) td {
    background: var(--primary-lighter);
}

/* Row hover */
.table tbody tr:hover td {
    background: var(--primary-light);
}

/* Remove bottom border from last row */
.table tbody tr:last-child td,
.table tbody tr:last-child th {
    border-bottom: none;
}

/* ============================================
   RESPONSIVE - TABLES
   ============================================ */

@media (max-width: 768px) {
    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
    }
}

/* ============================================
   INLINE CODE
   ============================================ */

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
    background: #fdf0f6;
    color: #d63384;
    border: 1px solid #f5c2dc;
    border-radius: 4px;
    padding: 2px 6px;
}

/* ============================================
   CONTENT LISTS
   ============================================ */

.main-section ul,
.main-section ol {
    padding-left: 0;
    margin: 12px 0;
    list-style: none;
}

.main-section ul li,
.main-section ol li {
    position: relative;
    padding: 4px 0 4px 24px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Unordered list bullet */
.main-section ul li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-medium);
}

/* Ordered list counter */
.main-section ol {
    counter-reset: list-counter;
}

.main-section ol li {
    counter-increment: list-counter;
}

.main-section ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Nested lists */
.main-section ul ul,
.main-section ol ol,
.main-section ul ol,
.main-section ol ul {
    margin: 4px 0;
}

/* Lists inside callouts */
.callout ul,
.callout ol {
    padding-left: 0;
    margin: 8px 0 0;
    list-style: none;
}

.callout ul li,
.callout ol li {
    position: relative;
    padding: 3px 0 3px 20px;
    line-height: 1.6;
}

.callout ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.callout p:not(:last-child) {
    margin-bottom: 8px;
}

/* ============================================
   CALLOUT BASE
   ============================================ */

.callout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Icon injected via ::before on the callout type class */
.callout::before {
    content: '';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.callout-body {
    flex: 1;
    min-width: 0;
}

.callout-title {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px !important;
}

.callout p:last-child {
    margin-bottom: 0;
}

/* ============================================
   CALLOUT TYPES
   ============================================ */

/* Info */
.callout-info {
    background: #EBF6FD;
    border-color: var(--primary);
}

.callout-info::before {
    content: 'ℹ';
    background: var(--primary);
}

.callout-info .callout-title {
    color: var(--primary-dark);
}

/* Tip */
.callout-tip {
    background: #F0FBF0;
    border-color: #4CAF50;
}

.callout-tip::before {
    content: '💡';
    background: #4CAF50;
}

.callout-tip .callout-title {
    color: #2E7D32;
}

/* Warn */
.callout-warn {
    background: #FFF8ED;
    border-color: #FF9800;
}

.callout-warn::before {
    content: '⚠';
    background: #FF9800;
}

.callout-warn .callout-title {
    color: #E65100;
}

/* Important */
.callout-important {
    background: #FEF0F0;
    border-color: #E53935;
}

.callout-important::before {
    content: '!';
    background: #E53935;
    font-size: 18px;
}

.callout-important .callout-title {
    color: #B71C1C;
}

/* Question */
.callout-question {
    background: #F5F0FD;
    border-color: #7B3FE4;
}

.callout-question::before {
    content: '?';
    background: #7B3FE4;
}

.callout-question .callout-title {
    color: #4A148C;
}

/* ============================================
   LISTING BLOCK (code with filename title)
   ============================================ */

.listingblock {
    margin: 20px 0;
}

.listingblock .title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-medium);
    position: relative;
    z-index: 1;
}

.listingblock .title::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.listingblock .code-fragment {
    border: 1px solid var(--border);
    border-radius: 0 6px 6px 6px;
    overflow: hidden;
}


/* Code block Styling */

pre.highlight {
  position: relative;
  font-size: 0;     /* collapses whitespace text nodes between <pre> and <code> */
  line-height: 0;
}

pre.highlight code {
  display: block;
  overflow-x: auto;
  padding: 0.75rem;
  background: var(--pre-background);
  color: var(--text-dark);
  /* reset inline <code> styles */
  border: none;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================
   DEVTOOL TYPE / ACCORDION
   ============================================ */

h2.devtool-type.header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    margin: 0 0 16px;
}

h2.devtool-type.header .download-button {
    width: 30px;
    height: 30px;
}

h2.devtool-type.header .download-button svg {
    width: 15px;
    height: 15px;
}

.devtool-type {
    margin: 24px 0;
}

.devtool-type h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.devtool-type h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 6px;
}

.accordion {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

/* Remove browser default disclosure triangle */
.accordion-item > summary {
    list-style: none;
}

.accordion-item > summary::-webkit-details-marker {
    display: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-light);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.accordion-header:hover {
    background: var(--primary-lighter);
}

.accordion-item[open] > .accordion-header {
    background: var(--primary-lighter);
    border-bottom: 1px solid var(--border);
}

.accordion-chevron {
    font-size: 16px;
    color: var(--text-light);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
}

.accordion-item[open] .accordion-chevron {
    transform: rotate(90deg);
}

.header-name {
    flex: 1;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: var(--text-dark);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accordion-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.copy-button,
.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.copy-button:hover,
.download-button:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary);
}

.copy-button svg,
.download-button svg {
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}

.accordion-content {
    background: var(--bg-white);
}

.accordion-content pre {
    margin: 0;
    font-size: 0;
    line-height: 0;
}

.accordion-content pre code {
    display: block;
    overflow-x: auto;
    padding: 0.75rem;
    background: var(--pre-background);
    color: var(--text-dark);
    border: none;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}