/* IcePro — posts-pro.css (split from main.css) */

/* IcePro posts widget: final structure uses the native zibll post list. */
.icepro-posts-pro {
    --icepro-pro-color: var(--focus-color, #556af1);
    --icepro-pro-color-soft: rgba(85, 106, 241, 0.12);
    --icepro-pro-color-faint: rgba(85, 106, 241, 0.06);
    --icepro-pro-border: var(--main-border-color, rgba(125, 136, 140, 0.16));
    --icepro-pro-muted: var(--muted-color, #6b7280);
    --icepro-pro-title: var(--main-color, #2c3338);
    overflow: visible;
    color: var(--icepro-pro-title);
}

.icepro-posts-pro-tone-cyan {
    --icepro-pro-color: #08c4c1;
    --icepro-pro-color-soft: rgba(8, 196, 193, 0.13);
    --icepro-pro-color-faint: rgba(8, 196, 193, 0.06);
}

.icepro-posts-pro-tone-blue {
    --icepro-pro-color: #2997f7;
    --icepro-pro-color-soft: rgba(41, 151, 247, 0.13);
    --icepro-pro-color-faint: rgba(41, 151, 247, 0.06);
}

.icepro-posts-pro-tone-green {
    --icepro-pro-color: #22b35f;
    --icepro-pro-color-soft: rgba(34, 179, 95, 0.13);
    --icepro-pro-color-faint: rgba(34, 179, 95, 0.06);
}

.icepro-posts-pro-tone-amber {
    --icepro-pro-color: #f3920a;
    --icepro-pro-color-soft: rgba(243, 146, 10, 0.14);
    --icepro-pro-color-faint: rgba(243, 146, 10, 0.07);
}

.icepro-posts-pro-tone-rose {
    --icepro-pro-color: #f25278;
    --icepro-pro-color-soft: rgba(242, 82, 120, 0.13);
    --icepro-pro-color-faint: rgba(242, 82, 120, 0.06);
}

.icepro-posts-pro .icepro-posts-pro-head {
    position: relative;
    display: block;
    margin: 0 0 13px;
    padding: 0;
    border: 0;
}

.icepro-posts-pro-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 30px;
}

.icepro-posts-pro .icepro-posts-pro-title-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.icepro-posts-pro .icepro-posts-pro-title-group h3 {
    margin: 0;
    color: var(--icepro-pro-title);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.icepro-posts-pro .icepro-posts-pro-title-group p,
.icepro-posts-pro .icepro-posts-pro-list,
.icepro-posts-pro .icepro-posts-pro-date,
.icepro-posts-pro .icepro-posts-pro-item,
.icepro-posts-pro .icepro-posts-pro-main,
.icepro-posts-pro .icepro-posts-pro-line,
.icepro-posts-pro .icepro-posts-pro-badges,
.icepro-posts-pro .icepro-posts-pro-thumb,
.icepro-posts-pro .icepro-posts-pro-meta {
    all: revert;
}

.icepro-posts-pro .icepro-posts-pro-icon {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    background: none;
    color: var(--icepro-pro-color);
    box-shadow: none;
}

.icepro-posts-pro .icepro-posts-pro-icon .icepro-posts-pro-icon-inner,
.icepro-posts-pro .icepro-posts-pro-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    font-size: 28px;
    line-height: 28px;
    text-align: center;
}

.icepro-posts-pro .icepro-posts-pro-more {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid color-mix(in srgb, var(--icepro-pro-color) 22%, transparent);
    border-radius: 999px;
    background: var(--icepro-pro-color-soft);
    color: var(--icepro-pro-color);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.icepro-posts-pro .icepro-posts-pro-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--icepro-pro-color) 12%, transparent);
    color: currentColor;
    line-height: 1;
    transition: background-color .2s ease, transform .2s ease;
}

.icepro-posts-pro .icepro-posts-pro-more:hover {
    border-color: var(--icepro-pro-color);
    background: var(--icepro-pro-color);
    color: #fff;
    box-shadow: 0 5px 14px color-mix(in srgb, var(--icepro-pro-color) 22%, transparent);
    transform: translateY(-1px);
}

.icepro-posts-pro .icepro-posts-pro-more:hover .icepro-posts-pro-more-icon {
    background: rgba(255, 255, 255, .18);
    transform: translateX(2px);
}

.icepro-posts-pro .icepro-posts-pro-more:focus-visible {
    outline: 2px solid var(--icepro-pro-color);
    outline-offset: 2px;
}

.icepro-posts-pro-divider {
    display: block;
    flex: 1 1 auto;
    min-width: 24px;
    height: 1px;
    margin: 0 4px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--icepro-pro-color) 30%, transparent), color-mix(in srgb, var(--icepro-pro-color) 9%, transparent), transparent);
}

.icepro-posts-pro-body,
.icepro-posts-pro-body.widget-main-post {
    margin-top: 0;
    margin-bottom: 0;
}

.icepro-posts-pro-body .widget-ajaxpager > .posts-item:first-child,
.icepro-posts-pro-body .widget-ajaxpager > .posts-mini:first-child {
    margin-top: 0;
}

.icepro-posts-pro-style-card .icepro-posts-pro-body .posts-item.card {
    margin-top: 0;
}

.icepro-posts-pro-style-card .item-heading .icepro-card-title-main,
.icepro-posts-pro-style-card .item-heading .icepro-card-title-sub {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Position, radius and color come from Zibll's native .img-badge + .jb-red styles. */
.icepro-card-corner-badge {
    pointer-events: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.icepro-posts-pro-style-card .item-heading .icepro-card-title-main {
    color: var(--main-color, #2f3440);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.icepro-posts-pro-style-card .item-heading .icepro-card-title-sub {
    margin-top: 2px;
    color: var(--muted-color, #8b9099);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.icepro-posts-pro-body .posts-item.list,
.icepro-posts-pro-body .posts-item.card,
.icepro-posts-pro-body .posts-mini {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Homepage card widgets keep a stable four-column desktop grid.
 * Zibll keeps two columns below 768px. */
@media screen and (min-width: 992px) {
    .icepro-posts-pro-style-card .icepro-posts-pro-body .posts-item.card {
        width: calc(25% - 16px);
    }
}

.icepro-posts-pro-body .posts-item.list:hover,
.icepro-posts-pro-body .posts-item.card:hover,
.icepro-posts-pro-body .posts-mini:hover {
    border-color: color-mix(in srgb, var(--icepro-pro-color) 24%, var(--icepro-pro-border));
    box-shadow: 0 8px 20px rgba(36, 43, 55, 0.05);
    transform: translateY(-1px);
}

body.dark-theme .icepro-posts-pro {
    --icepro-pro-border: var(--main-border-color, rgba(255, 255, 255, 0.08));
    --icepro-pro-title: var(--main-color, #e5eef7);
}

@supports not (color: color-mix(in srgb, #000 50%, transparent)) {
    .icepro-posts-pro .icepro-posts-pro-more {
        border-color: var(--icepro-pro-color-soft);
    }

    .icepro-posts-pro .icepro-posts-pro-more:hover {
        border-color: var(--icepro-pro-color);
        box-shadow: 0 5px 14px var(--icepro-pro-color-soft);
    }

    .icepro-posts-pro-divider {
        background: linear-gradient(90deg, var(--icepro-pro-color-soft), transparent);
    }

    .icepro-posts-pro-body .posts-item.list:hover,
    .icepro-posts-pro-body .posts-item.card:hover,
    .icepro-posts-pro-body .posts-mini:hover {
        border-color: var(--icepro-pro-color);
    }
}

@media screen and (max-width: 768px) {
    .icepro-posts-pro-head-row {
        gap: 7px;
    }

    .icepro-posts-pro .icepro-posts-pro-title-group h3 {
        font-size: 17px;
    }

    .icepro-posts-pro .icepro-posts-pro-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

    .icepro-posts-pro .icepro-posts-pro-more {
        min-height: 28px;
        padding: 4px 9px;
        font-size: 12px;
    }

    .icepro-posts-pro .icepro-posts-pro-icon .icepro-posts-pro-icon-inner,
    .icepro-posts-pro .icepro-posts-pro-icon svg {
        width: 26px;
        height: 26px;
        font-size: 26px;
        line-height: 26px;
    }
}
