/**
 * Petsure Badges Widget Styles
 *
 * Service badges grid with SVG paw icons + contact CTA bar.
 *
 * @package Petsure_Core
 */

/* ============================================================ */
/*  BADGES SWIPER                                               */
/* ============================================================ */

.petsure-badges-swiper {
    overflow: hidden;
    width: 100%;
}

/* Swiper handles slide positioning via CSS transforms — do NOT use flex on wrapper */
.petsure-badges-swiper .swiper-wrapper {
    align-items: stretch;
}

.petsure-badges-swiper .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

.petsure-badges-swiper .swiper-slide .petsure-badge-item {
    height: auto;
    width: auto;
    margin: 0;
}

/* Fallback grid when Swiper is not available/initialized */
.petsure-badges-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* ---------- Badge Item ---------- */

.petsure-badge-item {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--petsure-white);
    border: 1px solid rgba(var(--petsure-primary-rgb), 0.6);
    border-radius: var(--petsure-border-radius-lg);
    cursor: default;
    line-height: 1.2;
    width: max-content;
    margin: auto;
    font-weight: 700;
}

/* ---------- Icon ---------- */

.petsure-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(var(--petsure-accent-rgb), 0.1);
    color: var(--petsure-accent);
    fill: var(--petsure-accent);
    flex-shrink: 0;
}

.petsure-badge-icon svg {
    min-width: 16px;
    min-height: 16px;
    display: block;
    fill: currentColor;
}

.petsure-badge-icon i {
    font-size: 16px;
    min-width: 16px;
    min-height: 16px;
    color: inherit;
}

/* ---------- Title ---------- */

.petsure-badge-title {
    font-size: 14px !important;
    font-weight: 600;
    color: var(--petsure-primary) !important;
    margin: 0 !important;
    flex: 1;
}

/* ---------- Description ---------- */

.petsure-badge-description {
    font-size: 13px;
    color: var(--petsure-text);
    margin: 0 !important;
    line-height: 1.2;
    width: 100%;
}

/* ============================================================ */
/*  CONTACT CTA                                                 */
/* ============================================================ */

.petsure-badges-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.petsure-badges-cta-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--petsure-white);
    fill: var(--petsure-white);
    width: 35px;
    height: 35px;
    padding: 8px;
    background: var(--petsure-accent);
    border-radius: 50%;
}

.petsure-badges-cta-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.petsure-badges-cta-text {
    font-size: 15px;
    color: var(--petsure-primary);
    margin: 0 !important;
    display: inline-block;
    line-height: 1.6;
}

.petsure-badges-cta-link {
    position: relative;
    color: var(--petsure-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.petsure-badges-cta-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--petsure-secondary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background 0.3s ease;
    pointer-events: none;
}

.petsure-badges-cta-link:hover {
    color: var(--petsure-accent);
}

.petsure-badges-cta-link:hover::before {
    transform: scaleX(1);
    background: var(--petsure-accent);
}

/* ============================================================ */
/*  RESPONSIVE                                                  */
/* ============================================================ */

@media (max-width: 767px) {
    .petsure-badges-cta {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }

    .petsure-badges-cta-link {
        white-space: normal;
    }
}