.media-resource-page {
    background: #f8fbff;
    color: #13274f;
}

.media-resource-promo {
    height: 58px;
    overflow: hidden;
    background: #07115d;
}

.media-resource-promo-inner {
    display: block;
    width: 100%;
    height: 58px;
    text-decoration: none;
}

.media-resource-promo img {
    display: block;
    width: 100%;
    height: 58px;
    object-fit: cover;
}

.media-resource-main {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 36%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 56%, #f7fafc 100%);
}

.media-resource-section {
    padding: 38px 0 40px;
}

.media-resource-section > .wrap,
.media-resource-page .wrap {
    width: min(1680px, calc(100vw - 32px));
    max-width: none;
    margin-right: auto;
    margin-left: auto;
}

.media-resource-filter,
.media-resource-search,
.media-resource-table-card,
.media-resource-empty {
    border: 1px solid #e6ebf5;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(16, 24, 40, 0.07);
}

.media-resource-filter {
    padding: 14px 16px;
}

.media-resource-filter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(230, 238, 251, 0.9);
}

.media-resource-tabs,
.media-resource-filter-options,
.media-resource-tool-row,
.media-resource-search-actions,
.media-resource-note-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.media-resource-tab,
.media-resource-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(230, 238, 251, 0.95);
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.media-resource-tab {
    min-height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
}

.media-resource-chip {
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
}

.media-resource-tab:hover,
.media-resource-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.3);
}

.media-resource-tab.is-active,
.media-resource-chip.is-active {
    background: #eef4ff;
    border-color: rgba(37, 99, 235, 0.4);
    color: #2563eb;
}

.media-resource-login-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.media-resource-rows {
    padding-top: 10px;
}

.media-resource-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 40px;
    padding: 8px 0;
}

.media-resource-filter-label {
    flex: 0 0 78px;
    padding-top: 3px;
    color: #475569;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.5;
}

.media-resource-filter-options {
    flex: 1;
    min-width: 0;
}

.media-resource-filter-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(230, 238, 251, 0.9);
}

.media-resource-tool-row {
    flex: 1 1 auto;
}

.media-resource-tool-select,
.media-resource-control {
    height: 34px;
    border: 1px solid rgba(217, 230, 251, 0.95);
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    outline: none;
}

.media-resource-tool-select {
    min-width: 110px;
    padding: 0 30px 0 10px;
}

.media-resource-selected {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.media-resource-selected-label {
    color: #475569;
    font-weight: 950;
}

.media-resource-selected-item {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border: 1px dashed rgba(203, 213, 225, 0.95);
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-weight: 900;
}

.media-resource-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
}

.media-resource-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-resource-search-field span {
    flex: 0 0 auto;
    width: 64px;
    color: #475569;
    font-size: 12px;
    font-weight: 950;
}

.media-resource-control {
    display: block;
    min-width: 210px;
    padding: 0 10px;
}

.media-resource-input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

.media-resource-input::placeholder {
    color: #94a3b8;
}

.media-resource-search-actions {
    margin-left: auto;
}

.media-resource-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(217, 230, 251, 0.95);
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.media-resource-btn:hover {
    background: #f7fbff;
    border-color: rgba(37, 99, 235, 0.25);
}

.media-resource-btn.is-primary {
    color: #ffffff;
    border-color: transparent;
    background: #2563eb;
}

.media-resource-table-card {
    margin-top: 14px;
    padding: 12px;
}

.media-resource-table-wrap {
    overflow: auto;
    border: 1px solid #eef3fb;
    border-radius: 12px;
}

.media-resource-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: separate;
    border-spacing: 0;
}

.media-resource-table thead th {
    padding: 12px;
    background: #f6f9ff;
    border-bottom: 1px solid #e9effa;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-align: left;
    white-space: nowrap;
}

.media-resource-table thead th:nth-child(1) {
    width: 200px;
}

.media-resource-table thead th:nth-child(2),
.media-resource-table thead th:nth-child(3),
.media-resource-table thead th:nth-child(4) {
    width: 116px;
}

.media-resource-table thead th:nth-child(5),
.media-resource-table thead th:nth-child(6) {
    width: 94px;
    text-align: center;
}

.media-resource-table thead th:nth-child(8) {
    width: 96px;
    text-align: center;
}

.media-resource-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #eff4fb;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    vertical-align: middle;
}

.media-resource-table tbody tr:hover td {
    background: #fbfdff;
}

.media-resource-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #17305f;
    font-weight: 950;
    text-decoration: none;
}

.media-resource-name:hover {
    color: #2563eb;
}

.media-resource-price,
.media-resource-price-mask {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.media-resource-weight-cell {
    text-align: center;
    white-space: nowrap;
}

.media-resource-weight-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 41px;
    height: 16px;
    padding-right: 3px;
    border-radius: 3px;
    background: #2f6df6;
    color: #ffffff;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.media-resource-weight-icon::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 10px 0 0 rgba(255, 255, 255, 0.72);
}

.media-resource-weight-icon b {
    position: relative;
    z-index: 1;
    min-width: 12px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.media-resource-note-tags {
    margin-bottom: 8px;
}

.media-resource-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 8px;
    border: 1px solid #e6edf7;
    border-radius: 999px;
    background: #f4f7fb;
    color: #64748b;
    font-size: 10px;
    font-weight: 950;
}

.media-resource-tag-region {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.media-resource-tag-category {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.media-resource-tag-entry {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.media-resource-tag-blue {
    border-color: #cfe0ff;
    background: #eef4ff;
    color: #2f6df6;
}

.media-resource-note {
    width: 100%;
    padding: 7px 9px;
    border-radius: 9px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
    word-break: break-word;
}

.media-resource-action-cell {
    text-align: center;
    white-space: nowrap;
}

.media-resource-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 28px;
    padding: 0 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.media-resource-order-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
    transform: translateY(-1px);
}

.media-resource-table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 4px 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.media-resource-pagesize {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.media-resource-page-size {
    height: 28px;
    padding: 0 28px 0 10px;
    border: 1px solid rgba(217, 230, 251, 0.95);
    border-radius: 9px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    outline: none;
}

.media-resource-pager {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.media-resource-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 9px;
    border: 1px solid rgba(217, 230, 251, 0.95);
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.media-resource-page-btn:hover {
    background: #f7fbff;
    border-color: rgba(37, 99, 235, 0.25);
}

.media-resource-page-btn.is-active {
    background: #eef4ff;
    border-color: rgba(37, 99, 235, 0.35);
    color: #2563eb;
}

.media-resource-page-btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.media-resource-total {
    flex: 0 0 auto;
    margin-left: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 950;
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-resource-total b {
    color: #2563eb;
}

.media-resource-empty {
    padding: 32px 12px;
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 640px) {
    .media-resource-promo {
        display: none;
    }

    .media-resource-section {
        padding-top: 32px;
    }

    .media-resource-filter-top,
    .media-resource-filter-foot,
    .media-resource-search {
        align-items: stretch;
        flex-direction: column;
    }

    .media-resource-filter-row {
        display: block;
    }

    .media-resource-filter-label {
        margin-bottom: 8px;
    }

    .media-resource-tool-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .media-resource-tool-select,
    .media-resource-search-field,
    .media-resource-control,
    .media-resource-btn,
    .media-resource-login-tip {
        width: 100%;
    }

    .media-resource-search-actions {
        margin-left: 0;
    }

    .media-resource-table-foot {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px 12px;
        padding: 12px 0 0;
    }

    .media-resource-pagesize {
        grid-column: 1;
        grid-row: 1;
    }

    .media-resource-total {
        grid-column: 2;
        grid-row: 1;
        margin-left: 0;
        justify-content: flex-end;
        flex-direction: row;
        align-items: center;
        white-space: nowrap;
    }

    .media-resource-pager {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin-left: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .media-resource-pager::-webkit-scrollbar {
        display: none;
    }

    .media-resource-page-btn {
        flex: 0 0 auto;
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        border-radius: 10px;
    }

    .media-resource-page-btn:first-child,
    .media-resource-page-btn:last-child {
        min-width: 48px;
    }
}
