/* static/css/pages/mcc.css */
/* Раздел MCC: список кодов и карточка кода. */

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #EEF5FB;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.mcc-section {
    flex: 1;
    margin-bottom: 40px;
}

.mcc-page-title {
    font-size: 32px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.mcc-search {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    margin-bottom: 28px;
}

.mcc-search-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: #ffffff;
    min-width: 0;
}

.mcc-search-input:focus {
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.1);
}

.mcc-search-submit {
    flex-shrink: 0;
    padding: 0 22px;
    border: 2px solid #5B9BD5;
    border-radius: 12px;
    background: #5B9BD5;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.mcc-search-submit:hover,
.mcc-search-submit:focus-visible {
    background: #ffffff;
    color: #5B9BD5;
    outline: none;
}

.mcc-table {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.mcc-table-head,
.mcc-table-row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 14px 20px;
}

.mcc-table-head {
    background: #f5f8fb;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mcc-table-row {
    border-top: 1px solid #eef2f6;
}

.mcc-table-row:first-of-type {
    border-top: none;
}

.mcc-col-code {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.mcc-code-link {
    color: #5B9BD5;
    text-decoration: none;
    width: fit-content;
    transition: color 0.3s ease;
}

.mcc-code-link:hover {
    text-decoration: underline;
    color: #4A8BC8;
}

.mcc-col-name {
    color: #333;
    font-size: 15px;
    line-height: 1.45;
    word-break: break-word;
}

.mcc-empty {
    font-size: 16px;
    color: #666;
}

.mcc-detail {
    max-width: 720px;
}

.mcc-code-title {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 12px;
}

.mcc-code-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #555;
    line-height: 1.4;
    margin-bottom: 24px;
}

.mcc-description {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 8px;
}

.mcc-description p {
    margin: 0 0 12px;
}

.mcc-description p:last-child {
    margin-bottom: 0;
}

.mcc-note {
    margin-top: 20px;
    padding: 16px 20px;
    background: #eef4fb;
    border: 2px solid #5B9BD5;
    border-radius: 12px;
}

.mcc-note-title {
    font-size: 12px;
    font-weight: 600;
    color: #5B9BD5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.mcc-note-text {
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
}

.mcc-note-text p {
    margin: 0 0 10px;
}

.mcc-note-text p:last-child {
    margin-bottom: 0;
}

.pagination-container {
    margin: 32px 0 8px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-link {
    padding: 10px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.pagination-link:hover {
    background: #5B9BD5;
    color: #ffffff;
    border-color: #5B9BD5;
}

.pagination-info {
    padding: 10px 16px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.related-services {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.related-services h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.related-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.related-service-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.related-service-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.related-service-card:hover {
    border-color: #5B9BD5;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.2);
}

.related-service-logo-wrap {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    flex-shrink: 0;
}

.related-service-logo-wrap--bg {
    background-color: #5B9BD5;
    border-radius: 8px;
    padding: 8px 12px;
    box-sizing: border-box;
}

.related-service-logo-wrap--invert .related-service-logo {
    filter: brightness(0);
}

.related-service-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.related-service-name {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-align: center;
    word-break: break-word;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.related-service-domain {
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    width: 100%;
}

.related-service-domain-extras {
    color: #5B9BD5;
    font-weight: 600;
    white-space: nowrap;
}

.related-service-card * {
    pointer-events: none;
}

.blurred-content {
    filter: blur(4px);
    user-select: none;
    opacity: 0.6;
    position: relative;
    cursor: pointer;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.blurred-content:hover {
    filter: blur(3px);
    opacity: 0.7;
}

.blurred-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    cursor: pointer;
}

.blurred-content a,
.blurred-content * {
    pointer-events: none;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .mcc-page-title {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .mcc-search {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 20px;
    }

    .mcc-search-input {
        padding: 14px 16px;
    }

    .mcc-search-submit {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    .mcc-table-head,
    .mcc-table-row {
        grid-template-columns: 5.5rem minmax(0, 1fr);
        gap: 10px;
        padding: 12px 14px;
    }

    .mcc-col-name {
        font-size: 14px;
    }

    .mcc-code-title {
        font-size: 32px;
    }

    .mcc-code-subtitle {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .mcc-description {
        font-size: 15px;
    }

    .mcc-note {
        padding: 14px 16px;
        margin-top: 16px;
    }

    .mcc-note-text {
        font-size: 14px;
    }

    .related-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .pagination {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .pagination-group {
        display: contents;
    }

    .pagination-info {
        grid-column: 1 / -1;
        text-align: center;
        font-size: 13px;
        padding: 4px 8px;
    }

    .pagination-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px 6px;
        font-size: 13px;
        box-sizing: border-box;
    }
}
