/* css/price-box-frontend.css */

.rs-pb-wrapper {
    margin: 2rem 0;
    box-sizing: border-box;
}

.rs-pb-wrapper * {
    box-sizing: border-box;
}

.rs-pb-grid {
    display: grid;
    gap: 30px;
    align-items: stretch;
    justify-content: center;
}

.rs-pb-grid.cols-d-1 {
    grid-template-columns: repeat(1, minmax(auto, var(--pb-max-w)));
}

.rs-pb-grid.cols-d-2 {
    grid-template-columns: repeat(2, minmax(auto, var(--pb-max-w)));
}

.rs-pb-grid.cols-d-3 {
    grid-template-columns: repeat(3, minmax(auto, var(--pb-max-w)));
}

.rs-pb-grid.cols-d-4 {
    grid-template-columns: repeat(4, minmax(auto, var(--pb-max-w)));
}

@media (max-width: 980px) {
    .rs-pb-grid.cols-t-1 {
        grid-template-columns: repeat(1, minmax(auto, var(--pb-max-w)));
    }
    
    .rs-pb-grid.cols-t-2 {
        grid-template-columns: repeat(2, minmax(auto, var(--pb-max-w)));
    }
    
    .rs-pb-grid.cols-t-3 {
        grid-template-columns: repeat(3, minmax(auto, var(--pb-max-w)));
    }
}

@media (max-width: 767px) {
    .rs-pb-grid.cols-m-1 {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .rs-pb-grid.cols-m-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .rs-pb-box.is-highlight {
        transform: none !important;
        margin-top: 15px;
        margin-bottom: 15px;
    }
}

.rs-pb-box {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: var(--pb-border-rad);
    border-width: var(--pb-border-wid);
    border-style: solid;
    border-color: var(--pb-border-c-std);
    box-shadow: var(--pb-shadow);
    padding: 2.5em 2em;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    background-color: var(--pb-bg-std);
}

.style-glass .rs-pb-box {
    background-color: rgba(35, 35, 35, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.rs-pb-box.is-highlight {
    border-color: var(--pb-border-c-hl);
    background-color: var(--pb-bg-hl);
    transform: scale(1.04);
    z-index: 2;
}

/* --- BILDER --- */
.rs-pb-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--pb-img-rad);
    z-index: 2;
    margin-bottom: 1.5em;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.rs-pb-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rs-pb-image-wrap.format-square img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.rs-pb-image-wrap.format-wide img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.rs-pb-image-wrap.width-full {
    margin-left: -2em;
    margin-right: -2em;
    margin-top: -2.5em;
    width: calc(100% + 4em);
    max-width: none;
    border-radius: calc(var(--pb-border-rad) - var(--pb-border-wid)) calc(var(--pb-border-rad) - var(--pb-border-wid)) 0 0;
}

.rs-pb-header + .rs-pb-image-wrap.width-full {
    margin-top: 0;
    border-radius: 0;
}

.rs-pb-image-wrap.has-shadow {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.rs-pb-box:hover .rs-pb-image-wrap.has-hover img {
    transform: scale(1.08);
}

/* --- HEADER & TYPO --- */
.rs-pb-header {
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    z-index: 2;
}

.rs-pb-title {
    font-family: var(--pb-title-font);
    color: var(--pb-title-color);
    font-size: var(--pb-title-fs);
    font-weight: var(--pb-title-fw);
    margin: 0;
    line-height: 1.2;
}

.rs-pb-subtitle {
    font-family: var(--pb-subtitle-font);
    color: var(--pb-subtitle-color);
    font-size: var(--pb-subtitle-fs);
    font-weight: var(--pb-subtitle-fw);
    margin-top: 8px;
    line-height: 1.4;
}

.rs-pb-price-wrap {
    text-align: center;
    margin-bottom: 2em;
    min-height: calc(var(--pb-price-fs) * 1.2);
    position: relative;
    z-index: 2;
}

.rs-pb-price {
    font-family: var(--pb-price-font);
    color: var(--pb-price-color);
    font-size: var(--pb-price-fs);
    font-weight: var(--pb-price-fw);
    line-height: 1;
}

.rs-pb-interval {
    font-family: var(--pb-interval-font);
    color: var(--pb-interval-color);
    font-size: var(--pb-interval-fs);
    font-weight: var(--pb-interval-fw);
    vertical-align: baseline;
    margin-left: 4px;
}

.rs-pb-content-wrap {
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.rs-pb-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rs-pb-features li {
    font-family: var(--pb-list_text-font);
    color: var(--pb-list_text-color);
    font-size: var(--pb-list_text-fs);
    font-weight: var(--pb-list_text-fw);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    line-height: 1.4;
}

.rs-pb-icon {
    flex-shrink: 0;
    color: var(--pb-list_icon-color);
    font-size: var(--pb-list_icon-fs);
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rs-pb-icon svg {
    width: 100%;
    height: 100%;
}

.rs-pb-text {
    flex-grow: 1;
}

.rs-pb-tooltip-icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    opacity: 0.4;
    cursor: help;
    transition: opacity 0.2s;
}

.rs-pb-tooltip-icon:hover {
    opacity: 1;
}

.rs-pb-features li[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #111111;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    pointer-events: none;
}

.rs-pb-footer {
    margin-top: 2.5em;
    position: relative;
    z-index: 2;
}

.rs-pb-btn {
    display: block;
    text-align: center;
    background: var(--pb-btn-std-bg);
    border: 1px solid rgba(255,255,255,0.1);
    font-family: var(--pb-button-font);
    color: var(--pb-button-color);
    font-size: var(--pb-button-fs);
    font-weight: var(--pb-button-fw);
    text-decoration: none;
    padding: var(--pb-btn-pad);
    border-radius: var(--pb-btn-rad);
    transition: all 0.3s ease;
}

.rs-pb-btn:hover {
    filter: brightness(1.2);
}

.rs-pb-box.is-highlight .rs-pb-btn {
    background: var(--pb-btn-hl-bg);
    color: #111111;
    border-color: var(--pb-btn-hl-bg);
}

.rs-pb-box.is-highlight .rs-pb-btn:hover {
    filter: brightness(1.1);
}

.rs-pb-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pb-border-c-hl);
    color: #111111;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 10;
}

/* --- ANIMATIONEN FIX --- */
.has-hover-scale .rs-pb-box:hover {
    transform: scale(1.06) !important;
    z-index: 10;
}

.has-floating .rs-pb-box {
    animation: pbFloat var(--pb-float-s) ease-in-out infinite alternate;
}

.has-floating .rs-pb-box:nth-child(2n) {
    animation-delay: 0.5s;
}

.has-floating .rs-pb-box:nth-child(3n) {
    animation-delay: 1.0s;
}

@keyframes pbFloat {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(calc(var(--pb-float-h) * -1));
    }
}

.has-shine .rs-pb-shine-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--pb-border-rad);
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.has-shine .rs-pb-shine-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--pb-shine-c), transparent);
    transform: skewX(-25deg);
    animation: pbShine var(--pb-shine-s) infinite;
}

@keyframes pbShine {
    0% {
        left: -150%;
    }
    20% {
        left: 200%;
    }
    100% {
        left: 200%;
    }
}

/* --- TOGGLE --- */
.rs-pb-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3rem;
}

.rs-pb-toggle-label {
    font-family: var(--pb-toggle_label-font);
    color: var(--pb-toggle_label-color);
    font-size: var(--pb-toggle_label-fs);
    font-weight: var(--pb-toggle_label-fw);
    opacity: 0.5;
    transition: opacity 0.3s;
    cursor: pointer;
}

.rs-pb-toggle-label.active {
    opacity: 1;
}

.rs-pb-toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
    background: var(--pb-toggle-bg-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}

.rs-pb-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--pb-toggle-knob-1);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background 0.3s;
}

.rs-pb-toggle-switch[aria-checked="true"] {
    background: var(--pb-toggle-bg-2);
    border-color: var(--pb-toggle-bg-2);
}

.rs-pb-toggle-switch[aria-checked="true"]::after {
    transform: translateX(24px);
    background: var(--pb-toggle-knob-2);
}