/* Legal Documents Page Styles - Cyberpunk Theme */
.legal-page {
    background: var(--cyber-bg, #14141e);
    color: var(--cyber-text, rgba(255, 255, 255, 0.95));
}

.legal-page .page_content_wrap {
    padding-bottom: 0 !important;
}

.legal-page .content {
    background: transparent;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.legal-page .post_content.entry-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.legal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    box-sizing: border-box;
}

/* Header */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.legal-title-icon {
    color: var(--cyber-accent, #aaff00);
    filter: drop-shadow(0 0 12px rgba(170, 255, 0, 0.5));
}

.legal-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Toggle Switch */
.legal-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.legal-toggle-wrapper {
    position: relative;
    display: inline-flex;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.legal-toggle-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    white-space: nowrap;
}

.legal-toggle-option svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.legal-toggle-option:hover {
    color: rgba(255, 255, 255, 0.9);
}

.legal-toggle-option.active {
    color: var(--cyber-accent, #aaff00);
    text-shadow: 0 0 8px rgba(170, 255, 0, 0.3);
}

.legal-toggle-option.active svg {
    color: var(--cyber-accent, #aaff00);
    filter: drop-shadow(0 0 8px rgba(170, 255, 0, 0.5));
}

.legal-toggle-count {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-left: 0.25rem;
}

.legal-toggle-slider {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    height: calc(100% - 1rem);
    background: rgba(170, 255, 0, 0.15);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(170, 255, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

/* Search Bar */
.legal-search-container {
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.legal-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.legal-search-icon {
    position: absolute;
    left: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 2;
}

.legal-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.legal-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.legal-search-input:focus {
    outline: none;
    border-color: rgba(170, 255, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(170, 255, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.legal-search-clear {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
}

.legal-search-clear:hover {
    color: var(--cyber-accent, #aaff00);
    background: rgba(170, 255, 0, 0.1);
}

/* Documents Grid */
.legal-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.legal-document-card {
    position: relative;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.legal-document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(170, 255, 0, 0.4) 50%,
            transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.legal-document-card:hover {
    transform: translateY(-4px);
    border-color: rgba(170, 255, 0, 0.3);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 
                0 0 20px rgba(170, 255, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.legal-document-card:hover::before {
    opacity: 1;
}

.legal-document-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2rem;
    position: relative;
}

.legal-document-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.legal-document-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.2);
    border-radius: 12px;
    color: var(--cyber-accent, #aaff00);
    transition: all 0.3s ease;
}

.legal-document-card:hover .legal-document-card-icon {
    background: rgba(170, 255, 0, 0.2);
    border-color: rgba(170, 255, 0, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(170, 255, 0, 0.3);
}

.legal-document-card-icon svg {
    width: 24px;
    height: 24px;
}

.legal-document-card-badge {
    padding: 0.375rem 0.75rem;
    background: rgba(170, 255, 0, 0.15);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyber-accent, #aaff00);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-document-card-content {
    margin-bottom: 1.5rem;
}

.legal-document-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.legal-document-card:hover .legal-document-card-title {
    color: var(--cyber-accent, #aaff00);
    text-shadow: 0 0 8px rgba(170, 255, 0, 0.3);
}

.legal-document-card-summary {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.legal-document-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.legal-document-card-date,
.legal-document-card-updated {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-document-card-date svg,
.legal-document-card-updated svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.legal-document-card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.2);
    border-radius: 50%;
    color: var(--cyber-accent, #aaff00);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.legal-document-card:hover .legal-document-card-arrow {
    opacity: 1;
    transform: translateX(0);
    background: rgba(170, 255, 0, 0.2);
    border-color: rgba(170, 255, 0, 0.4);
    box-shadow: 0 0 12px rgba(170, 255, 0, 0.3);
}

/* Empty State */
.legal-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.legal-empty-icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 auto 1.5rem;
}

.legal-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.75rem 0;
}

.legal-empty-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Legal Document Show Page */
.legal-show-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    box-sizing: border-box;
}

.legal-show-back {
    margin-bottom: 2rem;
}

.legal-show-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.legal-show-back-link:hover {
    color: var(--cyber-accent, #aaff00);
}

.legal-show-back-link svg {
    width: 20px;
    height: 20px;
}

.legal-show-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-show-header-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.2);
    border-radius: 12px;
    color: var(--cyber-accent, #aaff00);
    flex-shrink: 0;
}

.legal-show-header-icon svg {
    width: 32px;
    height: 32px;
}

.legal-show-header-content {
    flex: 1;
}

.legal-show-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.legal-show-badge span:first-child {
    padding: 0.375rem 0.75rem;
    background: rgba(170, 255, 0, 0.15);
    border: 1px solid rgba(170, 255, 0, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyber-accent, #aaff00);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-show-version {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.legal-show-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.legal-show-summary {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.legal-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.legal-show-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-show-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.legal-show-content {
    margin-bottom: 4rem;
}

.legal-show-markdown {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.legal-show-markdown h1,
.legal-show-markdown h2,
.legal-show-markdown h3,
.legal-show-markdown h4,
.legal-show-markdown h5,
.legal-show-markdown h6 {
    color: #ffffff;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.legal-show-markdown h1 {
    font-size: 2rem;
    border-bottom: 2px solid rgba(170, 255, 0, 0.3);
    padding-bottom: 0.5rem;
}

.legal-show-markdown h2 {
    font-size: 1.75rem;
    color: var(--cyber-accent, #aaff00);
}

.legal-show-markdown h3 {
    font-size: 1.5rem;
}

.legal-show-markdown p {
    margin-bottom: 1.5rem;
}

.legal-show-markdown ul,
.legal-show-markdown ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.legal-show-markdown li {
    margin-bottom: 0.5rem;
}

.legal-show-markdown code {
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.9em;
    color: var(--cyber-accent, #aaff00);
}

.legal-show-markdown pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.legal-show-markdown pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

.legal-show-markdown blockquote {
    border-left: 4px solid rgba(170, 255, 0, 0.3);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.legal-show-markdown a {
    color: var(--cyber-accent, #aaff00);
    text-decoration: none;
    border-bottom: 1px solid rgba(170, 255, 0, 0.3);
    transition: all 0.3s ease;
}

.legal-show-markdown a:hover {
    color: #ffffff;
    border-bottom-color: var(--cyber-accent, #aaff00);
}

.legal-show-markdown hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* Related Documents */
.legal-show-related {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-show-related-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 2rem 0;
}

.legal-show-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.legal-show-related-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.legal-show-related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(170, 255, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.legal-show-related-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(170, 255, 0, 0.1);
    border: 1px solid rgba(170, 255, 0, 0.2);
    border-radius: 8px;
    color: var(--cyber-accent, #aaff00);
    flex-shrink: 0;
}

.legal-show-related-card-icon svg {
    width: 20px;
    height: 20px;
}

.legal-show-related-card-content {
    flex: 1;
}

.legal-show-related-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    transition: color 0.3s ease;
}

.legal-show-related-card:hover .legal-show-related-card-title {
    color: var(--cyber-accent, #aaff00);
}

.legal-show-related-card-summary {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-container,
    .legal-show-container {
        padding: 2rem 1rem;
    }

    .legal-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .legal-toggle-option {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .legal-toggle-option span:not(.legal-toggle-count) {
        display: none;
    }

    .legal-documents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .legal-document-card-link {
        padding: 1.5rem;
    }

    .legal-show-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .legal-show-title {
        font-size: 1.75rem;
    }

    .legal-show-markdown {
        padding: 2rem 1.5rem;
    }

    .legal-show-related-grid {
        grid-template-columns: 1fr;
    }
}
