@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500&display=swap');

/* ---- TRIGGER ---- */
.rv-wrap { margin: 12px 0 4px; }

.rv-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #f0faf4;
    border: 1px solid #b7e4c7;
    border-radius: 8px;
    padding: 10px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #1b4332;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    text-align: left;
    margin-top: 100px;
}
.rv-trigger:hover { background: #d8f3dc; border-color: #74c69d; }
.rv-trigger-label { font-weight: 500; }
.rv-trigger-sub { font-size: 11px; color: #52b788; margin-left: auto; }

/* ---- OVERLAY ---- */
.rv-overlay {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2147483647 !important;
    width: 90vw;
    max-width: 480px;
    padding: 0;
}
.rv-overlay.rv-open {
    display: block !important;
}

@keyframes rvFadeIn { from{opacity:0} to{opacity:1} }

/* Voorkom dat productfoto boven de modal uitkomt */
body.rv-modal-open .woocommerce-product-gallery,
body.rv-modal-open .woocommerce-product-gallery__wrapper,
body.rv-modal-open .woocommerce-product-gallery .flex-viewport,
body.rv-modal-open .woocommerce-product-gallery img,
body.rv-modal-open .product .images,
body.rv-modal-open .product .images img {
    position: static !important;
    z-index: 1 !important;
}

/* ---- MODAL ---- */
.rv-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    font-family: 'DM Sans', sans-serif;
    animation: pvSlideUp 0.26s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes pvSlideUp { from{transform:translateY(22px);opacity:0} to{transform:translateY(0);opacity:1} }

.rv-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 0;
}
.rv-modal-title {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: #1a2e1a;
    margin: 0 0 3px;
    font-weight: 400;
}
.rv-modal-sub { font-size: 12px; color: #6b7c6b; margin: 0; }

.rv-close {
    background: #f0faf4;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2d6a4f;
    flex-shrink: 0;
    margin-left: 10px;
}

.rv-modal-body { padding: 14px 20px 20px; }

/* ---- STAPPEN ---- */
.rv-step { display: none; }
.rv-step-active { display: block; }

/* ---- UPLOAD ---- */
.rv-preview-img {
    width: 100%;
    max-height: 175px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    display: none;
}
.rv-upload-area {
    border: 1.5px dashed #b7e4c7;
    border-radius: 12px;
    background: #f9fdfb;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    margin-bottom: 12px;
}
.rv-upload-area:hover { border-color: #52b788; background: #f0faf4; }
.rv-upload-icon {
    width: 44px;
    height: 44px;
    background: #d8f3dc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.rv-upload-area h4 { font-size: 14px; font-weight: 500; color: #1b4332; margin: 0 0 4px; }
.rv-upload-area p  { font-size: 12px; color: #6b7c6b; margin: 0; }

.rv-ceiling-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f3ee;
    border-radius: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
}
.rv-ceiling-row label { font-size: 13px; color: #3a4a3a; flex: 1; margin: 0; }
.rv-ceiling-row select {
    border: 1px solid #d4e6d4;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: #1a2e1a;
    background: #fff;
}

/* ---- BUTTONS ---- */
.rv-btn-primary {
    display: block;
    width: 100%;
    background: #2d6a4f;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.18s;
}
.rv-btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }
.rv-btn-primary:not(:disabled):hover { opacity: 0.86; }

.rv-btn-secondary {
    flex: 1;
    background: #f0faf4;
    border: 1px solid #b7e4c7;
    border-radius: 8px;
    padding: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #1b4332;
    cursor: pointer;
}
.rv-btn-secondary:hover { background: #d8f3dc; }

/* ---- LADEN ---- */
.rv-loading { text-align: center; padding: 22px 0 10px; }
.rv-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #d8f3dc;
    border-top-color: #2d6a4f;
    border-radius: 50%;
    animation: pvSpin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes pvSpin { to{transform:rotate(360deg)} }
.rv-loading h4 { font-size: 15px; font-weight: 500; color: #1a2e1a; margin: 0 0 4px; }
.rv-loading p  { font-size: 12px; color: #6b7c6b; margin: 0; }
.rv-loadbar { height: 3px; background: #d8f3dc; border-radius: 2px; margin: 14px 0 0; overflow: hidden; }
.rv-loadbar-fill {
    height: 100%;
    background: #2d6a4f;
    border-radius: 2px;
    animation: pvLoad 7s ease-in-out forwards;
}
@keyframes pvLoad { 0%{width:0%} 40%{width:55%} 80%{width:83%} 100%{width:93%} }

/* ---- RESULTAAT ---- */
.rv-result-img-wrap { position: relative; margin-bottom: 12px; }
.rv-result-img-wrap img { width: 100%; border-radius: 12px; display: block; }
.rv-result-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(10,30,10,0.58);
    color: #d8f3dc;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
}
.rv-result-info {
    background: #f0faf4;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 12px;
}
.rv-result-info h4 { font-size: 14px; font-weight: 500; color: #1b4332; margin: 0 0 4px; }
.rv-result-info p  { font-size: 12px; color: #3a5a3a; line-height: 1.65; margin: 0; }
.rv-result-actions { display: flex; gap: 8px; }
.rv-btn-cart { flex: 2; }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
    .rv-modal { border-radius: 12px 12px 0 0; max-height: 95vh; }
    .rv-overlay { align-items: flex-end; padding: 0; }
}

/* ---- BETA ---- */
.rv-beta-badge {
    font-size: 10px;
    font-weight: 500;
    background: #2d6a4f;
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: auto;
    letter-spacing: 0.04em;
}
.rv-modal-beta {
    font-size: 11px;
    font-weight: 400;
    background: #d8f3dc;
    color: #1b4332;
    padding: 2px 8px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 6px;
}
.rv-beta-notice {
    font-size: 11px;
    color: #6b7c6b;
    margin: 10px 0 0;
    line-height: 1.5;
    text-align: center;
}