/* Estética compartida de formularios, acciones y opiniones. */
.af-store-hero, .af-user-area-banner, .af-book-detail, .afw-single, .afs-single,
.af-book-card, .afw-card, .afs-card, .afw-account, .af-related-disclosure, .af-product-modal, .af-book-review-modal, .afw-login-form { caret-color: transparent; }
:is(.af-store-hero, .af-user-area-banner, .af-book-detail, .afw-single, .afs-single, .afw-account, .af-product-modal, .af-book-review-modal, .afw-login-form) :is(input, textarea, [role="textbox"]) { caret-color: auto; }
.af-user-area-login form { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 132px !important; gap: 12px !important; align-items: end !important; }
.af-user-area-login form > p { margin: 0 !important; padding: 0 !important; min-width: 0; }
.af-user-area-login form label { display: block !important; margin: 0 0 10px !important; line-height: 1.4 !important; font-size: 13px !important; }
.af-user-area-login form :is(input[type="text"], input[type="password"]) { display: block !important; width: 100% !important; height: 50px !important; min-height: 50px !important; padding: 12px 16px !important; margin: 0 !important; border: 0 !important; border-radius: 9px !important; box-sizing: border-box !important; line-height: normal !important; }
.af-user-area-login .login-submit { display: flex !important; align-items: end !important; height: 50px !important; }
.af-user-area-login .login-submit input { width: 132px !important; height: 50px !important; min-height: 50px !important; margin: 0 !important; box-sizing: border-box !important; }
.af-user-area-login .login-remember { grid-column: 1 / -1; }
.af-user-area-copy h2, .af-user-area-summary { font-size: 24px !important; }
.af-user-area-greeting, .af-user-area-copy p { font-size: 16px !important; }
:is(.af-button, .af-card-view, .afw-button, .afs-button, .af-user-area-button, .af-book-review-open, .af-book-review-form-actions button, .afw-review-form button, .afw-review-form .afw-button, .af-recovery-submit, .af-user-area-login .login-submit input, .af-product-search-button, .af-button-buy, .af-button-sample) {
  position: relative; display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  padding: 14px 20px; min-height: 50px; border: 0 !important; border-radius: 9px !important;
  background: #ffb000 !important; color: #00376b !important; font-weight: 700; font-size: 13px !important;
  line-height: 1.25; text-align: center; text-decoration: none !important; box-sizing: border-box;
  cursor: pointer; overflow: hidden; box-shadow: 0 8px 18px rgba(0, 40, 80, .1);
  transition: background .2s, color .2s, transform .2s, box-shadow .2s !important;
}
:is(.af-user-area-button, .af-recovery-submit, .af-user-area-login .login-submit input) { width: 132px !important; height: 50px !important; flex: 0 0 132px; white-space: nowrap; padding: 10px 8px; }
:is(.af-button, .af-card-view, .afw-button, .afs-button, .af-user-area-button, .af-book-review-open, .af-book-review-form-actions button, .afw-review-form button, .af-recovery-submit, .af-user-area-login .login-submit input, .af-product-search-button, .af-button-buy, .af-button-sample):is(:hover, :focus-visible) { background: #062763 !important; color: #fdc800 !important; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 40, 80, .2), inset 0 -3px #ffb000; }
:is(.af-button, .afw-button, .afs-button, .af-book-review-form-actions button):disabled { cursor: wait; opacity: .6; transform: none; }
.afw-star, .afs-star { font-size: 21px !important; line-height: 1; }
.afw-rating-text, .afs-rating-text { font-size: 13px !important; }
.afw-rating, .afs-rating { gap: 3px; align-items: center; flex-wrap: wrap; }
.af-book-reviews-section, .afw-reviews, .af-product-reviews { border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: 28px 0 !important; margin: 28px 0; }
.af-book-reviews-heading, .afw-reviews > header, .af-product-reviews-heading { border-bottom: 2px solid #ffb000; padding-bottom: 14px; margin: 0 0 22px; }
.af-book-reviews-heading h2, .afw-reviews > header h2, .af-product-reviews-heading h2 { font-size: 25px; font-weight: 700; color: #00376b; margin: 0; }
.af-own-review { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #d4e2ed; }
.af-own-review > summary { color: #00376b; cursor: pointer; font-size: 20px; font-weight: 600; padding: 12px 0; }
.af-own-review .af-book-review-actions { padding-top: 15px; display: flex; flex-wrap: wrap; gap: 12px; }
.af-review-score-field { border: 0; margin: 12px 0; padding: 0; }
.af-review-score-field legend { padding: 0; font-weight: 600; margin-bottom: 8px; }
.af-review-score-control { display: flex; align-items: center; gap: 18px; }
.af-review-score-options { display: flex; align-items: center; position: relative; gap: 4px; }
.af-review-score-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.af-book-review-dialog .af-review-score-options input { min-height: 1px; padding: 0; border: 0; margin: 0; }
.af-book-review-dialog .af-review-score-options label { font-size: 28px; }
.af-book-review-dialog .af-review-field-error { display: block; color: #a72525; font-size: 13px; font-weight: 600; margin-top: 6px; }
.af-book-review-dialog .af-review-field-error.is-success { color: #087d46; }
.af-book-review-dialog .af-review-field-error[hidden] { display: none !important; }
.af-review-score-options label { display: inline-block !important; color: #c3cfdc; font-size: 28px; cursor: pointer; margin: 0 !important; padding: 0; line-height: 1.2; }
.af-review-score-options label.is-selected, .af-review-score-options label:hover { color: #ef9900; }
.af-review-score-options input:focus-visible + label { outline: 2px solid #147efb; outline-offset: 3px; }
.af-review-score-control output { font-size: 20px; font-weight: 700; color: #00376b; }
.af-review-scroll > header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.af-review-scroll h3 { margin: 0; color: #00376b; font-size: 22px; }
.af-review-scroll-actions { display: flex; gap: 8px; }
.af-review-scroll-actions button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #ffb000; color: #00376b; cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.af-review-scroll-actions button:hover:not(:disabled) { background: #062763; color: #fff; transform: translateY(-2px); }
.af-review-scroll-actions button:disabled { opacity: .4; cursor: default; }
.af-review-scroll-actions svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-review-scroll-viewport { max-height: 430px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.af-public-review { padding: 20px 0; border-bottom: 1px solid #d4e2ed; color: #00376b; }
.af-public-review > header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.af-public-review time { margin-left: auto; color: #687e96; font-size: 12px; }
.af-public-review small { color: #687e96; }
.af-public-review-score { display: flex; gap: 10px; align-items: center; }
.af-public-review-score > span { color: #ef9900; font-size: 21px; }
.af-public-review-score b { font-size: 16px; }
.af-public-review p { margin: 0 0 8px; }
.af-review-empty { color: #687e96; margin: 10px 0; }
.af-product-modal[hidden], .af-email-warning[hidden], [data-af-product-company][hidden], [data-af-book-format-choice][hidden] { display: none !important; }
.af-product-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px; }
.af-product-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 22, 50, .72); }
.af-product-modal-dialog { position: relative; width: min(100%, 760px); max-height: 90vh; overflow-y: auto; padding: 32px; background: #fff; border-radius: 20px; color: #00376b; box-shadow: 0 24px 90px rgba(0,0,0,.3); }
.af-product-modal-dialog h2 { color: #00376b; font-size: 25px; margin: 0 36px 14px 0; }
.af-product-modal-close { position: absolute; top: 14px; right: 14px; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 26px; background: #ffb000; color: #00376b; cursor: pointer; }
.af-product-modal-open { overflow: hidden; }
.af-product-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.af-product-form-grid label { display: block; font-size: 14px; font-weight: 600; }
.af-product-form-grid :is(input, select) { display: block; width: 100%; box-sizing: border-box; margin-top: 7px; min-height: 46px; padding: 10px 12px; border: 1px solid #c7d8e9; border-radius: 8px; background: #fff; color: #00376b; caret-color: auto; }
.af-email-warning { display: block; margin-top: 7px; color: #b42828; font-size: 13px; font-weight: 400; }
.af-email-warning a { color: #00376b; text-decoration: underline; }
.af-product-consent { display: flex !important; gap: 10px; align-items: flex-start; margin: 20px 0; font-size: 14px; }
.af-product-consent input { width: 18px !important; height: 18px; min-height: 18px; padding: 0; flex: 0 0 18px; margin-top: 3px; }
.af-product-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.af-product-form-message { margin-top: 15px; font-size: 14px; }
.af-product-form-message.is-error { color: #b42828; }
.af-all-related-sections { width: 100%; border-top: 1px solid #d4e2ed; }
.af-book-review-dialog .af-review-score-field, .afw-review-form .af-review-score-field { grid-column: 1 / -1; }
.afw-review-form textarea, .af-product-review-form textarea { display: block; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #c7d8e9; border-radius: 8px; margin: 8px 0 16px; caret-color: auto; }
:is(.af-button, .af-card-view, .afw-button, .afs-button, .af-user-area-button, .af-book-review-open, .af-product-search-button)::before { background: #ffb000 !important; }
:is(.af-store-scroll-actions button, .af-book-review-close, .af-product-modal-close, .af-sample-modal button) { background: #ffb000 !important; color: #00376b !important; border-color: transparent !important; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
:is(.af-store-scroll-actions button, .af-book-review-close, .af-product-modal-close, .af-sample-modal button):is(:hover, :focus-visible):not(:disabled) { background: #062763 !important; color: #fdc800 !important; }
:is(.af-store-scroll-actions button, .af-book-review-close, .af-product-modal-close, .af-sample-header-actions button, .af-sample-footer button):is(:hover, :focus-visible):not(:disabled) { transform: translateY(-2px); }
.af-store-scroll-actions button:disabled { opacity: .4; cursor: default; }
/* Una sola separación tras las reseñas: no se acumulan bordes del último artículo y relacionados. */
:is(.af-book-reviews-section, .afw-reviews, .af-product-reviews) { border-bottom: 1px solid #d4e2ed !important; }
.af-public-review:last-child { border-bottom: 0; }
.af-all-related-sections { border-top: 0; }
:is(.af-book-reviews-section, .afw-reviews, .af-product-reviews) ~ .af-all-related-sections > .af-related-disclosure:first-child { border-top: 0; margin-top: 0; }
/* Diálogo aislado del tema, común a valoraciones, inscripción y compra. */
.af-product-modal { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100vh; height: 100dvh; padding: 20px !important; margin: 0 !important; display: grid; place-items: center; box-sizing: border-box; z-index: 999999; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.5; text-align: left; }
.af-product-modal:not([hidden]) { display: grid !important; }
.af-product-modal *, .af-product-modal *::before, .af-product-modal *::after { box-sizing: border-box; }
.af-product-modal .af-product-modal-dialog { position: relative !important; width: min(100%, 760px) !important; min-width: 0 !important; max-width: 760px !important; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); padding: 32px !important; margin: 0 !important; border: 0 !important; border-radius: 20px !important; background: #fff !important; color: #00376b !important; text-align: left !important; transform: none !important; z-index: 1; overflow-y: auto; }
.af-product-modal .af-product-modal-dialog h2 { margin: 0 44px 14px 0 !important; font-size: 25px !important; line-height: 1.25; color: #00376b !important; }
.af-product-modal .af-product-modal-close { position: absolute !important; top: 14px !important; right: 14px !important; display: grid !important; place-items: center !important; width: 36px !important; height: 36px !important; min-width: 36px !important; min-height: 36px !important; max-width: 36px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; line-height: 1; }
.af-product-modal-close svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.af-product-form-actions, .af-book-review-form-actions { display: flex !important; justify-content: center !important; align-items: center; flex-wrap: wrap; gap: 12px; width: 100%; margin-top: 20px; }
.af-product-form-actions .af-button { width: auto !important; min-width: min(230px, 100%); max-width: 100%; margin: 0 !important; }
.af-product-modal .af-book-review-dialog form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.af-product-modal .af-book-review-dialog :is(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select, textarea) { width: 100% !important; max-width: 100%; min-width: 0; font-size: 15px; padding: 10px 12px; }
.af-product-modal .af-book-review-dialog .af-review-score-options { justify-content: flex-start; }
.af-product-modal .af-book-review-dialog .af-review-score-options input { width: 1px !important; height: 1px; min-height: 1px; margin: 0; padding: 0; }
.af-product-modal .af-book-review-dialog .af-review-score-options label { font-size: 28px; line-height: 1.2; }
body.af-review-modal-open { overflow: hidden; }
@media (max-width: 640px) {
  .af-user-area-login form { grid-template-columns: 1fr !important; }
  .af-user-area-login .login-submit { grid-column: 1 !important; }
  .af-search-user-panel .af-user-area-login .login-password { grid-column: 1 !important; }
  .af-product-form-grid { grid-template-columns: 1fr; }
  .af-product-modal .af-product-modal-dialog { padding: 24px 18px !important; }
  .af-user-area-greeting, .af-user-area-copy p { font-size: 14px !important; }
}
@media (prefers-reduced-motion: reduce) { :is(.af-button, .af-card-view, .afw-button, .afs-button, .af-user-area-button, .af-book-review-open, .af-book-review-form-actions button, .af-recovery-submit, .af-user-area-login .login-submit input, .af-product-search-button, .af-review-scroll-actions button) { transition: none !important; transform: none !important; } }
