/* Policy Page Styles
 * Matches the existing Billisa design system
 * Copyright © 2025 Isaiah Nyalali. All Rights Reserved.
 */

/* Policy Page Layout */
.policy-page {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
    background: #fafafa;
}

.policy-page .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Policy Title */
.policy-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0078d4;
}

/* Policy Meta */
.policy-updated {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Policy Content Container */
.policy-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 30px;
    line-height: 1.8;
}

/* Loading State */
.policy-loading {
    text-align: center;
    padding: 60px 40px;
}

.policy-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.policy-empty {
    text-align: center;
    padding: 60px 40px;
    color: #666;
}

.policy-empty i {
    font-size: 48px;
    color: #0078d4;
    opacity: 0.3;
    margin-bottom: 20px;
}

/* ===== CONTENT STYLES =====
 * These style the dynamically loaded HTML content
 * All styles are scoped to .policy-content to prevent conflicts
 */

/* Headings */
.policy-content h1,
.policy-content h2,
.policy-content h3,
.policy-content h4,
.policy-content h5,
.policy-content h6 {
    font-family: inherit;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.policy-content h1:first-child,
.policy-content h2:first-child,
.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content h1 {
    font-size: 1.75rem;
}

.policy-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.policy-content h3 {
    font-size: 1.25rem;
}

.policy-content h4 {
    font-size: 1.1rem;
}

.policy-content h5 {
    font-size: 1rem;
}

.policy-content h6 {
    font-size: 0.9rem;
    color: #666;
}

/* Paragraphs */
.policy-content p {
    margin: 0 0 1em;
    color: #333;
    font-size: 1rem;
}

/* Links */
.policy-content a {
    color: #0078d4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.policy-content a:hover {
    border-bottom-color: #0078d4;
}

/* Lists */
.policy-content ul,
.policy-content ol {
    margin: 0 0 1.5em;
    padding-left: 2em;
}

.policy-content li {
    margin-bottom: 0.5em;
    color: #333;
}

.policy-content ul li {
    list-style-type: disc;
}

.policy-content ol li {
    list-style-type: decimal;
}

.policy-content ul ul,
.policy-content ol ol,
.policy-content ul ol,
.policy-content ol ul {
    margin-top: 0.5em;
    margin-bottom: 0;
}

/* Bold, Italic, Underline */
.policy-content strong,
.policy-content b {
    font-weight: 600;
    color: #1a1a1a;
}

.policy-content em,
.policy-content i {
    font-style: italic;
}

.policy-content u {
    text-decoration: underline;
}

/* Superscript & Subscript */
.policy-content sup {
    vertical-align: super;
    font-size: 0.75em;
}

.policy-content sub {
    vertical-align: sub;
    font-size: 0.75em;
}

/* Tables */
.policy-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}

.policy-content th,
.policy-content td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.policy-content th {
    background: #f5f5f5;
    font-weight: 600;
    color: #1a1a1a;
}

.policy-content tr:nth-child(even) {
    background: #fafafa;
}

/* Blockquotes */
.policy-content blockquote {
    margin: 1.5em 0;
    padding: 15px 20px;
    border-left: 4px solid #0078d4;
    background: #f0f7ff;
    color: #333;
    font-style: italic;
}

.policy-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Horizontal Rules */
.policy-content hr {
    border: none;
    height: 1px;
    background: #e0e0e0;
    margin: 2em 0;
}

/* Code blocks */
.policy-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.policy-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.policy-content pre code {
    background: none;
    padding: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .policy-page {
        padding: 100px 0 40px;
    }

    .policy-title {
        font-size: 1.75rem;
    }

    .policy-content {
        padding: 25px 20px;
    }

    .policy-content h1 {
        font-size: 1.5rem;
    }

    .policy-content h2 {
        font-size: 1.3rem;
    }

    .policy-content h3 {
        font-size: 1.15rem;
    }

    .policy-content table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .policy-title {
        font-size: 1.5rem;
    }

    .policy-content {
        padding: 20px 15px;
    }
}