/* Public Document Viewer Page Stylesheet */
.public-doc-page-container {
    width: 100%;
    min-height: 100vh;
    color: var(--color-text, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 48px 20px;
    box-sizing: border-box;
    font-family: var(--font-family, inherit);
}

.public-doc-header {
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
}

.public-doc-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.public-doc-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.public-doc-title-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.public-doc-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-brand, #4e46e5);
}

.public-doc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.public-doc-viewer-wrapper {
    width: 100%;
    min-height: 700px;
    height: calc(100vh - 160px);
    max-height: 1000px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.public-doc-loading {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--color-text-muted);
    font-size: var(--fs-body, 14px);
    padding: 40px;
}

.public-doc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-soft, rgba(255, 255, 255, 0.1));
    border-top-color: var(--color-brand, #4e46e5);
    border-radius: 50%;
    animation: publicDocSpin 0.8s linear infinite;
}

@keyframes publicDocSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .public-doc-page-container {
        padding: 12px 6px 32px 6px;
        width: 100%;
        overflow-x: hidden;
    }

    .public-doc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 12px;
        width: 100%;
    }

    .public-doc-badge {
        font-size: 10px;
    }

    .public-doc-title {
        font-size: 16px;
        line-height: 1.35;
    }

    .public-doc-viewer-wrapper {
        height: auto;
        min-height: 480px;
        width: 100%;
        overflow-x: hidden;
    }
}
