/* Legal Pages Styles (Terms & Conditions, Privacy Policy) */

.legal-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem;
}

.legal-content {
    width: 100%;
    max-width: 900px;
    padding: 2rem;

    background-image: var(--gradient-light);
    border: 0.125rem solid var(--highlight-colour);
    border-radius: var(--radius1);
}

/* Main Title */
.legal-content h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Last Updated Text */
.legal-updated {
    text-align: center;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--highlight-colour);
}

/* Section Headers */
.legal-content h2 {
    font-size: 1.5rem;
    font-family: 'Obsidian', Arial, sans-serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--highlight-colour);
    color: var(--highlight-colour);
}

.legal-content h3 {
    font-size: 1.2rem;
    font-family: 'Obsidian', Arial, sans-serif;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Paragraphs */
.legal-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: white;
}

/* Lists */
.legal-content ul,
.legal-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Nested lists */
.legal-content ul ul,
.legal-content ol ul,
.legal-content ul ol,
.legal-content ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Strong text */
.legal-content strong {
    color: var(--highlight-colour);
}

/* Links */
.legal-content a {
    color: var(--highlight-colour);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.legal-content a:hover {
    opacity: 0.8;
}

/* Code elements */
.legal-content code {
    background: var(--background-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    background: var(--background-mid);
    border-radius: var(--radius1);
    overflow: hidden;
}

.legal-table th,
.legal-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-table th {
    background: var(--background-dark);
    color: white;
    font-family: 'Obsidian', Arial, sans-serif;
    font-weight: normal;
}

.legal-table td {
    color: white;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Back link */
.legal-back-link {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--highlight-colour);
    text-align: center;
}

.legal-back-link a {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius1);
    border: 0.125rem solid var(--highlight-colour);
    background: var(--gradient-main);
    color: white;
    text-decoration: none;
    font-family: 'Obsidian', Arial, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legal-back-link a:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--glow-colour);
    opacity: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .legal-content {
        padding: 1.5rem;
    }

    .legal-content h2 {
        font-size: 1.3rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Stack table on small screens */
    .legal-table thead {
        display: none;
    }

    .legal-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius1);
    }

    .legal-table td {
        display: block;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .legal-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--highlight-colour);
        display: block;
        margin-bottom: 0.25rem;
    }
}
