@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&family=Montserrat:wght@600;700&display=swap');

/* Topbar branding */
.swagger-ui .topbar {
    background: #141414 /* --bg */;
    border-bottom: 1px solid #272318 /* --border-subtle */;
    padding: 6px 0;
}

.swagger-ui .topbar-wrapper .link {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: none;
    text-decoration: none;
}

.swagger-ui .topbar-wrapper .link svg {
    display: none;
}

.swagger-ui .topbar-wrapper .link::before {
    content: 'B';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #EBBB40 /* --primary */;
    color: #141414 /* --bg */;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.swagger-ui .topbar-wrapper .link::after {
    content: 'BrewPage';
    font-family: Montserrat, sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #FAE96F /* --primary-hi */;
    letter-spacing: -0.02em;
}

.swagger-ui .topbar a {
    max-width: none;
}

.swagger-ui .topbar .download-url-wrapper input[type=text] {
    background: #272318 /* --surface */;
    border-color: #8C7039 /* --border */;
    color: #D6D3D1 /* --text */;
}

.swagger-ui .topbar .download-url-wrapper .select-label select {
    border-color: #8C7039 /* --border */;
}

/* Body & base */
body {
    background: #141414 /* --bg */ !important;
}

.swagger-ui {
    font-family: Inter, system-ui, sans-serif;
    color: #D6D3D1 /* --text */;
}

/* Wrapper container */
.swagger-ui .wrapper {
    max-width: 800px;
    padding: 0 2rem;
}

/* Info section */
.swagger-ui .info {
    margin: 30px 0;
}

.swagger-ui .info .title {
    color: #FAE96F /* --primary-hi */;
    font-family: Montserrat, Inter, system-ui, sans-serif;
    font-weight: 600;
}

.swagger-ui .info .title small {
    background: #EBBB40 /* --primary */ !important;
    color: #141414 /* --bg */ !important;
    border-radius: 4px /* --radius-sm */;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.swagger-ui .info .title small pre {
    color: #141414 /* --bg */ !important;
}

.swagger-ui .version-stamp {
    background-color: #649c67 /* --success */ !important;
    color: #ffffff !important;
    border-radius: 4px /* --radius-sm */;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.swagger-ui .version-stamp span {
    color: #ffffff !important;
}

.swagger-ui .info .description,
.swagger-ui .info .description p,
.swagger-ui .info li,
.swagger-ui .info p {
    color: #D6D3D1 /* --text */;
    font-family: Inter, system-ui, sans-serif;
}

.swagger-ui .info a {
    color: #EBBB40 /* --primary */;
}

.swagger-ui .info .base-url {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

/* Scheme container */
.swagger-ui .scheme-container {
    background: #1C1A14 /* --card */;
    box-shadow: none;
    border: 1px solid #272318 /* --border-subtle */;
    border-radius: 8px /* --radius */;
    padding: 16px;
}

.swagger-ui .scheme-container .schemes > label {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .scheme-container select {
    background: #272318 /* --surface */;
    border-color: #8C7039 /* --border */;
    color: #D6D3D1 /* --text */;
}

/* Tag group headers */
.swagger-ui .opblock-tag {
    color: #D6D3D1 /* --text */;
    border-bottom: 1px solid #272318 /* --border-subtle */;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
}

.swagger-ui .opblock-tag:hover {
    background: rgba(235, 187, 64, 0.06) /* --primary-muted faded */;
}

.swagger-ui .opblock-tag a,
.swagger-ui .opblock-tag a span {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .opblock-tag small {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.8125rem;
}

/* GET */
.swagger-ui .opblock.opblock-get {
    background: rgba(100, 156, 103, 0.08) /* --success faded */;
    border-color: #649c67 /* --success */;
}

.swagger-ui .opblock.opblock-get .opblock-summary {
    border-color: #649c67 /* --success */;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
    background: #649c67 /* --success */;
    color: #ffffff;
    font-weight: 700;
}

/* POST */
.swagger-ui .opblock.opblock-post {
    background: rgba(235, 187, 64, 0.08) /* --primary faded */;
    border-color: #EBBB40 /* --primary */;
}

.swagger-ui .opblock.opblock-post .opblock-summary {
    border-color: #EBBB40 /* --primary */;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
    background: #EBBB40 /* --primary */;
    color: #141414 /* --bg */;
    font-weight: 700;
}

/* PUT */
.swagger-ui .opblock.opblock-put {
    background: rgba(212, 160, 23, 0.08) /* dark gold faded */;
    border-color: #D4A017;
}

.swagger-ui .opblock.opblock-put .opblock-summary {
    border-color: #D4A017;
}

.swagger-ui .opblock.opblock-put .opblock-summary-method {
    background: #D4A017;
    color: #141414 /* --bg */;
    font-weight: 700;
}

/* DELETE */
.swagger-ui .opblock.opblock-delete {
    background: rgba(207, 102, 121, 0.08) /* --error faded */;
    border-color: #cf6679 /* --error */;
}

.swagger-ui .opblock.opblock-delete .opblock-summary {
    border-color: #cf6679 /* --error */;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-method {
    background: #cf6679 /* --error */;
    color: #ffffff;
    font-weight: 700;
}

/* PATCH */
.swagger-ui .opblock.opblock-patch {
    background: rgba(223, 141, 3, 0.08) /* --warning faded */;
    border-color: #DF8D03 /* --warning */;
}

.swagger-ui .opblock.opblock-patch .opblock-summary {
    border-color: #DF8D03 /* --warning */;
}

.swagger-ui .opblock.opblock-patch .opblock-summary-method {
    background: #DF8D03 /* --warning */;
    color: #141414 /* --bg */;
    font-weight: 700;
}

/* Method badge base (ensure text always visible) */
.swagger-ui .opblock-summary-method {
    border-radius: 4px /* --radius-sm */;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    min-width: 60px;
    text-align: center;
}

/* Operation block inner text */
.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-path span,
.swagger-ui .opblock .opblock-summary-description {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .opblock .opblock-section-header {
    background: rgba(39, 35, 24, 0.5) /* --surface semi */;
    box-shadow: none;
    border-bottom: 1px solid #272318 /* --border-subtle */;
}

.swagger-ui .opblock .opblock-section-header h4 {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .opblock .opblock-section-header label {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

/* Operation body/content */
.swagger-ui .opblock-body,
.swagger-ui .opblock .opblock-body {
    background: transparent;
}

.swagger-ui .opblock-description-wrapper,
.swagger-ui .opblock-description-wrapper p,
.swagger-ui .opblock-external-docs-wrapper,
.swagger-ui .opblock-external-docs-wrapper p {
    color: #D6D3D1 /* --text */;
}

/* Parameters */
.swagger-ui table thead tr th,
.swagger-ui table thead tr td,
.swagger-ui .parameters-col_description p,
.swagger-ui .parameter__name,
.swagger-ui .parameter__type,
.swagger-ui .parameter__in {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .parameter__name.required::after {
    color: #cf6679 /* --error */;
}

.swagger-ui .parameter__name.required span {
    color: #cf6679 /* --error */;
}

.swagger-ui table tbody tr td {
    color: #D6D3D1 /* --text */;
    border-bottom-color: #272318 /* --border-subtle */;
}

/* Input fields */
.swagger-ui input[type=text],
.swagger-ui input[type=password],
.swagger-ui input[type=search],
.swagger-ui input[type=email],
.swagger-ui input[type=file],
.swagger-ui textarea,
.swagger-ui select {
    background: #272318 /* --surface */;
    border: 1px solid #8C7039 /* --border */;
    color: #D6D3D1 /* --text */;
    border-radius: 4px /* --radius-sm */;
}

.swagger-ui textarea {
    background: #272318 /* --surface */;
    color: #D6D3D1 /* --text */;
}

/* Buttons */
.swagger-ui .btn {
    border-radius: 6px;
    font-family: Inter, system-ui, sans-serif;
}

.swagger-ui .btn.execute {
    background: #EBBB40 /* --primary */;
    color: #141414 /* --bg */;
    border: none;
    font-weight: 600;
}

.swagger-ui .btn.execute:hover {
    background: #FAE96F /* --primary-hi */;
}

.swagger-ui .btn.cancel {
    border-color: #cf6679 /* --error */;
    color: #cf6679 /* --error */;
}

.swagger-ui .btn.authorize {
    color: #EBBB40 /* --primary */;
    border-color: #EBBB40 /* --primary */;
}

.swagger-ui .btn.authorize svg {
    fill: #EBBB40 /* --primary */;
}

.swagger-ui .try-out__btn {
    color: #EBBB40 /* --primary */;
    border-color: #EBBB40 /* --primary */;
}

.swagger-ui .try-out__btn:hover {
    background: rgba(235, 187, 64, 0.06) /* --primary-muted faded */;
}

/* Responses */
.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5,
.swagger-ui .response-col_status {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .response-col_description {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

.swagger-ui .response-col_description__inner p,
.swagger-ui .response-col_description__inner span {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .responses-table thead td {
    color: #D4A85C /* --text-th */;
}

/* Code/pre */
.swagger-ui .highlight-code,
.swagger-ui pre {
    background: #0a0a0a /* --bg-elevated */;
    border-radius: 8px /* --radius */;
}

.swagger-ui .highlight-code .microlight {
    background: #0a0a0a /* --bg-elevated */;
    color: #D6D3D1 /* --text */;
    font-family: 'JetBrains Mono', monospace;
}

.swagger-ui pre.microlight {
    background: #0a0a0a /* --bg-elevated */;
    color: #D6D3D1 /* --text */;
    border: 1px solid #272318 /* --border-subtle */;
    border-radius: 8px /* --radius */;
    font-family: 'JetBrains Mono', monospace;
}

.swagger-ui code,
.swagger-ui .renderedMarkdown code {
    background: #0a0a0a /* --bg-elevated */;
    color: #EBBB40 /* --primary */;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px /* --radius-sm */;
}

/* Models */
.swagger-ui section.models {
    border: 1px solid #272318 /* --border-subtle */;
    border-radius: 8px /* --radius */;
}

.swagger-ui section.models h4 {
    color: #D6D3D1 /* --text */;
    border-bottom-color: #272318 /* --border-subtle */;
}

.swagger-ui section.models h4 span {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .model-box {
    background: #1C1A14 /* --card */;
}

.swagger-ui .model {
    color: #D6D3D1 /* --text */;
    font-family: 'JetBrains Mono', monospace;
}

.swagger-ui .model-title {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .model .property.primitive {
    color: #EBBB40 /* --primary */;
}

.swagger-ui .model-toggle::after {
    background: none;
}

/* Content type selector */
.swagger-ui .body-param-content-type select,
.swagger-ui .response-control-media-type select,
.swagger-ui .responses-header select {
    background: #272318 /* --surface */;
    border: 1px solid #8C7039 /* --border */;
    color: #D6D3D1 /* --text */;
}

/* Tab styling */
.swagger-ui .tab li {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

.swagger-ui .tab li.active {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .tab li button.tablinks {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

.swagger-ui .tab li button.tablinks.active {
    color: #D6D3D1 /* --text */;
}

/* Response wrapper */
.swagger-ui .response-col_links {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

/* Markdown rendered */
.swagger-ui .markdown p,
.swagger-ui .markdown li,
.swagger-ui .renderedMarkdown p {
    color: #D6D3D1 /* --text */;
}

/* Scrollbar */
.swagger-ui ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.swagger-ui ::-webkit-scrollbar-thumb {
    background: #8C7039 /* --border */;
    border-radius: 4px /* --radius-sm */;
}

.swagger-ui ::-webkit-scrollbar-track {
    background: #272318 /* --surface */;
}

/* Server dropdown */
.swagger-ui .servers > label {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .servers > label select {
    background: #272318 /* --surface */;
    border: 1px solid #8C7039 /* --border */;
    color: #D6D3D1 /* --text */;
}

/* Loading */
.swagger-ui .loading-container .loading::after {
    color: #EBBB40 /* --primary */;
}

/* Links */
.swagger-ui a {
    color: #EBBB40 /* --primary */;
}

/* Arrow/expand icons */
.swagger-ui .expand-operation svg,
.swagger-ui .opblock-tag svg {
    fill: #D6D3D1 /* --text */;
}

/* Dialog/modal (authorize) */
.swagger-ui .dialog-ux .modal-ux {
    background: #1C1A14 /* --card */;
    border: 1px solid #272318 /* --border-subtle */;
    border-radius: 8px /* --radius */;
}

.swagger-ui .dialog-ux .modal-ux-header h3 {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .dialog-ux .modal-ux-content p,
.swagger-ui .dialog-ux .modal-ux-content label,
.swagger-ui .dialog-ux .modal-ux-content h4 {
    color: #D6D3D1 /* --text */;
}

.swagger-ui .dialog-ux .backdrop-ux {
    background: rgba(0, 0, 0, 0.6);
}

/* Catch-all for any remaining dark-on-dark text */
.swagger-ui .opblock .opblock-summary,
.swagger-ui .opblock .tab-header .tab-item,
.swagger-ui label,
.swagger-ui .response-content-type.controls-accept-header select,
.swagger-ui .opblock-description-wrapper p,
.swagger-ui span,
.swagger-ui p {
    color: #D6D3D1 /* --text */;
}

/* Re-assert colored elements that the catch-all might override */
.swagger-ui .info .title {
    color: #FAE96F /* --primary-hi */;
}

.swagger-ui a {
    color: #EBBB40 /* --primary */;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
    color: #ffffff;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
    color: #141414 /* --bg */;
}

.swagger-ui .opblock.opblock-put .opblock-summary-method {
    color: #141414 /* --bg */;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-method {
    color: #ffffff;
}

.swagger-ui .opblock.opblock-patch .opblock-summary-method {
    color: #141414 /* --bg */;
}

.swagger-ui .opblock-tag small {
    color: rgba(214, 211, 209, 0.6) /* --text-secondary */;
}

.swagger-ui .btn.execute {
    color: #141414 /* --bg */;
}

.swagger-ui .btn.cancel {
    color: #cf6679 /* --error */;
}

.swagger-ui .btn.authorize {
    color: #EBBB40 /* --primary */;
}

.swagger-ui .try-out__btn {
    color: #EBBB40 /* --primary */;
}

.swagger-ui .parameter__name.required::after {
    color: #cf6679 /* --error */;
}

.swagger-ui .responses-table thead td {
    color: #D4A85C /* --text-th */;
}
