/* Suffix span for formatted numbers (e.g. 9.13K) */
.suffix_span {
    font-size: 0.65em;
    font-weight: 600;
    opacity: 0.7;
}

/* Score ring gradient background */
.mctool_ring {
    background-image: conic-gradient(from 180deg, #FB4056, #FB4056, #FFB23F, #ABD517, #ABD517);
    border: 2px solid white;
    width: 120px;
    height: 120px;
    margin: auto;
    border-radius: 50%;
    position: relative;
}
.mctool_ring svg {
    width: 122px;
    height: 120px;
    margin-left: -2px;
}
.mctool_ring_content {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    text-align: center;
}
.mctool_ring_title {
    line-height: 17px;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}
.mctool_ring_score {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 38px;
    line-height: 46px;
    color: #FB4056;
}

/* Result layout */
.mctool_result {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    overflow-x: visible;
    overflow-y: hidden;
    justify-content: space-between;
    width: 100%;
}
.mctool_result_value {
    position: relative;
}
.mctool_result_info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.mctool_result_info ul {
    margin-bottom: 0;
}

/* Result table */
.mctool_result_table {
    overflow-x: auto;
    white-space: wrap;
    border-collapse: collapse;
    border-style: hidden;
}
.mctool_result_table td, .mctool_result_table th {
    min-width: 80px;
    max-width: 300px;
    padding: 10px;
}
.mctool_result_table a {
    overflow-wrap: break-word;
}
.mctool_result_table th, .mctool_result_table td {
    border: 1px solid #eeeeee;
}
.mctool_result_table_score {
    font-weight: 700;
    font-size: 32px;
    line-height: 100%;
    color: #2D2C2D;
}

/* Traffic result styles */
.mctool_result_traffic {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: 20px;
}
.mctool_result_traffic_params {
    display: flex;
    flex-direction: column;
    min-width: 250px;
    gap: 30px;
}
.mctool_result_traffic_block {
    display: flex;
    flex-direction: column;
}
.mctool_result_traffic_value {
    display: flex;
    flex-direction: row;
    padding-top: 10px;
    align-items: end;
}
.mctool_result_traffic_value span {
    font-weight: 700;
    font-size: 36px;
    line-height: 100%;
    color: #2D2C2D;
}
.mctool_result_traffic_title {
    font-weight: 600;
    font-size: 16px;
}
.mctool_result_traffic_main_value {
    font-weight: 700;
    font-size: 64px;
    line-height: 100%;
    color: #FB4056;
}
.mctool_result_traffic_percent {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    padding: 0 6px;
    margin: 5px 3px;
    gap: 10px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}
.mctool_result_traffic_graph {
    min-width: 290px;
    padding: 20px 0;
    flex: 1;
}
.percent_block_green {
    background: rgba(48, 181, 54, 0.2);
    color: #30B536;
}
.percent_block_red {
    background: rgba(255, 99, 33, 0.2);
    color: #E62A28;
}

/* Traffic region table cells */
.mctool_result_table_div_traffic_region {
    display: flex;
    align-items: center;
    gap: 7px;
}
.mctool_result_table_td_traffic_region {
    font-size: 20px;
    color: #2D2C2D;
    min-width: 150px;
}
.mctool_result_table_td_traffic_value {
    font-weight: 500;
    font-size: 24px;
    color: #2D2C2D;
    height: 50px;
}

/* Tag / badge styles */
.mctool_tag_Low {
    background: #D6F0D7;
    color: #30B536;
}
.mctool_tag_High {
    background: #FCCFD5;
    color: #FB4056;
}
.mctool_tag_Medium {
    background: #FFECCF;
    color: #FFB23F;
}
.mctool_text_red {
    color: #FB4056 !important;
}
.mctool_text_yellow {
    color: #FFB23F;
}
.mctool_tag_val {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 4px 6px;
    gap: 10px;
    width: fit-content;
    height: 35px;
    background: #F6F6F6;
    border-radius: 99px;
    font-weight: 600;
    font-size: 12px;
    color: #828282;
    white-space: nowrap;
}
.mctool_main_value {
    font-weight: 600;
    font-size: 64px;
    line-height: 100%;
    color: #2D2C2D;
}

/* Standard card styles (used by server-rendered partials) */
.mctool_standard_card {
    padding-bottom: 5%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 260px;
}
.mctool_standard_card_items {
    display: flex;
    flex-direction: row;
    gap: 30px;
    row-gap: 10px;
    flex-wrap: wrap;
}
.mctool_standard_card_value {
    display: flex;
    align-items: end;
    gap: 10px;
    justify-content: start;
}

/* ASC result layout */
.result_as {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: visible;
    overflow-y: hidden;
    flex-flow: row wrap;
    justify-content: space-between;
    width: 100%;
}
.tool__result__domain_age {
    width: 100%;
    font-size: 16px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 44px;
    background: #FBFBFB;
    border-radius: 12px;
    color: #2D2C2D;
}
.domain_age_tag {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background: #FFB23F;
    border-radius: 99px;
    color: white;
    font-size: 16px;
}
.tool__result__item {
    text-align: center;
}
.tool__result__item-title {
    color: #828282;
    font-size: 14px;
    line-height: 1.2;
}
.tool__result__item-sum {
    color: #2D2C2D;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
    padding-top: 15px;
}

/* TDAC tiles */
.mctool_result_tdac {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mctool_tdac_head {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}
.mctool_tdac_head_first {
    display: flex;
    flex-direction: row;
    gap: 10px;
    font-weight: 700;
    font-size: 24px;
    color: #2D2C2D;
    flex-wrap: wrap;
}
.mctool_tdac_head_second {
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 10px;
    font-size: 14px;
    color: #828282;
    margin-left: auto;
    flex-wrap: wrap;
}
.mctool_tdac_head_first a {
    color: #2D2C2D;
}
.mctool_tiles {
    display: flex;
    flex-direction: row;
    gap: 20px;
    row-gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 30px;
}
.tile_item {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    gap: 10px;
    border: 2px solid #F3F3F3;
    border-radius: 20px;
    width: 275px;
    min-height: 310px;
}
.tile_head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 50px;
    gap: 10px;
    line-height: 120%;
}
.tile_title {
    font-weight: 600;
    font-size: 20px;
    color: #2D2C2D;
}
.tile_value {
    padding-top: 30px;
    line-height: 100%;
}
.tile_value .font_big_size .suffix_span {
    font-size: 32px;
}
.tile_link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.tile_country {
    font-weight: 600;
    font-size: 16px;
    color: #2D2C2D;
}
.tile_key_level {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}
.tile_key_level_num {
    font-weight: 600;
    font-size: 16px;
    line-height: 130%;
    color: #2D2C2D;
}
.tile_key_value {
    font-weight: 600;
    font-size: 14px;
    padding: 0 7px;
    background: #F6F6F6;
    border-radius: 99px;
}
.tile_value_items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.tile_value_item {
    font-weight: 600;
    font-size: 16px;
    line-height: 100%;
    color: #828282;
}

/* Font size helper for server-rendered values */
.font_big_size {
    font-weight: 600;
    font-size: 48px;
    line-height: 100%;
    color: #2D2C2D;
}

/* Loading spinner */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row-reverse;
    gap: 10px;
}
.loader::after {
    content: "";
    position: relative;
    width: 40px;
    height: 40px;
    border: 6px solid transparent;
    border-top-color: #FB4056;
    border-radius: 50%;
    animation: spin 1s ease infinite;
}
@keyframes spin {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

/* Button loading state */
.button--loading {
    opacity: 0.7;
    cursor: wait;
}

/* Error styling */
.error-wrapper {
    color: #FB4056;
    margin-top: 5px;
}

/* Inline error in tables */
.table_inline_error {
    font-size: 12px;
    color: #EE2222;
    margin-left: 20px;
}

/* Hidden utility */
.hidden {
    display: none;
}

/* Tooltip */
.mctool_result_table_tooltip {
    position: relative;
    display: inline-block;
    padding: 0 0 0 5px;
}
.mctool_result_table_tooltip .mctool_result_table_tooltip_text {
    visibility: hidden;
    width: 240px;
    background-color: white;
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
    line-height: 18px;
    color: #828282;
    position: absolute;
    z-index: 10030;
    right: 20px;
    top: 0;
}
.mctool_result_table_tooltip:hover .mctool_result_table_tooltip_text {
    visibility: visible;
}

/* DFC styles */
.dfc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.dfc-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.dfc-summary-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.dfc-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}
.dfc-dofollow { color: #16a34a; }
.dfc-nofollow { color: #dc2626; }
.dfc-url-block {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
.dfc-url-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: #fff;
    gap: 12px;
}
.dfc-url-header:hover {
    background: #f8fafc;
}
.dfc-url-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.dfc-url-link {
    color: #3578D5;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dfc-url-link:hover { text-decoration: underline; }
.dfc-url-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.dfc-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.dfc-status-ok {
    background: #dcfce7;
    color: #16a34a;
}
.dfc-status-err {
    background: #fee2e2;
    color: #dc2626;
}
.dfc-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}
.dfc-tag.dfc-dofollow { background: #dcfce7; color: #16a34a; }
.dfc-tag.dfc-nofollow { background: #fee2e2; color: #dc2626; }
.dfc-expand-icon {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s;
}
.dfc-detail {
    border-top: 1px solid #e2e8f0;
    padding: 0;
}
.dfc-links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.dfc-links-table th {
    background: #f8fafc;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
}
.dfc-links-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dfc-links-table a {
    color: #3578D5;
    text-decoration: none;
}
.dfc-links-table a:hover { text-decoration: underline; }
.dfc-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.dfc-type-badge.dfc-dofollow { background: #dcfce7; color: #16a34a; }
.dfc-type-badge.dfc-nofollow { background: #fee2e2; color: #dc2626; }
.dfc-no-links {
    padding: 16px;
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}
.dfc-export {
    margin-top: 16px;
    text-align: right;
}
.dfc-export-btn {
    padding: 8px 20px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.dfc-export-btn:hover { background: #1e293b; }
.dfc-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1199px) {
    .mctool_result_traffic {
        flex-direction: column;
    }
    .mctool_result_traffic_params {
        gap: 20px;
        margin: 0 auto;
    }
    .mctool_result_traffic_main_value, .mctool_result_traffic_value {
        padding-top: 0;
        font-size: 54px;
    }
    .mctool_result_traffic_block {
        flex-direction: row;
        align-items: center;
        gap: 30px;
        flex-wrap: wrap;
    }
    .mctool_tiles :nth-child(1 of .tile_item) { order: 1; }
    .mctool_tiles :nth-child(2 of .tile_item) { order: 3; }
    .mctool_tiles :nth-child(3 of .tile_item) { order: 2; }
    .mctool_tiles :nth-child(n+4 of .tile_item) { order: 4; }
}
@media (max-width: 992px) {
    .result_as .mctool_result_value {
        flex-basis: 100%;
    }
}
@media (max-width: 768px) {
    .mctool_result_traffic_block {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
    .tool__result__item {
        min-width: 45%;
        text-align: center;
    }
    .mctool_tdac_head_first, .mctool_tdac_head_second {
        justify-content: center;
    }
    .dfc-summary { grid-template-columns: repeat(3, 1fr); }
    .dfc-url-header { flex-direction: column; align-items: flex-start; }
    .dfc-url-stats { flex-wrap: wrap; }
    .dfc-links-table td { max-width: 150px; }
}
@media (max-width: 576px) {
    .mctool_tdac_head {
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .dfc-summary { grid-template-columns: repeat(2, 1fr); }
}
