/* Copy button and dropdown */
.siwe-copy-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    z-index: 100;
}

.siwe-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    height: 34px;
    box-sizing: border-box;
}

.siwe-copy-btn:hover {
    background: #f9fafb;
    color: #374151;
}

.siwe-copy-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 0 8px 8px 0;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    height: 34px;
    box-sizing: border-box;
}

.siwe-copy-toggle:hover {
    background: #f9fafb;
    color: #374151;
}

.siwe-copy-toggle-open svg {
    transform: rotate(180deg);
}

.siwe-copy-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    min-width: 280px;
    overflow: hidden;
    z-index: 200;
}

.siwe-copy-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
    cursor: pointer;
}

.siwe-copy-dropdown-item:hover {
    background: #f9fafb;
    text-decoration: none;
}

.siwe-copy-dropdown-item,
.siwe-copy-dropdown-item:hover,
.siwe-copy-dropdown-item:visited,
.siwe-copy-dropdown-item:active {
    text-decoration: none !important;
    color: inherit !important;
}

.siwe-copy-dropdown-title:hover {
    text-decoration: none;
}

.siwe-copy-dropdown-item + .siwe-copy-dropdown-item {
    border-top: 1px solid #f3f4f6;
}

.siwe-copy-dropdown-icon {
    flex-shrink: 0;
    color: #9ca3af;
    margin-top: 2px;
}

.siwe-copy-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.siwe-copy-dropdown-desc {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.3;
    margin-top: 2px;
}

.siwe-arrow {
    font-size: 12px;
    opacity: 0.7;
}

/* Dark theme overrides for copy button */
.coal .siwe-copy-btn,
.navy .siwe-copy-btn,
.ayu .siwe-copy-btn {
    background: #2d2d2d;
    border-color: #444;
    color: #999;
}

.coal .siwe-copy-btn:hover,
.navy .siwe-copy-btn:hover,
.ayu .siwe-copy-btn:hover {
    background: #383838;
    color: #ccc;
}

.coal .siwe-copy-toggle,
.navy .siwe-copy-toggle,
.ayu .siwe-copy-toggle {
    background: #2d2d2d;
    border-color: #444;
    color: #999;
}

.coal .siwe-copy-toggle:hover,
.navy .siwe-copy-toggle:hover,
.ayu .siwe-copy-toggle:hover {
    background: #383838;
    color: #ccc;
}

.coal .siwe-copy-dropdown,
.navy .siwe-copy-dropdown,
.ayu .siwe-copy-dropdown {
    background: #2d2d2d;
    border-color: #444;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.coal .siwe-copy-dropdown-item:hover,
.navy .siwe-copy-dropdown-item:hover,
.ayu .siwe-copy-dropdown-item:hover {
    background: #383838;
}

.coal .siwe-copy-dropdown-item + .siwe-copy-dropdown-item,
.navy .siwe-copy-dropdown-item + .siwe-copy-dropdown-item,
.ayu .siwe-copy-dropdown-item + .siwe-copy-dropdown-item {
    border-color: #444;
}

.coal .siwe-copy-dropdown-title,
.navy .siwe-copy-dropdown-title,
.ayu .siwe-copy-dropdown-title {
    color: #e5e7eb;
}

/* Info boxes (replaces GitBook {% hint style="info" %}) */
.siwe-info-box {
    background-color: #e8f4fd;
    border-left: 4px solid #4a9eda;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

.siwe-info-box p {
    margin: 0.4em 0;
}

.siwe-info-box p:first-child {
    margin-top: 0;
}

.siwe-info-box p:last-child {
    margin-bottom: 0;
}

/* Success boxes (replaces GitBook {% hint style="success" %}) */
.siwe-success-box {
    background-color: #e6f9e6;
    border-left: 4px solid #2ea043;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

.siwe-success-box p {
    margin: 0.4em 0;
}

.siwe-success-box p:first-child {
    margin-top: 0;
}

.siwe-success-box p:last-child {
    margin-bottom: 0;
}

/* Warning boxes (replaces GitBook {% hint style="warning" %}) */
.siwe-warning-box {
    background-color: #fff8e1;
    border-left: 4px solid #f5a623;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

.siwe-warning-box p {
    margin: 0.4em 0;
}

.siwe-warning-box p:first-child {
    margin-top: 0;
}

.siwe-warning-box p:last-child {
    margin-bottom: 0;
}

/* Repo cards (replaces GitBook {% embed url="..." %}) */
.siwe-repo-card {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    transition: border-color 0.2s;
}

.siwe-repo-card:hover {
    border-color: #4a9eda;
}

.siwe-repo-card a {
    text-decoration: none;
    color: inherit;
}

.siwe-repo-card small {
    color: #6a737d;
}

/* External sidebar links */
.siwe-external-links {
    padding: 10px 20px;
}

.siwe-external-links hr {
    border: none;
    border-top: 1px solid var(--sidebar-separator);
    margin: 10px 0;
}

.siwe-external-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.siwe-external-links li {
    padding: 4px 0;
}

.siwe-external-links a {
    color: var(--sidebar-fg);
    text-decoration: none;
    font-size: 0.9em;
}

.siwe-external-links a:hover {
    color: var(--sidebar-active);
}

.siwe-external-links a::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.6;
}

/* Sidebar logo */
.siwe-sidebar-logo {
    padding: 16px 20px 8px;
    text-align: center;
}

.siwe-sidebar-logo img {
    max-width: 180px;
    height: auto;
}

/* External sidebar links - reduce top spacing */
.siwe-external-links {
    margin-top: -10px;
}

/* Book title styling */
.menu-title {
    font-size: 1.2em !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

/* Content width */
:root {
    --content-max-width: 820px;
}
