/* Lovdatabase Styling - matches premium design */

.law-viewer-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space, 20px);
    height: calc(100vh - 300px);
    min-height: 600px;
}

/* Sidebar */
.law-sidebar {
    background: var(--card, rgba(15, 23, 42, 0.93));
    border-radius: var(--radius, 18px);
    padding: 24px;
    overflow-y: auto;
    box-shadow: var(--shadow, 0 20px 40px rgba(0,0,0,.35));
    border: 1px solid var(--border, #1f2a44);
}

.law-selector {
    margin-bottom: 24px;
}

.law-selector label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #9aa6bf);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.law-dropdown {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-2, #0f1b31);
    border: 1px solid var(--border, #1f2a44);
    border-radius: 12px;
    color: var(--text, #e6eaf3);
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.law-dropdown:hover {
    border-color: var(--accent, #10b981);
    box-shadow: var(--glow, 0 0 0 1px rgba(16,185,129,.15));
}

.law-dropdown:focus {
    outline: none;
    border-color: var(--accent, #10b981);
    box-shadow: var(--glow, 0 0 0 1px rgba(16,185,129,.15));
}

/* Search */
.law-search {
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-2, #0f1b31);
    border: 1px solid var(--border, #1f2a44);
    border-radius: 12px;
    color: var(--text, #e6eaf3);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.search-input::placeholder {
    color: var(--muted, #9aa6bf);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent, #10b981);
    box-shadow: var(--glow, 0 0 0 1px rgba(16,185,129,.15));
}

/* TOC */
.law-toc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-item {
    padding: 12px 16px;
    border: none;
    background: var(--bg-2, #0f1b31);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text, #e6eaf3);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.toc-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent, #10b981);
    color: var(--accent, #10b981);
    transform: translateX(4px);
}

.toc-item.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent, #10b981);
    color: var(--accent, #10b981);
}

/* Content Area */
.law-content {
    background: var(--card, rgba(15, 23, 42, 0.93));
    border-radius: var(--radius, 18px);
    padding: 32px;
    overflow-y: auto;
    box-shadow: var(--shadow, 0 20px 40px rgba(0,0,0,.35));
    border: 1px solid var(--border, #1f2a44);
}

.law-welcome {
    text-align: center;
    padding: 80px 40px;
}

.law-welcome h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text, #e6eaf3);
    margin: 0 0 16px 0;
}

.law-welcome p {
    font-size: 16px;
    color: var(--muted, #9aa6bf);
    line-height: 1.6;
    max-width: 500px;
    margin: 8px auto;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent, #10b981);
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent, #10b981);
    margin: 0;
}

.copy-to-chat {
    padding: 6px 12px; /* ca. halv størrelse */
    background: var(--accent, #10b981);
    color: var(--bg, #0b1220);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px; /* mindre tekst */
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}

.copy-to-chat:hover {
    background: var(--accent-2, #34d399);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.copy-to-chat:active {
    transform: translateY(0);
}

/* Stk blocks */
.stk-block {
    margin-bottom: 32px;
}

.stk-block h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text, #e6eaf3);
    margin: 0 0 12px 0;
}

.stk-block h3 span {
    color: var(--accent, #10b981);
}

.copy-stk-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-2, #0f1b31);
    border: 1px solid var(--border, #1f2a44);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-stk-btn:hover {
    background: var(--accent, #10b981);
    border-color: var(--accent, #10b981);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.copy-stk-btn:active {
    transform: scale(0.95);
}

.stk-content {
    padding: 20px;
    background: var(--bg-2, #0f1b31);
    border-left: 3px solid var(--accent, #10b981);
    border-radius: 10px;
    line-height: 1.7;
    color: var(--text, #e6eaf3);
    font-size: 15px;
}

.stk-content p {
    margin: 12px 0;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--accent, #10b981);
    color: var(--bg, #0b1220);
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Loading State */
.law-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted, #9aa6bf);
}

.law-loading::before {
    content: "⏳";
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 900px) {
    .law-viewer-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .law-sidebar {
        max-height: 400px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .copy-to-chat {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar Styling */
.law-sidebar::-webkit-scrollbar,
.law-content::-webkit-scrollbar {
    width: 8px;
}

.law-sidebar::-webkit-scrollbar-track,
.law-content::-webkit-scrollbar-track {
    background: var(--bg-2, #0f1b31);
    border-radius: 10px;
}

.law-sidebar::-webkit-scrollbar-thumb,
.law-content::-webkit-scrollbar-thumb {
    background: var(--border, #1f2a44);
    border-radius: 10px;
}

.law-sidebar::-webkit-scrollbar-thumb:hover,
.law-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent, #10b981);
}

