/* Top bar styles */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--color-dark);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar a {
    font-family: 'Analecta', serif;
    color: var(--color-background);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.top-bar a:hover {
    color: var(--color-accent);
}

/* Adjust layout to account for fixed top bar */
.layout {
    margin-top: 40px;
}

/* Pattern example styles */
.pattern-example {
    margin: 2em 0;
    padding: 1em;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fafafa;
}

.pattern-code {
    margin: 1em 0;
    background: #2d3748;
    border-radius: 4px;
    overflow: hidden;
}

.pattern-code pre {
    margin: 0;
    padding: 1em;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    line-height: 1.4;
    overflow-x: auto;
}

.pattern-preview {
    margin: 1em 0;
    text-align: center;
    background: white;
    border-radius: 4px;
    padding: 1em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pattern-preview img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* Inline thumbnail styles */
.pattern-thumbnail {
    display: inline-block;
    width: 200px;
    height: 200px;
    margin: 0.25em;
    vertical-align: middle;
}

.pattern-thumbnail img {
    width: 100%;
    height: 100%;
}

/* Small pattern styles */
.pattern-small {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    margin: 1.5em 0;
    padding: 1em;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
}

.pattern-small-code {
    flex: 1 1 auto;
    max-width: 60%;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.pattern-small-code pre {
    margin: 0;
    padding: 1em;
    color: #1a202c;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    height: 200px;
    overflow: auto;
    box-sizing: border-box;
}

.pattern-small-preview {
    width: 200px;
    height: 200px;
    flex: 0 0 auto;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pattern-small-preview img {
    width: 100%;
    height: 100%;
}

/* Pattern action buttons */
.pattern-actions {
    display: flex;
    gap: 0.5em;
    padding: 0.5em;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    align-items: center;
    justify-content: center;
}

.pattern-actions button {
    padding: 0.5em 1em;
    font-size: 0.9em;
    font-family: 'JetBrains Mono', monospace;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
    height: 36px;
    line-height: 1;
}

.pattern-actions button.copy {
    background: #2c5282;
    color: white;
}

.pattern-actions button.copy:hover {
    background: #2b6cb0;
}

.pattern-actions button.workbench {
    background: #805ad5;
    color: white;
}

.pattern-actions button.workbench:hover {
    background: #9f7aea;
}
