/* Final compare iPhone polish. Loaded after iphone-compare.css. */

.compare-hero--polished,
.compare-help--polished,
.compare-quick-guide,
.iphone-compare--polished {
    max-width: 1180px;
}

.compare-hero--polished,
.compare-help--polished {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
}

.compare-hero--polished::after,
.compare-help--polished::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -90px;
    width: 240px;
    height: 240px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(35, 88, 246, .28), transparent 66%);
    pointer-events: none;
}

.compare-hero--polished > *,
.compare-help--polished > * {
    position: relative;
    z-index: 1;
}

.compare-hero--polished .eyebrow,
.compare-help--polished .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(35, 88, 246, .08);
    color: #2358f6;
}

.compare-hero--polished .eyebrow::before,
.compare-help--polished .eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ff7a00;
    box-shadow: 0 0 0 4px rgba(255, 122, 0, .14);
}

.compare-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.compare-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #5f6b84;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.compare-scroll-hint img {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.compare-quick-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px auto 0;
}

.compare-quick-guide article {
    position: relative;
    overflow: hidden;
    min-height: 138px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff, #f7f9ff);
    border: 1px solid rgba(17, 26, 54, .07);
    box-shadow: 0 12px 30px rgba(17, 26, 54, .055);
}

.compare-quick-guide article::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #2358f6, #ff7a00);
}

.compare-quick-guide span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(35, 88, 246, .09);
    color: #2358f6;
    font-size: 12px;
    font-weight: 950;
}

.compare-quick-guide span img {
    width: 14px;
    height: 14px;
}

.compare-quick-guide h2 {
    margin: 12px 0 7px;
    color: #111a36;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1;
    letter-spacing: -.045em;
}

.compare-quick-guide p {
    margin: 0;
    color: #5f6b84;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.iphone-compare--polished {
    border-radius: 30px;
}

.iphone-compare--polished .compare-device {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.iphone-compare--polished .compare-device:hover {
    transform: translateY(-2px);
    border-color: rgba(35, 88, 246, .16);
    box-shadow: 0 18px 42px rgba(17, 26, 54, .10);
}

.iphone-compare--polished .compare-device__select-label {
    color: #5f6b84;
}

.iphone-compare--polished .compare-device select {
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(17, 26, 54, .035);
}

.iphone-compare--polished .compare-device__image-wrap {
    width: min(230px, 100%);
    height: 166px;
}

.iphone-compare--polished .compare-device__buy {
    gap: 8px;
    background: linear-gradient(135deg, #2358f6, #5b36ff) !important;
    color: #fff !important;
}

.iphone-compare--polished .compare-device__buy span {
    color: #fff !important;
}

.iphone-compare--polished .compare-device__buy img {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
}

.compare-section {
    border-top: 1px solid rgba(17, 26, 54, .07);
}

.compare-section__title {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.compare-section__title img {
    width: 22px;
    height: 22px;
    color: #2358f6;
}

.iphone-compare--polished .compare-section__cell {
    padding: 12px;
    border-radius: 18px;
    background: rgba(35, 88, 246, .035);
    border: 1px solid rgba(17, 26, 54, .045);
}

.iphone-compare--polished .compare-section__cell p {
    margin-bottom: 8px;
}

.iphone-compare--polished .compare-section__cell p:last-child {
    margin-bottom: 0;
}

.iphone-compare.only-differences .compare-section.is-same {
    display: none;
}

.compare-help--polished .button img,
.compare-hero--polished .button img {
    filter: brightness(0) invert(1);
}

@media (max-width: 900px) {
    .compare-hero--polished,
    .compare-help--polished {
        border-radius: 24px;
        padding: 20px;
    }

    .compare-quick-guide {
        grid-template-columns: 1fr;
    }

    .compare-quick-guide article {
        min-height: auto;
        border-radius: 18px;
        padding: 15px;
    }

    .compare-toolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .compare-scroll-hint {
        border-radius: 16px;
    }

    .iphone-compare--polished {
        border-radius: 24px;
    }

    .iphone-compare--polished .compare-device:hover {
        transform: none;
    }

    .iphone-compare--polished .compare-section__cell {
        padding: 10px;
    }
}
