/**
 * Free Forever checkbox — styled to match Listivo panel form controls.
 * Mirrors the look of the built-in terms-and-conditions checkbox.
 */

.rp-free-forever {
    margin: 4px 0 8px;
}

.rp-free-forever__box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d5e3ee;
    border-radius: 8px;
    background: #f7fafc;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
    position: relative;
}

.rp-free-forever__box:hover {
    border-color: #9ccc65;
}

.rp-free-forever__box:focus-visible {
    outline: 2px solid #9ccc65;
    outline-offset: 2px;
}

.rp-free-forever__box--checked {
    border-color: #9ccc65;
    background: #f2f9ea;
}

.rp-free-forever__box--loading {
    pointer-events: none;
    opacity: .75;
}

/* Disabled: free slot already used by another listing */
.rp-free-forever__box--disabled {
    cursor: not-allowed;
    opacity: .6;
    background: #f2f3f4;
    border-color: #dfe3e7;
}

.rp-free-forever__box--disabled:hover {
    border-color: #dfe3e7;
}

.rp-free-forever--disabled .rp-free-forever__hint a {
    color: #0f6b6b;
    font-weight: 600;
    text-decoration: underline;
    pointer-events: auto;
}

/* The check square */
.rp-free-forever__checkbox {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid #c4d3e0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease, border-color .15s ease;
    margin-top: 1px;
}

.rp-free-forever__checkbox svg {
    opacity: 0;
    transform: scale(.6);
    transition: opacity .12s ease, transform .12s ease;
}

.rp-free-forever__box--checked .rp-free-forever__checkbox {
    background: #7cb342;
    border-color: #7cb342;
}

.rp-free-forever__box--checked .rp-free-forever__checkbox svg {
    opacity: 1;
    transform: scale(1);
}

/* Label texts */
.rp-free-forever__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.4;
}

.rp-free-forever__title {
    font-weight: 600;
    color: #1e2d3d;
    font-size: 15px;
}

.rp-free-forever__hint {
    font-size: 12.5px;
    color: #5b6b7a;
}

/* Inline spinner while saving */
.rp-free-forever__spinner {
    display: none;
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(124, 179, 66, .35);
    border-top-color: #7cb342;
    border-radius: 50%;
    animation: rp-spin .7s linear infinite;
}

.rp-free-forever__box--loading .rp-free-forever__spinner {
    display: block;
}

@keyframes rp-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .rp-free-forever__spinner { animation-duration: 1.6s; }
    .rp-free-forever__checkbox svg,
    .rp-free-forever__box { transition: none; }
}

/* Feedback message */
.rp-free-forever__message {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    display: none;
}

.rp-free-forever__message--success,
.rp-free-forever__message--error {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
}

.rp-free-forever__message--success {
    color: #33691e;
    background: #eef7e3;
    border: 1px solid #c5e1a5;
}

.rp-free-forever__done-link {
    display: inline-block;
    margin-top: 4px;
    color: #0f6b6b;
    font-weight: 700;
    text-decoration: underline;
}

.rp-free-forever__message--error {
    color: #b71c1c;
    background: #fdecea;
    border: 1px solid #f5c6c2;
}

/* Free card on the Select Subscription screen */
.rp-free-card__message {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    display: none;
}

.rp-free-card__message--success,
.rp-free-card__message--error {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
}

.rp-free-card__message--success {
    color: #33691e;
    background: #eef7e3;
    border: 1px solid #c5e1a5;
}

.rp-free-card__message--error {
    color: #b71c1c;
    background: #fdecea;
    border: 1px solid #f5c6c2;
}
