/* One review-form skin: the same DOM form moves between tab and modal. */
body.single-product #review_form { width:100%; min-width:0; }
body.single-product #review_form #respond { margin:0!important; padding:0!important; background:transparent!important; border:0!important; }
body.single-product #review_form #reply-title { display:block;margin:0 0 12px!important;padding:0!important;font:700 22px/1.35 var(--hdme-font-head);color:#152b49; }
body.single-product #review_form .comment-form { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 18px;margin:0!important; }
body.single-product #review_form .comment-form > * { grid-column:1/-1;min-width:0; }
body.single-product #review_form .comment-form > p { margin:0!important;padding:0!important;width:auto!important;float:none!important; }
body.single-product #review_form .comment-form > .comment-form-author,
body.single-product #review_form .comment-form > .comment-form-email { grid-column:auto; }
body.single-product #review_form .comment-notes { color:#63758b;font-size:14px;line-height:1.65; }
body.single-product #review_form label { display:block;margin:0 0 8px!important;font-size:15px;font-weight:600;line-height:1.5;color:#1e3d68; }
body.single-product #review_form :is(input[type=text],input[type=email],textarea) { display:block;box-sizing:border-box;width:100%!important;max-width:100%;min-height:46px;border:1px solid #aec4e0!important;border-radius:9px!important;background:#fff!important;color:#152b49;padding:11px 13px!important;font:400 16px/1.5 var(--hdme-font-body);box-shadow:none!important; }
body.single-product #review_form textarea { min-height:150px;resize:vertical; }
body.single-product #review_form :is(input,textarea):focus-visible { outline:2px solid #3366ad;outline-offset:2px; }
body.single-product #review_form .comment-form-cookies-consent { display:flex;align-items:flex-start;gap:10px; }
body.single-product #review_form .comment-form-cookies-consent input { flex:0 0 18px;width:18px;height:18px;margin:3px 0 0;accent-color:#3366ad; }
body.single-product #review_form .comment-form-cookies-consent label { font-size:13px;font-weight:400;color:#63758b;margin:0!important; }
body.single-product #review_form input[type=submit] { min-height:46px;width:auto!important;padding:12px 24px!important;border:0!important;border-radius:9px!important;background:#3366ad!important;color:#fff!important;font:600 15px/1.4 var(--hdme-font-body);box-shadow:none!important;cursor:pointer; }
body.single-product #review_form input[type=submit]:hover { background:#28518a!important; }

/* Keep WooCommerce's links and accessible labels, but render one clear star each. */
body.single-product #review_form p.stars { margin:0!important;padding:0!important;line-height:1; }
body.single-product #review_form p.stars > span { display:flex;flex-wrap:wrap;gap:8px; }
body.single-product #review_form p.stars a { position:relative!important;display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;height:44px!important;padding:0!important;margin:0!important;border:1px solid #d6e5f7!important;border-radius:9px;background:#fff!important;color:#8293aa!important;font-size:0!important;text-indent:0!important;overflow:hidden;text-decoration:none; }
body.single-product #review_form p.stars a::before { content:'\2605'!important;position:static!important;display:block!important;width:auto!important;height:auto!important;color:inherit!important;font:28px/1 Arial,sans-serif!important;text-indent:0!important; }
body.single-product #review_form p.stars a::after { display:none!important; }
body.single-product #review_form p.stars.selected a { color:#3366ad!important;background:#eef4fc!important;border-color:#aecbef!important; }
body.single-product #review_form p.stars.selected a.active ~ a { color:#8293aa!important;background:#fff!important;border-color:#d6e5f7!important; }
body.single-product #review_form p.stars a:hover { color:#3366ad!important;border-color:#3366ad!important; }
body.single-product #review_form p.stars a:focus-visible { outline:2px solid #3366ad;outline-offset:2px; }

/* Tab: balanced columns, compact heading rhythm, readable review cards. */
#wrapper .hdme-product__details #tab-reviews { padding-top:0!important;border:0; }
#wrapper .hdme-product__details #reviews { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px;align-items:start; }
#wrapper .hdme-product__details #reviews #comments { min-width:0; }
#wrapper .hdme-product__details #reviews .woocommerce-Reviews-title { margin:0 0 16px!important;font-size:22px;line-height:1.35;color:#152b49; }
#wrapper .hdme-product__details #review_form_wrapper { margin:0!important;padding:24px!important;border:1px solid #d6e5f7;background:#f7faff;border-radius:16px;min-width:0; }
#wrapper .hdme-product__details #reviews .commentlist { padding:0;margin:0;list-style:none; }
#wrapper .hdme-product__details #reviews .commentlist > li { margin:0 0 16px!important;padding:20px!important;border:1px solid #d6e5f7;background:#fff;border-radius:14px; }
#wrapper .hdme-product__details #reviews .comment_container { display:grid;grid-template-columns:40px minmax(0,1fr);gap:14px; }
#wrapper .hdme-product__details #reviews .avatar { position:static!important;float:none!important;width:40px!important;height:40px!important;border:0;border-radius:50%;margin:0!important;padding:0!important; }
#wrapper .hdme-product__details #reviews .comment-text { margin:0!important;padding:0!important;border:0!important;min-width:0; }
#wrapper .hdme-product__details #reviews .comment-text .star-rating { float:none;margin:0 0 8px;color:#3366ad; }
#wrapper .hdme-product__details #reviews .comment-text p { margin:8px 0 0;font-size:15px;line-height:1.65;overflow-wrap:anywhere; }
#wrapper .hdme-product__details #reviews .comment-text .meta { font-size:13px;color:#63758b; }
#wrapper .hdme-product__details .woocommerce-noreviews { margin:0;padding:20px;border:1px solid #d6e5f7;border-radius:14px;background:#eef4fc;font-size:15px; }

/* Modal: close control stays reachable while only the form scrolls. */
.hdme-review-modal .hdme-review-modal__dialog { display:grid;grid-template-rows:auto minmax(0,1fr);max-height:calc(100dvh - 48px);width:min(740px,100%);overflow:hidden;border:1px solid #d6e5f7;border-radius:20px; }
.hdme-review-modal .hdme-review-modal__head { padding:24px 60px 22px;background:#eef4fc;border-bottom:1px solid #d6e5f7; }
.hdme-review-modal .hdme-review-modal__head h2 { margin:0 0 8px;color:#152b49;font:700 24px/1.3 var(--hdme-font-head); }
.hdme-review-modal .hdme-review-modal__head p { font-size:14px;line-height:1.5;margin:8px 0 16px; }
.hdme-review-modal .hdme-review-modal__stars { color:#3366ad;font-size:24px; }
.hdme-review-modal .hdme-review-modal__write { background:#3366ad;border-radius:9px;font-size:14px; }
.hdme-review-modal .hdme-review-modal__close { width:44px;height:44px;top:10px;right:10px;background:#fff;color:#1e3d68;border:1px solid #d6e5f7; }
.hdme-review-modal .hdme-review-modal__close:focus-visible { outline:2px solid #3366ad;outline-offset:2px; }
.hdme-review-modal .hdme-review-modal__form { overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable; }
.hdme-review-modal .hdme-review-modal__form #review_form_wrapper { padding:24px!important; }
@media(max-width:900px) { #wrapper .hdme-product__details #reviews { grid-template-columns:1fr; } }
@media(max-width:520px) {
 body.single-product #review_form .comment-form { grid-template-columns:1fr;gap:18px; }
 #wrapper .hdme-product__details #review_form_wrapper { padding:18px!important; }
 .hdme-review-modal .hdme-review-modal__dialog { max-height:calc(100dvh - 16px);border-radius:14px; }
 .hdme-review-modal .hdme-review-modal__head { padding:22px 48px 18px 18px;text-align:left; }
 .hdme-review-modal .hdme-review-modal__head h2 { font-size:21px; }
 .hdme-review-modal .hdme-review-modal__form #review_form_wrapper { padding:20px 16px!important; }
 #wrapper .hdme-product__details #reviews .comment_container { grid-template-columns:1fr; }
}
