/* ============================================
   LinkByCar ReDoc Theme — CSS overrides
   Only styles NOT covered by the Redoc.init() theme object.
   ============================================ */

/* Import lbc-theme.css for shared semantic tokens */
@import url("lbc-theme.css");

/* --- Logo before API title --- */
#brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 0;
}

#brands a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 56px;
    padding: 6px;
    border: 1px solid var(--lbc-border);
    border-radius: 0.5rem;
    background: var(--lbc-card-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

#brands a::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--lbc-daintree);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.1s;
    z-index: 100;
}

#brands a:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

#brands a:hover {
    border-color: var(--lbc-casal);
    box-shadow: 0 2px 8px rgba(0, 101, 117, 0.12);
}

#brands a img {
    max-height: 36px;
    max-width: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.api-info > h1:first-of-type {
    position: relative;
    padding-left: 9.2em;
    margin-bottom: 2em;
}

.api-info > h1:first-of-type::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 9em;
    height: 3em;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    background-image: url("../images/logo_linkbycar.png");
}

/* --- Page background --- */
body {
    background: var(--lbc-card-bg) !important;
}

/* --- Sidebar border --- */
.redoc-wrap > div:first-child {
    border-right: 1px solid var(--lbc-border);
    border-bottom: none;
}

/* --- Sidebar search input (light theme) --- */
.menu-content [role="search"] input {
    background-color: var(--lbc-bg) !important;
    border: 1px solid var(--lbc-border) !important;
    color: var(--lbc-text) !important;
    border-radius: 6px;
}

.menu-content [role="search"] input::placeholder {
    color: var(--lbc-text-muted) !important;
}

.menu-content [role="search"] input:focus {
    border-color: var(--lbc-casal) !important;
    box-shadow: 0 0 0 2px rgba(0, 101, 117, 0.15);
}

/* --- Sidebar search icon spacing --- */
div[role="search"] {
    position: relative;
}

svg.search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

input.search-input {
    padding-left: 30px !important;
}

/* --- HTTP method badges (colors from lbc-theme.css) --- */
.http-verb.get {
    background-color: var(--lbc-http-get) !important;
    color: var(--lbc-card-bg) !important;
}

.http-verb.post {
    background-color: var(--lbc-http-post) !important;
}

.http-verb.put {
    background-color: var(--lbc-http-put) !important;
}

.http-verb.delete {
    background-color: var(--lbc-http-delete) !important;
}

.http-verb.patch {
    background-color: var(--lbc-http-patch) !important;
}


/* --- Response tabs (right panel) --- */
.react-tabs__tab {
    color: rgba(255, 255, 255, 0.5) !important;
    border-color: transparent !important;
    border-radius: 6px 6px 0 0 !important;
    transition: color 0.15s, background-color 0.15s;
}

.react-tabs__tab:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.react-tabs__tab--selected {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    border-bottom-color: transparent !important;
    color: #fff !important;
}

/* --- Right panel code blocks — rounded, subtle card style --- */
.redoc-wrap > div:nth-child(3) pre,
[data-section-id] pre {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 8px 0 !important;
}

/* Right panel code text — softer */
.redoc-wrap > div:nth-child(3) pre code,
[data-section-id] pre code {
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

/* Right panel headings — softer white */
.redoc-wrap > div:nth-child(3) h3,
.redoc-wrap > div:nth-child(3) h5 {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.05em !important;
}

/* Right panel — subtle dividers between sections */
.redoc-wrap > div:nth-child(3) > div {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* --- Continuous right-panel background ---
   Sidebar = 260px. rightPanel = 40% of content area.
   Gradient fills right 40% to avoid white gaps between sections.
   Neutral dark slate (#1e293b) instead of brand-colored teal for a cleaner look. */
.redoc-wrap {
    background: linear-gradient(
        to right,
        transparent calc(260px + (100% - 260px) * 0.6),
        #1e293b calc(260px + (100% - 260px) * 0.6)
    ) !important;
}

/* --- Schema/model table rows --- */
table th {
    color: var(--lbc-daintree) !important;
}

/* --- Scrollbars (Webkit) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--lbc-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--lbc-casal);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lbc-cyprus);
}

/* --- Responsive: hide right panel (code samples) on small screens --- */
@media (max-width: 75rem) {
    /* Hide the dark right-panel column (code samples / response examples) */
    .redoc-wrap > div:last-child {
        display: none !important;
    }

    /* Remove the background gradient that fills the right side */
    .redoc-wrap {
        background: var(--lbc-card-bg) !important;
    }

    /* Logo: shrink and center above title */
    .api-info > h1:first-of-type {
        padding-left: 0;
        padding-top: 3.5em;
    }

    .api-info > h1:first-of-type::before {
        left: 50%;
        transform: translateX(-50%);
        width: 7em;
    }
}

/* END LinkByCar ReDoc CSS overrides */
