/* TKS.RU — сервис определения ТН ВЭД и проверки разрешительных документов */

.tnved-service {
    margin-bottom: 34px;
}

.tnved-service__header {
    margin-bottom: 18px;
}

.tnved-service__title {
    color: #004680;
    font-weight: 700;
}

.tnved-service__title-break {
    display: block;
}

.tnved-service__intro {
    font-size: 14px;
    line-height: 1.45;
    color: #222;
}

/* Основная панель */

.tnved-service__panel {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.tnved-service__panel-header {
    padding: 13px 15px;
    background: #ecf6ff;
    border-bottom: 1px solid #d9d9d9;
}

.tnved-service__panel-header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    color: #004680;
}

.tnved-service__panel-body {
    padding: 15px;
}

.tnved-service__instruction {
    margin: 0 0 15px;
}

/* Переключатель */

.tnved-service__switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 15px;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    overflow: hidden;
}

.tnved-service__mode {
    min-height: 48px;
    padding: 8px 10px;
    border: 0;
    border-right: 1px solid #c9c9c9;
    background: #f7f7f7;
    color: #222;
    font-size: 14px;
    cursor: pointer;
}

.tnved-service__mode:last-child {
    border-right: 0;
}

.tnved-service__mode:hover {
    color: #004680;
    background: #f0f6fb;
}

.tnved-service__mode.is-active {
    color: #004680;
    background: #e9f4fe;
    box-shadow: inset 0 -3px 0 #006bc5;
    font-weight: 700;
}

/* Подсказка */

.tnved-service__hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 17px;
    padding: 12px 13px;
    border: 1px solid #cfe2f5;
    border-radius: 4px;
    background: #f3f8fd;
    color: #214a70;
    line-height: 1.45;
}

.tnved-service__hint-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #006bc5;
    border-radius: 50%;
    color: #006bc5;
    font-size: 13px;
}

/* Поиск */

.tnved-service__form {
    align-items: flex-start;
    flex-wrap: wrap;
}

/* CAPTCHA */

.tnved-service__captcha {
    flex: 0 0 auto;
    width: auto;
    margin-top: 12px;
}

.tnved-service__captcha cap-widget {
    --cap-background: #fdfdfd;
    --cap-border-color: #dddddd;
    --cap-border-radius: 10px;
    --cap-widget-height: 34px;
    --cap-widget-width: 345px;
    --cap-widget-padding: 12px;
    --cap-gap: 12px;
    --cap-color: #222;
    --cap-checkbox-size: 25px;
}

.tnved-service__field {
    flex: 1 1 100%;
    min-width: 0;
}

.tnved-service__field .form-label {
    margin-bottom: 7px;
}

.tnved-service__field .page-search__input {
    width: 100%;
}

.tnved-service__field-help {
    margin-top: 5px;
    color: #777;
    font-size: 12px;
    line-height: 1.35;
}

.tnved-service__submit {
    min-height: 34px;
    max-height: 34px;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 11px;
    margin-bottom: 0;
}

/* Положение результата при автоматической прокрутке */

#tnved-service-result {
    scroll-margin-top: 320px;
}

/* Результат */

.tnved-service__result {
    margin-top: 20px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.tnved-service__result--error {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 14px 15px;
    border-color: #e4b8b8;
    background: #fff7f7;
}

.tnved-service__result--error h2 {
    margin: 0;
    color: #8b2020;
    font-size: 17px;
}

.tnved-service__result--error p {
    margin: 5px 0 0;
}

.tnved-service__result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #b02a2a;
    font-size: 22px;
}

.tnved-service__result-header {
    padding: 13px 15px;
    background: #ecf6ff;
    border-bottom: 1px solid #d9d9d9;
}

.tnved-service__result-caption {
    margin-bottom: 3px;
    color: #777;
    font-size: 12px;
}

.tnved-service__result-header h2 {
    margin: 0;
    color: #004680;
    font-size: 18px;
}

.tnved-service__result-header h2 span {
    white-space: nowrap;
}

.tnved-service__result-name {
    padding: 14px 15px;
    font-weight: 700;
    line-height: 1.45;
}

.tnved-service__certification {
    padding: 0 15px 15px;
}

.tnved-service__certification-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 0;
    border-top: 1px solid #e5e5e5;
}

.tnved-service__certification-title i {
    color: #006bc5;
    font-size: 18px;
}

.tnved-service__certification-title h3 {
    margin: 0;
    color: #004680;
    font-size: 16px;
}

.tnved-service__documents {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.tnved-service__document {
    padding: 11px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fafafa;
}

.tnved-service__document-top {
    display: flex;
    align-items: flex-start;
}

.tnved-service__document-top strong {
    color: #333;
}

/*
 * Коды ОКПД2 и ТН ВЭД.
 *
 * Здесь специально используется более специфичный селектор,
 * чем .tnved-service__document-top strong, чтобы цвет кода
 * не переопределялся общим стилем strong.
 */

.tnved-service__document-top .tnved-service__code {
    color: #006bc5;
    font-weight: 700;
}

.tnved-service__document-top .tnved-service__code:hover {
    color: #004680;
}

.tnved-service__document-top a.tnved-service__code {
    color: #006bc5;
    text-decoration: none;
}

.tnved-service__document-top a.tnved-service__code:hover {
    color: #004680;
    /*text-decoration: underline;*/
}

.tnved-service__document-meta {
    margin-top: 4px;
    color: #555;
    font-size: 13px;
}

.tnved-service__document-number {
    color: #555;
    font-size: 13px;
}

.tnved-service__document-details {
    margin-top: 8px;
}

.tnved-service__document-details summary {
    display: inline-block;
    color: #006bc5;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.tnved-service__document-details summary:hover {
    color: #004680;
}

.tnved-service__document-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
    color: #333;
    font-size: 13px;
    line-height: 1.45;
}

.tnved-service__empty {
    padding: 11px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fafafa;
    color: #666;
}

/* Как работает */

.tnved-service__how {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
}

.tnved-service__how-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
}

.tnved-service__how-title h2 {
    margin: 0;
    color: #004680;
    font-size: 18px;
}

.tnved-service__how-icon,
.tnved-service__what-icon,
.tnved-service__faq-icon,
.tnved-service__actual-icon
{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #006bc5;
    font-size: 18px;
}

.tnved-service__what-icon,
.tnved-service__actual-icon
{
    border: 1px solid #006bc5;
    border-radius: 50%;
}

.tnved-service__actual-icon {
    font-size: 15px;
}


.tnved-service__steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tnved-service__step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: center;
}

.tnved-service__step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2effc;
    color: #004680;
    font-weight: 700;
}

/* Предупреждение */

.tnved-service__warning {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 15px;
    border: 1px solid #f0d48a;
    border-radius: 4px;
    background: #fff9e9;
    margin-bottom: 20px;
}

.tnved-service__warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f2a900;
    color: #fff;
    font-size: 18px;
}

.tnved-service__warning strong {
    color: #333;
}

.tnved-service__warning p {
    margin: 5px 0 0;
}

/* Mobile */

@media (max-width: 974px) {
    .tnved-service__title {
        font-size: 22px;
    }

    .tnved-service__intro {
        font-size: 14px;
    }

    .tnved-service__switcher {
        grid-template-columns: 1fr;
    }

    .tnved-service__mode {
        border-right: 0;
        border-bottom: 1px solid #c9c9c9;
    }

    .tnved-service__mode:last-child {
        border-bottom: 0;
    }

    .tnved-service__form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .tnved-service__captcha {
        margin-top: 12px;
    }

    .tnved-service__submit {
        width: 100%;
        margin-top: 10px;
    }

    .tnved-service__document-top {
        display: block;
    }

    .tnved-service__document-top span {
        display: block;
        margin-top: 3px;
    }
}

/* Часто задаваемые вопросы */

.tnved-service__faq {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
}

.tnved-service__faq-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
}

.tnved-service__faq-title h2 {
    margin: 0;
    color: #004680;
    font-size: 18px;
}

.tnved-service__faq-icon {
    border: 1px solid #006bc5;
    border-radius: 50%;
}

.tnved-service__faq-list {
    margin: 0;
    padding: 0;
}

.tnved-service__faq-item {
    margin: 0 0 0 15px;
}

.tnved-service__faq-item:last-child {
    border-bottom: 0;
}

.tnved-service__faq-item summary {
    position: relative;
    display: block;
    padding: 14px 0 7px 20px;
    color: #006bc5;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.0;
    cursor: pointer;
    list-style: none;
}

.tnved-service__faq-item summary::-webkit-details-marker {
    display: none;
}

.tnved-service__faq-item summary::before {
    content: "\25B6";
    position: absolute;
    top: 17px;
    left: 4px;
    color: #006bc5;
    font-size: 10px;
    transition: transform 0.15s ease;
}

.tnved-service__faq-item[open] summary::before {
    transform: rotate(90deg);
}

.tnved-service__faq-answer {
    padding: 0 15px 14px 23px;
    color: #222;
    font-size: 14px;
    line-height: 1.45;
}

.tnved-service__faq-answer p {
    margin: 0;
}

@media (max-width: 974px) {
    .tnved-service__faq-title h2 {
        font-size: 20px;
    }

    .tnved-service__faq-item summary {
        padding-top: 13px;
        padding-bottom: 13px;
    }
}

/* AJAX-загрузчик результатов */
#tnved-service-result {
    position: relative;
}

#tnved-service-result.is-loading {
    min-height: 120px;
}

#tnved-service-result.is-loading
#tnved-service-result-content {
    opacity: 0.35;
    pointer-events: none;
}

.tnved-service__loader {
    position: fixed;
    z-index: 1000;

    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;

    box-sizing: border-box;

    padding: 12px 18px;

    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);

    color: #6b7280;

    transform: translate(-50%, -50%);

    pointer-events: none;
}

.tnved-service__loader.is-active {
    display: flex;
}

.tnved-service__loader-spinner {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    border: 3px solid #e5e7eb;
    border-top-color: currentColor;
    border-radius: 50%;

    animation: tnved-service-loader-spin 0.8s linear infinite;
}

@keyframes tnved-service-loader-spin {
    to {
        transform: rotate(360deg);
    }
}
