/**
 * RV Product Addons - Frontend Styles
 * Matches site design: Sora font, orange #F97415 accent, rounded elements
 */

/* Addons container */
.rvpa-addons {
    width: 100%;
    clear: both;
    margin: 16px 0;
    flex-basis: 100% !important;
    flex-shrink: 0 !important;
    order: -1;
    font-family: "Sora", sans-serif;
}

/* Break out of Elementor/theme flex layout on form.cart */
form.cart .rvpa-addons {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Individual addon row */
.rvpa-addon {
    margin-bottom: 8px;
    padding: 14px 16px;
    background: #F974150D;
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.rvpa-addon:last-child {
    margin-bottom: 0;
}

.rvpa-addon:hover {
    border-color: #F9741540;
    background: #F9741514;
}

/* Checked state */
.rvpa-addon:has(.rvpa-addon-checkbox:checked) {
    border-color: #F97415;
    background: #F974151A;
    box-shadow: 0 0 0 1px #F9741540;
}

/* Label layout */
.rvpa-addon-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    font-family: "Sora", sans-serif;
}

/* Custom checkbox */
.rvpa-addon-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rvpa-addon-checkbox:hover {
    border-color: #F97415;
}

.rvpa-addon-checkbox:checked {
    background-color: #F97415;
    border-color: #F97415;
}

.rvpa-addon-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.rvpa-addon-checkbox:focus-visible {
    outline: 2px solid #F97415;
    outline-offset: 2px;
}

/* Text block */
.rvpa-addon-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rvpa-addon-title {
    font-family: "Sora", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.4;
    /* Allow the price to wrap onto a new line when the addon name + price
       don't both fit. flex-wrap:wrap drops .rvpa-addon-price to the next
       line only when needed; when there is room they stay inline. */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
}

/* Price wrapper inside addon title: keeps the full "(+189 900 Ft)" string
   as one unbreakable unit. min-width:max-content prevents mid-number breaks. */
.rvpa-addon-price {
    white-space: nowrap;
    min-width: max-content;
    color: #F97415;
    font-weight: 600;
    font-size: inherit;
}

.rvpa-addon-description {
    font-family: "Sora", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}


/* Price animation */
.rvpa-price-animating {
    transition: opacity 0.15s ease;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .rvpa-addon {
        padding: 12px 14px;
    }

    .rvpa-addon-label {
        gap: 10px;
    }

    .rvpa-addon-checkbox {
        width: 18px;
        height: 18px;
    }

    .rvpa-addon-checkbox:checked::after {
        top: 1px;
        left: 5px;
        width: 5px;
        height: 9px;
    }
}
