/* Git Command Cheat Sheet — custom styles */

/* Search section */
.search-section {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.search-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

#searchInput {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 0.9375rem;
    box-sizing: border-box;
}

#searchInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* How-to */
.howto {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.howto h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.howto p {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Categories */
.categories {
    margin-bottom: 1.5rem;
}

.categories details {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.categories details summary {
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    background: #f9fafb;
    color: #111827;
    list-style: none;
    user-select: none;
}

.categories details summary::-webkit-details-marker {
    display: none;
}

.categories details[open] summary {
    border-bottom: 1px solid #e0e6ed;
}

/* Command list */
.command-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Command item */
.command-item {
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.command-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Command code */
.command-code {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #eff6ff;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.35rem;
    width: fit-content;
}

/* Command description */
.command-desc {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    margin: 0;
}

.command-desc code {
    background: #f3f4f6;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #1d4ed8;
}

/* FAQ */
.faq {
    margin-bottom: 1.5rem;
}

.faq h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.faq-item {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    padding: 0.85rem 1rem;
}

.faq-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.35rem;
}

.faq-item p {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    margin: 0;
}

.faq-item p code {
    background: #f3f4f6;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #1d4ed8;
}

/* Related */
.related {
    margin-bottom: 1.5rem;
}

.related h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-list li a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.related-list li a:hover {
    background: #dbeafe;
}

/* Dark mode */
html[data-theme="dark"] .search-section,
html[data-theme="dark"] .howto {
    background: #1f2937;
    border-color: #374151;
}

html[data-theme="dark"] .search-section h2,
html[data-theme="dark"] .howto h3 {
    color: #f9fafb;
}

html[data-theme="dark"] #searchInput {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .howto p {
    color: #d1d5db;
}

html[data-theme="dark"] .categories details {
    border-color: #374151;
}

html[data-theme="dark"] .categories details summary {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .command-item {
    background: #111827;
    border-color: #374151;
}

html[data-theme="dark"] .command-item:hover {
    background: #1e3a5f;
    border-color: #1d4ed8;
}

html[data-theme="dark"] .command-code {
    background: #1e3a5f;
    color: #93c5fd;
}

html[data-theme="dark"] .command-desc {
    color: #d1d5db;
}

html[data-theme="dark"] .command-desc code {
    background: #374151;
    color: #93c5fd;
}

html[data-theme="dark"] .faq h2,
html[data-theme="dark"] .related h3 {
    color: #f9fafb;
}

html[data-theme="dark"] .faq-item {
    border-color: #374151;
}

html[data-theme="dark"] .faq-item h4 {
    color: #f9fafb;
}

html[data-theme="dark"] .faq-item p {
    color: #d1d5db;
}

html[data-theme="dark"] .faq-item p code {
    background: #374151;
    color: #93c5fd;
}

html[data-theme="dark"] .related-list li a {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}
