/*==========================================================
    COBB SWAGGER
==========================================================*/

/* Set font */
@font-face {
    font-family: 'Quicksand';
    src: url('/SharedResources/Quicksand-Regular.woff') format('woff');
    font-weight: 400;
    font-style: none;
}
* {
	font-family: 'Quicksand', sans-serif !important;
}

/* UI for example codes */
.highlight-code * {
    font-family: monospace !important;
    background: #2e3138 !important;
    color: white !important;
}
.highlight-code::before {
    content: "🔒";
    position: absolute;
    top: 6px;
    right: 25px;
    font-size: 30px;
    opacity: 0.8;
}

/* UI for input code */
div.body-param {
    position: relative;
}
div.body-param textarea.body-param__text {
    font-family: monospace !important;
    background: #3a3d45 !important;
    color: lightgreen !important;
}
div.body-param::after {
    content: "✏️";
    position: absolute;
    top: 6px;
    right: 25px;
    font-size: 30px;
    opacity: 0.8;
    pointer-events: none;
}

/* Cobb product image */
.information-container .title::after {
  content: "";
  display: block;
  width: 200px;
  height: 176px;
  background-image: url('/SharedResources/favicon.png');
  background-size: contain;
  background-repeat: no-repeat;
  margin: 0 auto;
}

/* Hide selectbar for different versions */
/* .swagger-ui .topbar .download-url-wrapper {
    display: none;
} */

/* Set position on select bar for different versions */
.swagger-ui .topbar .download-url-wrapper select {
    position: fixed;
    right: 10px;
    top: 50px;
    width: 115px !important;
    padding: 5px;
    z-index: 1000;
}
.swagger-ui .topbar .download-url-wrapper span {
    display: none;
}

/* Hide version tag */
.version-stamp {
    display: none !important;
}

/* Hide default header logo */
.topbar .wrapper .topbar-wrapper svg {
    display: none !important;
}

/* Custom header */
.topbar .wrapper {
    background-image: url('/SharedResources/caporum-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    height: 50px;
}
.topbar {
    background-color: #2e3138 !important;
}

/* Intro container */
.swagger-ui .info {
    margin: 0 !important;
    padding: 40px;
    background-color: #2e3138;
}
.swagger-ui .info h2 {
    color: #99bedc !important;
    text-align: center;
}
.swagger-ui .info p {
    color: #ffffff;
    max-width: 1460px;
    text-align: left;
}
.swagger-ui .info .info__tos {
    text-align: center;
}
.swagger-ui .wrapper:nth-child(1) {
    padding: 0;
    max-width: none !important;
}

/* Hide Media Typ select box in all endpoints */
.response-control-media-type {
    display: none;
}

/* Hide Parameters and Request Body in all endpoints */
/* .opblock-section {
    display: none;
} */

/* Main body */
body {
    background-color: #4a4e5a;
    margin: 0;
}

/* Endpoint boxes */
.opblock-get {
    background-color: white !important;
}
.opblock-post {
    background-color: white !important;
}

/* Endpoint collection border seperator */
.swagger-ui .opblock-tag {
    border-bottom: 1px solid black !important;
}

/* Endpoint title */
.opblock-tag {
    color: #99bedc !important;
}

/* Endpoint description */
.opblock-tag small {
    color: white !important;
}

/* Schema main box */
.models {
    background-color: #2e3138 !important;
}

/* Schema border */
.swagger-ui section.models {
    border: 1px solid #99bedc;
}

/* Schema title */
.swagger-ui section.models h4 span {
    color: #99bedc !important;
}
.swagger-ui .info .title
{
    color: #99bedc !important;
    text-align: center;
}

/* Schema boxes */
.model-container {
    background-color: white !important;
}

/* Toggles */
svg {
    filter: invert(100%) grayscale(100%) contrast(100%) brightness(0%);
}

/* Auth box */
.scheme-container {
    padding: 5px 0 !important;
}
.swagger-ui:has(.btn.authorize.unlocked) .scheme-container {
    background-color: #2e3138 !important;
}
.swagger-ui:has(.btn.authorize.locked) .scheme-container {
    background-color: #49cc90 !important;
}
.swagger-ui .scheme-container .schemes:not(:has(.schemes-server-container)) {
    justify-content: center !important;
}
.swagger-ui .btn.authorize svg {
    filter: invert(0%) grayscale(0%) contrast(100%) brightness(100%) !important;
}
.swagger-ui .btn.authorize.unlocked {
    border-color: black !important;
    color: black;
    background-color: white;
}
.swagger-ui .btn.authorize.locked {
    border-color: green !important;
    color: #49cc90;
    background-color: white;
}
.swagger-ui .btn.authorize.unlocked svg {
    fill: black;
}
.swagger-ui .btn.authorize.locked svg {
    fill: #49cc90;
}
.swagger-ui .btn.authorize.unlocked span:after {
    content: " - Logged out";
}
.swagger-ui .btn.authorize.locked span:after {
    content: " - Logged in";
}

/* Show endpoints as disabled if the user is not logged in */
.swagger-ui:has(.btn.authorize.unlocked) .opblock-summary .opblock-summary-method {
    background-color: red !important;
}

/* Description tags */
.renderedMarkdown code:not(.cobb-deprecated-highlight):not(.cobb-introduces-in-highlight) {
    background: #61affe !important;
    color: black !important;
    font-size: 12px !important;
    line-height: 2.5;
}

/* Localized-specific property name highlight — Localized flag colours
   Red:  #EF2B2D (Pantone 032 C, Localized flag red)
   Navy: #002868 (Reflex Blue, Localized flag blue) */
tr[data-cobb-localized="true"] > td:first-child {
    color: #2a5298 !important;
    border-left: 2px solid #2ecc71 !important;
    padding-left: 6px !important;
    background-color: rgba(42, 82, 152, 0.06) !important;
}
tr[data-cobb-localized="true"] > td:first-child::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 10px;
    margin-right: 5px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 15'%3E%3Crect width='22' height='15' fill='%23EF2B2D'/%3E%3Crect x='5' width='4' height='15' fill='%23fff'/%3E%3Crect y='5.5' width='22' height='4' fill='%23fff'/%3E%3Crect x='6' width='2' height='15' fill='%23002868'/%3E%3Crect y='6.5' width='22' height='2' fill='%23002868'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Cobb cobb version fields */
.cobb-deprecated-highlight {
  background: red !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 12px !important;
  line-height: 2.5;
}
.cobb-introduces-in-highlight {
  background: green !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 12px !important;
  line-height: 2.5;
}

/* Styling for Deprecated and Introduced sections with tables and toggle buttons */
.cobb-highlight-list {
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.deprecated-list-wrapper {
    background-color: #fff0f0;
    border: 1px solid #ff4d4d;
    color: #cc0000;
}
.introduced-list-wrapper {
    background-color: #f0fff0;
    border: 1px solid #33cc33;
    color: #009900;
}
.cobb-highlight-list h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
}
.cobb-highlight-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.cobb-highlight-list table th {
    border-bottom: 2px solid currentColor;
    text-align: left;
    padding: 6px 8px;
    background-color: rgba(255,255,255,0.2);
}
.cobb-highlight-list table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.cobb-highlight-list table tbody tr:hover {
    background-color: rgba(0,0,0,0.05);
}
.cobb-highlight-list table td strong,
.cobb-highlight-list table td em {
    color: inherit;
}
.deprecated-toggle-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    margin-bottom: 10px;
    transition: background 0.3s, transform 0.2s;
    color: white;
}
.btn-deprecated {
    background: linear-gradient(to bottom, #ff6666, #cc0000);
}
.btn-deprecated:hover {
    background: linear-gradient(to bottom, #ff8080, #e60000);
    transform: translateY(-1px);
}
.btn-deprecated:active {
    transform: translateY(1px);
}
.btn-introduced {
    background: linear-gradient(to bottom, #66ccff, #0099cc);
}
.btn-introduced:hover {
    background: linear-gradient(to bottom, #80d4ff, #00b3e6);
    transform: translateY(-1px);
}
.btn-introduced:active {
    transform: translateY(1px);
}

/* Center the native spec-URL link (a.link) in the info header */
.information-container .info .main {
    text-align: center !important;
}

/* Exempt the paperclip SVG inside the spec link from the global filter */
.information-container .info .main a.link svg {
    filter: none !important;
}

/*==========================================================
    DOCS PANEL
==========================================================*/

/* Floating trigger button */
#cobb-docs-btn {
    position: fixed;
    bottom: 28px;
    right: 20px;
    z-index: 900;
    display: flex;
    align-items: center;
    background: #2e3138;
    color: #99bedc;
    border: 1px solid #99bedc;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    transition: background 0.2s, color 0.2s;
}
#cobb-docs-btn:hover,
#cobb-docs-btn.cobb-docs-btn--active {
    background: #99bedc;
    color: #2e3138;
}
#cobb-docs-btn svg {
    filter: none !important;
}

/* Backdrop */
#cobb-docs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
}

/* Slide-in panel */
.cobb-docs-panel {
    width: min(860px, 90vw);
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.35);
    animation: cobb-docs-slidein 0.22s ease;
}
@keyframes cobb-docs-slidein {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* Panel header */
.cobb-docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2e3138;
    color: #99bedc;
    padding: 14px 20px;
    flex-shrink: 0;
}
.cobb-docs-header-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.4px;
}
.cobb-docs-header-title svg {
    filter: none !important;
}
.cobb-docs-close-btn {
    background: transparent;
    border: none;
    color: #99bedc;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}
.cobb-docs-close-btn:hover {
    color: #fff;
}

/* Body: nav + content side by side */
.cobb-docs-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left navigation */
.cobb-docs-nav {
    width: 230px;
    flex-shrink: 0;
    background: #f5f6f8;
    border-right: 1px solid #dde1e8;
    overflow-y: auto;
    padding: 12px 0;
}
.cobb-docs-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #3c4257;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.cobb-docs-nav-item:hover {
    background: #e8ecf5;
}
.cobb-docs-nav-item.cobb-docs-nav-item--active {
    background: #e0e8f7;
    border-left-color: #99bedc;
    color: #1a2a4a;
    font-weight: bold;
}
.cobb-docs-nav-num {
    font-size: 11px;
    color: #8a9ab8;
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    padding-top: 1px;
    flex-shrink: 0;
}
.cobb-docs-nav-item.cobb-docs-nav-item--active .cobb-docs-nav-num {
    color: #4a70a0;
}
.cobb-docs-nav-title {
    line-height: 1.35;
}

/* Right content */
.cobb-docs-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
    background: #fff;
}

/* Status / loading / error messages */
.cobb-docs-status {
    color: #888;
    font-size: 14px;
    padding: 20px 0;
}
.cobb-docs-status--error {
    color: #c0392b;
}

/* Rendered markdown styles */
.cobb-docs-markdown {
    font-size: 15px;
    line-height: 1.7;
    color: #2c3040;
    max-width: 720px;
}
.cobb-docs-markdown h1 {
    font-size: 1.7em;
    color: #1a2a4a;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #99bedc;
    font-family: 'Quicksand', sans-serif !important;
}
.cobb-docs-markdown h2 {
    font-size: 1.25em;
    color: #2a3a5a;
    margin: 28px 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #dde1e8;
    font-family: 'Quicksand', sans-serif !important;
}
.cobb-docs-markdown h3 {
    font-size: 1.05em;
    color: #3c4a6a;
    margin: 20px 0 8px;
    font-family: 'Quicksand', sans-serif !important;
}
.cobb-docs-markdown p {
    margin: 0 0 14px;
}
.cobb-docs-markdown ul,
.cobb-docs-markdown ol {
    margin: 0 0 14px 24px;
}
.cobb-docs-markdown li {
    margin-bottom: 5px;
}
.cobb-docs-markdown code {
    font-family: monospace !important;
    background: #eef2f8 !important;
    color: #c0392b !important;
    font-size: 13px !important;
    padding: 2px 5px !important;
    border-radius: 3px !important;
    line-height: inherit !important;
}
.cobb-docs-markdown pre {
    background: #2e3138;
    color: #cdd6f4;
    padding: 16px 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0 0 18px;
    font-size: 13px;
}
.cobb-docs-markdown pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-size: inherit !important;
}
.cobb-docs-markdown blockquote {
    border-left: 4px solid #99bedc;
    margin: 0 0 14px 0;
    padding: 6px 16px;
    background: #f0f5fb;
    color: #3a5070;
    border-radius: 0 4px 4px 0;
}
.cobb-docs-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 14px;
}
.cobb-docs-markdown th {
    background: #2e3138;
    color: #99bedc;
    padding: 8px 12px;
    text-align: left;
    font-weight: bold;
}
.cobb-docs-markdown td {
    padding: 7px 12px;
    border-bottom: 1px solid #dde1e8;
    vertical-align: top;
}
.cobb-docs-markdown tr:nth-child(even) td {
    background: #f8f9fc;
}
.cobb-docs-markdown a {
    color: #4a7fbe;
    text-decoration: underline;
}
.cobb-docs-markdown hr {
    border: none;
    border-top: 1px solid #dde1e8;
    margin: 24px 0;
}

/* Raw plaintext fallback */
.cobb-docs-raw {
    font-family: monospace !important;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #2c3040;
}