/**
 * Puppia_ReviewPanel — slide-out panel, 50% width from the right.
 *
 * Self-contained: no dependency on the SizeChart module's stylesheet.
 * Class names are namespaced pup-review-* to avoid collisions.
 */

.pup-review-overlay {
    background: rgba(0, 0, 0, 0.45);
    bottom: 0;
    display: none;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 0.34s ease;
    z-index: 1000;
}

.pup-review-overlay.pup-review-open {
    display: block;
}

.pup-review-overlay.pup-review-visible {
    opacity: 1;
}

.pup-review-panel {
    background: #fff;
    bottom: 0;
    box-shadow: -2px 0 18px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.34s ease;
    width: 50%;
}

.pup-review-overlay.pup-review-visible .pup-review-panel {
    transform: translateX(0);
}

/* ── Header ── */

.pup-review-panel-header {
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 20px 24px;
}

.pup-review-panel-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.pup-review-close-btn {
    background: none;
    border: 0;
    border-radius: 0;
    color: #333;
    cursor: pointer;
    line-height: 0;
    padding: 4px;
}

.pup-review-close-btn:hover {
    opacity: 0.6;
}

.pup-review-close-btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* ── Body ── */

.pup-review-panel-body {
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
}

/*
 * Core review markup lands inside .pup-review-content. Magento's own styles
 * assume a full-width tab, so a few widths are relaxed here to suit a
 * narrower panel.
 */
.pup-review-content .block.review-add,
.pup-review-content .block.review-list {
    margin: 0 0 32px;
    width: 100%;
}

.pup-review-content .review-form,
.pup-review-content .review-fieldset {
    max-width: 100%;
    width: 100%;
}

.pup-review-content .review-field-nickname input,
.pup-review-content .review-field-summary input,
.pup-review-content .review-field-text textarea {
    box-sizing: border-box;
    width: 100%;
}

.pup-review-content .review-field-ratings {
    margin-bottom: 20px;
}

/* Keep the star control from wrapping awkwardly in a narrow panel */
.pup-review-content .review-control-vote {
    display: inline-block;
}

/* ── Mobile: full width ── */

@media (max-width: 767px) {
    .pup-review-panel {
        width: 100%;
    }

    .pup-review-panel-header,
    .pup-review-panel-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ── Summary block is a trigger: show it as clickable ── */

.product-reviews-summary .rating-summary,
.product-reviews-summary .reviews-actions a {
    cursor: pointer;
}
