/* .form-select,
.form-control,
.btn-check + label {
    border-radius: 15em !important;
} */

input[type=checkbox].form-check-input:checked {
    background-color: var(--ciotolandia-orange) !important;
    border-color: var(--ciotolandia-orange) !important;
    accent-color: var(--ciotolandia-orange) !important;
}

.onboarding-step button {
    border-radius: 100%;
    aspect-ratio: 1;
    width: 4rem;
    position: relative;
}

.onboarding-step button i {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 22px;
    transform: translate(-50%, -50%);
}

@keyframes bounce-horizontal {
    0%, 100% {
        transform: translate(-50%, -50%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translate(-50%, -25%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.bi-bounce-x {
    animation: bounce-horizontal 1s infinite;
}

.onboarding-step:not(.shown) {
    display: none;
}

.onboarding-step [data-json] {
    margin: 0 auto;
}

.btn-check + label {
    transition: .3s;
}

#gender-male:checked + label {
    border-color: cornflowerblue;
    color: cornflowerblue;
}

#gender-female:checked + label {
    border-color: coral;
    color: coral;
}

#gender-gif {
    transition: 1s;
}

#gender-gif.rose {
    filter: hue-rotate(90deg);
}

:root {
    --cd-color-1: hsl(206, 21%, 24%); /* Navy */
    --cd-color-2: hsl(205, 38%, 89%); /* Blue */
    --cd-color-3: hsl(207, 10%, 55%); /* Grey */
    --cd-color-4: hsl(111, 51%, 60%); /* Green */
    --cd-color-5: hsl(356, 53%, 49%); /* Red */
    --cd-color-6: hsl(47, 85%, 61%);  /* Yellow */
    --color-white: #ffffff;
    
    --space-md: 1.25em;
    --space-lg: 2em;
    --radius-md: 0.25em;
    
    --cd-header-height: 200px;
    --font-primary: 'Droid Serif', serif;
    --font-secondary: 'Open Sans', sans-serif;
}

.timeline-container {
    position: relative;
    width: 90%;
    max-width: 1170px;
    margin: 0 auto;
    /* padding: var(--space-md) 0; */
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    height: 100%;
    width: 4px;
    background: var(--cd-color-2);
}

@media only screen and (min-width: 64rem) {
    .timeline-container::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-block {
    display: flex;
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-lg);
}

.timeline-block:last-child {
    margin-bottom: 0;
}

@media only screen and (min-width: 64rem) {
    .timeline-block:nth-child(even) {
        flex-direction: row-reverse;
    }
}

.timeline-img {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--ciotolandia-green);
    box-shadow: 0 0 0 4px var(--color-white), inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
}

.timeline-img i {
    font-size: 25px;
}

@media only screen and (min-width: 64rem) {
    .timeline-img {
        width: 40px;
        height: 40px;
        margin-left: calc(5% - 20px);
        order: 1;
        will-change: transform;
    }

    .timeline-block:nth-child(even) .timeline-img {
        margin-right: calc(5% - 20px);
        margin-left: 0;
    }
}

.timeline-content {
    flex-grow: 1;
    position: relative;
    margin-left: var(--space-md);
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 100%;
    height: 0;
    width: 0;
    border: 7px solid transparent;
    border-right-color: var(--color-white);
}

@media only screen and (min-width: 64rem) {
    .timeline-content {
        width: 45%;
        flex-grow: 0;
        will-change: transform;
        margin: 0;
        font-size: 0.8em;
    }

    .timeline-content::before {
        top: 24px;
    }

    .timeline-block:nth-child(odd) .timeline-content::before {
        right: auto;
        left: 100%;
        border-right-color: transparent;
        border-left-color: var(--color-white);
    }
}

.timeline-date {
    color: hsla(207, 10%, 55%, 0.7);
    padding: 0.8em 0;
    display: inline-block;
    font-size: 16px;
}

@media only screen and (min-width: 64rem) {
    .timeline-date {
        position: absolute;
        width: 100%;
        left: 130%;
        top: 10px;
        padding: 0;
    }

    .timeline-block:nth-child(even) .timeline-date {
        left: auto;
        right: 130%;
        text-align: right;
    }
}

@media only screen and (min-width: 64rem) {
    .timeline-img--hidden, 
    .timeline-content--hidden {
        visibility: hidden;
    }

    .timeline-img--bounce-in {
        animation: cd-bounce-1 0.6s;
    }

    .timeline-content--bounce-in {
        animation: cd-bounce-2 0.6s;
    }

    .timeline-block:nth-child(even) .timeline-content--bounce-in {
        animation-name: cd-bounce-2-inverse;
    }
}

@keyframes cd-bounce-1 {
    0% { opacity: 0; transform: scale(0.5); }
    60% { opacity: 1; transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes cd-bounce-2 {
    0% { opacity: 0; transform: translateX(-100px); }
    60% { opacity: 1; transform: translateX(20px); }
    100% { transform: translateX(0); }
}

@keyframes cd-bounce-2-inverse {
    0% { opacity: 0; transform: translateX(100px); }
    60% { opacity: 1; transform: translateX(-20px); }
    100% { transform: translateX(0); }
}

.swiper-slide {
    margin-top: auto;
    margin-bottom: 50px;
}

.shapes-carousel .swiper-button-next,
.shapes-carousel .swiper-button-prev {
    color: var(--ciotolandia-green);
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border: 2px solid;
    border-radius: 50%;
    background: transparent;
}

.shapes-carousel .swiper-button-next:after,
.shapes-carousel .swiper-button-prev:after {
    font-size: 10px;
    font-weight: bold;
}

[data-json="shape-toy"] {
    width: 35%;
}

[data-json="shape-piccola"] {
    width: 50%;
}

[data-json="shape-media"] {
    width: 70%;
}

[data-json="shape-grande"] {
    width: 85%;
}

[data-json="shape-gigante"] {
    width: 100%;
}

.swiper-slide:not(.swiper-slide-active) {
    opacity: 0.5 !important;
}

.dog-name {
    text-transform: capitalize;
}

.form-range::-moz-range-thumb,
.form-range::-webkit-slider-runnable-track {
    background-color: var(--ciotolandia-orange) !important;
}

.appetite-ranges span.active,
.activity-ranges span.active {
    font-weight: 550;
    color: var(--ciotolandia-orange);
}

.row:has(.onboarding-step[data-step=name].shown) .timeline-block[data-step=name] .timeline-date,
.row:has(.onboarding-step[data-step=user].shown) .timeline-block[data-step=user] .timeline-date,
.row:has(.onboarding-step[data-step=breed].shown) .timeline-block[data-step=breed] .timeline-date,
.row:has(.onboarding-step[data-step=appetite].shown) .timeline-block[data-step=appetite] .timeline-date,
.row:has(.onboarding-step[data-step=pathology].shown) .timeline-block[data-step=pathology] .timeline-date,
.row:has(.onboarding-step[data-step=birth_date].shown) .timeline-block[data-step=birth_date] .timeline-date,
.row:has(.onboarding-step[data-step=shape_weight].shown) .timeline-block[data-step=shape_weight] .timeline-date,
.row:has(.onboarding-step[data-step=activity_level].shown) .timeline-block[data-step=activity_level] .timeline-date,
.row:has(.onboarding-step[data-step=gender_health_status].shown) .timeline-block[data-step=gender_health_status] .timeline-date {
    color: var(--ciotolandia-green) !important;
}

.dials-dropdown {
    position: absolute;
    display: none;
    border: 1px solid #dee2e6;
    font-size: 1rem;
    width: 100%;
    z-index: 9999;
    background: white;
    max-height: 200px;
    width: max-content;
    overflow-y: scroll;
    bottom: 100%
}

.dials-dropdown .sub-options-container {
    display: none;
}

.dials-dropdown .dials-option {
    width: 100%;
    display: flex;
    justify-content: start;
    gap: 10px;
    align-items: center;
    padding: 3px .75rem;
    cursor: pointer;
}

.dials-dropdown .dials-option.selected,
.dials-dropdown .dials-option:hover {
    background-color: #dee2e6;
}

.dials-dropdown .dials-option .icon-selected {
    color: green;
    margin-left: auto;
}

.dials-dropdown .dials-option:not(.selected) .icon-selected {
    display: none
}

.dials-dropdown .dials-option .dial-code {
    color: grey;
}

.img-dial {
    width: 20px;
    display: block;
    position: absolute;
    top: 69%;
    left: 1.5rem;
    background-image: url("../images/phone-flags/flags.png");
    background-repeat: no-repeat;
    transform: translate(-50%, -50%);
}

#floating-dial:not(:has(option[value=""]:checked)),
#shipping-floating-dial:not(:has(option[value=""]:checked)),
#billing-floating-dial:not(:has(option[value=""]:checked)) {
    padding-left: 2.5rem !important;
    padding-right: 1.75rem !important;
}


.activity-explanation {
    background-color: #ef5b2a20;
    padding: 10px;
    margin-bottom: 20px;
    color: var(--ciotolandia-orange);
    position: relative;
}

.activity-explanation span:not(.active) {
    display: none;
}

.activity-explanation::before {
    content: "";
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ef5b2a20;
    top: -10px;
}

.activity-explanation:has([data-value="1"].active)::before {
    left: 15px;
}

.activity-explanation:has([data-value="2"].active)::before {
    left: 50%;
    transform: translate(-50%);
}

.activity-explanation:has([data-value="3"].active)::before {
    right: 15px;
}

.onboarding-step[data-step='gender_health_status']:has([name="gender"][value="male"]:checked) #gender-to-show,
.onboarding-step[data-step='gender_health_status']:has([name="neutered"][value="1"]:checked) #gender-to-show {
    display: none;
}

.onboarding-step[data-step='gender_health_status']:has([name="gender"][value="male"]:checked) #gender-to-reduce,
.onboarding-step[data-step='gender_health_status']:has([name="neutered"][value="1"]:checked) #gender-to-reduce {
    width: 100%;
}

.onboarding-step[data-step='gender_health_status']:has([name="gender"][value="female"]:checked):has([name="neutered"][value="0"]:checked) #gender-to-reduce {
    width: 50%;
}

/* ── Popup "Benvenuto in famiglia" (cucciolo) ── */
.puppy-welcome-popup {
    border-radius: 24px !important;
    padding: 8px 8px 14px !important;
    background: linear-gradient(180deg, #fff 0%, #fff6f0 100%) !important;
    box-shadow: 0 24px 60px rgba(239, 91, 42, .18), 0 8px 20px rgba(0, 0, 0, .08) !important;
    overflow: hidden;
}

.puppy-welcome-popup::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--ciotolandia-green), var(--ciotolandia-orange));
}

.puppy-welcome {
    padding: 8px 10px 0;
}

.puppy-welcome__emoji {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 8px;
    animation: puppy-bounce 1.4s ease-in-out infinite;
}

.puppy-welcome__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ciotolandia-green, #017f42);
    margin: 0 0 10px;
    letter-spacing: -.01em;
}

.puppy-welcome__text {
    font-size: 1rem;
    line-height: 1.6;
    color: #3d3d3d;
    margin: 0 auto 14px;
    max-width: 360px;
}

.puppy-welcome__brand {
    color: var(--ciotolandia-orange, #ef5b2a);
}

.puppy-welcome__note {
    font-size: .85rem;
    color: #6a6a6a;
    background: rgba(239, 91, 42, .08);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 auto;
    max-width: 360px;
    line-height: 1.45;
}

.puppy-welcome-popup .swal2-confirm {
    border-radius: 100px !important;
    padding: 10px 28px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(239, 91, 42, .35) !important;
}

@keyframes puppy-bounce {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-6px) rotate(2deg); }
}