/* Page styles: 1creg.php - uses tokens from theme.css */
.onecreg-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid rgba(var(--color-accent-rgb), 0.4);
        color: var(--color-accent-hover);
        font-weight: 600;
        font-size: 13px;
        margin-left: 8px;
        vertical-align: middle;
    }

    .onecreg-step {
        display: flex;
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .onecreg-step-number {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--color-accent-hover);
        color: #fff;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
        flex: 0 0 auto;
    }

    .download-highlight {
        box-shadow: 0 0 0 3px rgba(var(--color-accent-hover-rgb), 0.3);
        transform: scale(1.02);
    }

    /* Отображение версии с перебором цифр. */
    #app-version {
        display: inline-block;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0.6px;
        min-width: 90px;
    }

    /* История изменений и ссылки на версии. */
    .version-history {
        margin-top: 16px;
        color: var(--color-text-muted);
        font-size: 14px;
    }

    .version-history-title {
        font-weight: 600;
        margin-bottom: 10px;
    }

    .version-history-item {
        padding: 12px 14px;
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
        background: var(--color-surface);
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    .version-history-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
    }

    .version-history-version {
        font-weight: 700;
        color: #444;
    }

    .version-history-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .version-history-downloads {
        font-size: 13px;
        color: #777;
        font-variant-numeric: tabular-nums;
    }

    .version-history-downloads-value {
        display: inline-block;
        min-width: 16px;
        letter-spacing: 0.6px;
        font-variant-numeric: tabular-nums;
    }

    .version-history-links {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .version-history-links button {
        background: transparent;
        border: none;
        padding: 0;
        color: var(--color-accent-hover);
        text-decoration: none;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
    }

    .version-history-links button:hover {
        text-decoration: underline;
    }

    .version-history-list {
        margin: 8px 0 0 18px;
        padding: 0;
        color: #555;
        font-size: 14px;
    }

    .version-history-empty {
        margin-top: 8px;
        font-size: 13px;
        color: #777;
    }

    /* Модальное окно скачивания. */
    .download-modal {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }

    .download-modal-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
    }

    .download-modal-dialog {
        position: relative;
        z-index: 1;
        background: #fff;
        border-radius: 12px;
        padding: 20px 22px;
        width: min(520px, 92vw);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }

    .download-modal-title {
        font-weight: 700;
        font-size: 18px;
        color: #333;
        margin-bottom: 6px;
    }

    .download-modal-version {
        font-size: 14px;
        color: #777;
        margin-bottom: 12px;
    }

    .download-modal-actions {
        display: grid;
        gap: 10px;
    }

    .download-modal-actions .btn {
        padding: 14px;
        border: none;
    }

    #download-modal-normal {
        background-color: var(--color-accent-hover);
        color: #fff;
    }

    #download-modal-portable {
        background-color: var(--color-brand);
        color: #fff;
    }

    .download-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        border: none;
        background: transparent;
        font-size: 22px;
        line-height: 1;
        color: #777;
        cursor: pointer;
    }

    .download-modal-close:hover {
        color: #333;
    }

    body.download-modal-open {
        overflow: hidden;
    }

    /* Анимации для уведомления о копировании якоря. */
    @keyframes slideInRight {
        0% {
            transform: translateX(400px);
            opacity: 0;
        }

        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideOutRight {
        0% {
            transform: translateX(0);
            opacity: 1;
        }

        100% {
            transform: translateX(400px);
            opacity: 0;
        }
    }

    /* Стили для якорных ссылок, как в маркетплейсах. */
    .section-anchor {
        position: relative;
    }

    .section-anchor .anchor-link {
        position: absolute;
        left: -30px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0;
        transition: opacity 0.3s ease;
        color: var(--color-accent);
        font-size: 18px;
        text-decoration: none;
        cursor: pointer;
    }

    .section-anchor:hover .anchor-link {
        opacity: 1;
    }

    .section-anchor .anchor-link:hover {
        color: var(--color-accent-hover);
    }

    .anchor-copied {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
        color: white;
        padding: 12px 20px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.4);
        z-index: 10000;
        animation: slideInRight 0.3s ease-out;
        font-size: 14px;
        font-weight: bold;
    }

    /* Якорная навигация по разделам. */
    .onecreg-section-nav-wrapper {
        margin-top: 25px;
        margin-bottom: 30px;
        background: var(--color-surface);
        border-left: 5px solid rgba(var(--color-accent-rgb), 0.6);
        border: 1px solid var(--color-border);
        border-left-width: 5px;
        border-left-color: var(--color-accent);
        border-radius: var(--radius-md);
        padding: 16px;
        box-shadow: var(--shadow-sm);
    }

    .onecreg-section-nav-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 12px;
        color: var(--color-text);
    }

    .onecreg-section-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .onecreg-section-nav a {
        display: inline-flex;
        align-items: center;
        padding: 7px 12px;
        border-radius: 999px;
        border: 1px solid rgba(var(--color-accent-rgb), 0.4);
        background: #fff;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
    }

    .onecreg-section-nav a:hover,
    .onecreg-section-nav a:focus {
        background: rgba(var(--color-accent-rgb), 0.12);
        box-shadow: 0 0 0 3px rgba(var(--color-accent-hover-rgb), 0.2);
        outline: none;
    }

    /* Карусель скриншотов интерфейса. */
    .onecreg-carousel {
        position: relative;
        border-radius: var(--radius-md);
        overflow: visible;
        padding: 0;
        max-width: 1080px;
        margin: 0 auto;
    }

    .onecreg-carousel-viewport {
        position: relative;
        overflow: hidden;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        min-height: 200px;
    }

    .onecreg-carousel-slide {
        display: none;
        margin: 0;
        padding: 12px;
        animation: onecregFadeIn 0.35s ease;
    }

    .onecreg-carousel-slide.is-active {
        display: block;
    }

    .onecreg-carousel-slide img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: min(560px, 70vh);
        margin: 0 auto;
        object-fit: contain;
        object-position: center;
        background: var(--color-surface);
        border-radius: var(--radius-sm);
    }

    .onecreg-carousel-caption {
        margin: 8px 0 0;
        text-align: center;
        font-size: 13px;
        line-height: 1.6;
        color: var(--color-text-muted);
    }

    .onecreg-carousel-zoomable {
        cursor: zoom-in;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .onecreg-carousel-zoomable:hover {
        transform: scale(1.01);
        /*box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);*/
    }

    .onecreg-carousel-zoomable:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.45);
    }

    .onecreg-carousel-hint {
        margin: 10px 0 0;
        text-align: center;
        color: #777;
        font-size: 12px;
        line-height: 1.5;
    }

    .onecreg-carousel-control {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 38px;
        height: 38px;
        border: none;
        border-radius: 999px;
        background: rgba(45, 55, 72, 0.55);
        color: #fff;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        z-index: 3;
    }

    .onecreg-carousel-control.prev {
        left: 8px;
    }

    .onecreg-carousel-control.next {
        right: 8px;
    }

    .onecreg-carousel-control:hover,
    .onecreg-carousel-control:focus {
        background: rgba(0, 0, 0, 0.65);
        outline: none;
        box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.35);
    }

    .onecreg-carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 12px;
    }

    .onecreg-carousel-dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        border: 1px solid rgba(var(--color-accent-rgb), 0.7);
        background: #fff;
        padding: 0;
        cursor: pointer;
    }

    .onecreg-carousel-dot.is-active {
        background: var(--color-accent);
        border-color: var(--color-accent);
    }

    .onecreg-carousel-dot:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.35);
    }

    /* Модальное окно увеличенного просмотра скриншотов. */
    .onecreg-screenshot-modal {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10020;
    }

    .onecreg-screenshot-modal-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.78);
    }

    .onecreg-screenshot-modal-dialog {
        position: relative;
        z-index: 1;
        width: min(1320px, 96vw);
        max-height: 94vh;
        background: #111;
        border-radius: 12px;
        padding: 10px 10px 12px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .onecreg-screenshot-modal-image {
        display: block;
        width: 100%;
        max-height: calc(94vh - 66px);
        object-fit: contain;
        object-position: center;
        border-radius: 8px;
        background: #000;
    }

    .onecreg-screenshot-modal-caption {
        margin-top: 8px;
        text-align: center;
        color: #ddd;
        font-size: 13px;
        line-height: 1.5;
    }

    .onecreg-screenshot-modal-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .onecreg-screenshot-modal-close:hover,
    .onecreg-screenshot-modal-close:focus {
        background: rgba(0, 0, 0, 0.75);
        outline: none;
        box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.45);
    }

    body.onecreg-screenshot-modal-open {
        overflow: hidden;
    }

    @keyframes onecregFadeIn {
        from {
            opacity: 0.35;
        }

        to {
            opacity: 1;
        }
    }

    @media (max-width: 767px) {
        .onecreg-carousel {
            max-width: 100%;
            padding: 8px;
        }

        .onecreg-carousel-slide img {
            height: min(420px, 72vw);
            max-height: min(420px, 72vw);
        }

        .onecreg-carousel-control {
            width: 34px;
            height: 34px;
        }

        .onecreg-carousel-control.prev {
            left: 10px;
        }

        .onecreg-carousel-control.next {
            right: 10px;
        }

        .onecreg-screenshot-modal-dialog {
            width: 97vw;
            padding: 8px 8px 10px;
        }

        .onecreg-screenshot-modal-image {
            max-height: calc(92vh - 62px);
        }

        .onecreg-screenshot-modal-close {
            width: 32px;
            height: 32px;
            font-size: 20px;
        }
    }