/**
 * Legal Pages Styling
 *
 * Styles for Privacy Policy and Terms of Service pages.
 * Wide layout (800px) for better readability of long documents.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background: linear-gradient(to bottom, white 0%, white 40%, black 100%);
    min-height: 100vh;
}

/* Header Section */
.legal-header {
    background: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.legal-header .logo {
    max-width: 80px;
    width: 100%;
    height: auto;
    margin-bottom: 0.75rem;
}

.legal-header .company-name {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #000;
    font-family: "Poller One", serif;
    margin-bottom: 0.5rem;
}

.legal-header .back-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.legal-header .back-link:hover {
    color: #000;
}

/* Main Legal Container - Wide Layout */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.legal-card {
    background: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Markdown Content Styling */
.legal-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #000;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: #333;
}

.legal-content strong {
    font-weight: 600;
    color: #000;
}

/* Lists */
.legal-content ul,
.legal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: #333;
}

.legal-content ul ul,
.legal-content ol ol,
.legal-content ul ol,
.legal-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Links */
.legal-content a {
    color: #000;
    text-decoration: underline;
    transition: color 0.3s;
}

.legal-content a:hover {
    color: #666;
}

/* Tables */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.legal-content th,
.legal-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.legal-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #000;
}

.legal-content tr:nth-child(even) {
    background: #fafafa;
}

/* Horizontal Rules */
.legal-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0;
}

/* Blockquotes */
.legal-content blockquote {
    border-left: 4px solid #000;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #555;
    font-style: italic;
}

/* Code */
.legal-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

.legal-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.legal-content pre code {
    padding: 0;
    background: none;
}

/* Footer */
.legal-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #999;
    font-size: 0.85rem;
}

.legal-footer a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.legal-footer a:hover {
    color: #ccc;
}

.legal-footer .footer-links {
    margin-top: 0.5rem;
}

.legal-footer .footer-links a {
    margin: 0 0.5rem;
}

/* Loading State */
.legal-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-card {
        padding: 2rem 1.5rem;
    }

    .legal-header .logo {
        max-width: 60px;
    }

    .legal-content h1 {
        font-size: 1.5rem;
    }

    .legal-content h2 {
        font-size: 1.25rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
    }

    .legal-content table {
        font-size: 0.85rem;
    }

    .legal-content th,
    .legal-content td {
        padding: 0.5rem;
    }
}
