/**
 * Revaya template isolation.
 *
 * Loaded before revaya-product.css and only inside the .rv wrapper.
 *
 * How this works:
 *   `all: revert` rolls every property back to the browser default, which
 *   discards author styles coming from the theme, Elementor, WooCommerce and
 *   any other plugin. It is placed inside a cascade layer, and unlayered
 *   styles always beat layered ones no matter their specificity, so the
 *   template's own stylesheet still applies in full without needing
 *   !important on every rule.
 *
 * Nothing outside .rv is touched, so the Elementor header and footer keep
 * their own styling.
 */

@layer rv-reset, rv-base;

/* ---- 1. wipe every inherited author style inside the template ---- */
@layer rv-reset {
  /* svg and everything inside it is excluded on purpose.
     `all: revert` resets the geometry presentation attributes
     (d, cx, cy, r, x, y, points) to their initial value, which erases
     inline SVG icons in Chromium. Never include svg in this selector. */
  .rv,
  .rv *:not(svg):not(svg *),
  .rv *:not(svg):not(svg *)::before,
  .rv *:not(svg):not(svg *)::after {
    all: revert;
  }
}

/* ---- 2. lay down a clean baseline the template expects ---- */
@layer rv-base {

  .rv,
  .rv *,
  .rv *::before,
  .rv *::after {
    box-sizing: border-box;
    min-width: 0;
  }

  .rv {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    float: none;
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    font-variant: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  .rv section,
  .rv div,
  .rv article,
  .rv aside {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    float: none;
    clear: none;
  }

  .rv h1, .rv h2, .rv h3, .rv h4, .rv h5, .rv h6,
  .rv p, .rv figure, .rv blockquote, .rv dl, .rv dd, .rv dt {
    margin: 0;
    padding: 0;
    font-weight: inherit;
    text-transform: none;
  }

  .rv ul, .rv ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .rv li { margin: 0; padding: 0; }

  .rv img, .rv video, .rv picture, .rv canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: none;
  }
  /* svg keeps whatever the template gives it, nothing is reset here */
  .rv svg { display: block; max-width: 100%; overflow: visible; }

  .rv a {
    color: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    box-shadow: none;
    transition: none;
  }
  .rv a:hover, .rv a:focus { text-decoration: none; }

  .rv button, .rv input, .rv select, .rv textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    margin: 0;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
  }
  .rv button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-transform: none;
    box-shadow: none;
    width: auto;
    line-height: inherit;
  }

  .rv form { margin: 0; padding: 0; border: 0; background: none; }

  .rv table { border-collapse: collapse; border-spacing: 0; width: 100%; }
  .rv th, .rv td { padding: 0; border: 0; text-align: left; background: none; }

  .rv details { margin: 0; border: 0; background: none; }
  .rv summary { display: block; list-style: none; cursor: pointer; }
  .rv summary::-webkit-details-marker,
  .rv summary::marker { display: none; content: ""; }

  .rv hr { display: none; }

  /* explicit type sizes, so no element can inherit an unexpected size */
  .rv p, .rv li, .rv dd, .rv dt, .rv span, .rv a, .rv td, .rv th,
  .rv button, .rv input, .rv label, .rv summary, .rv b, .rv strong, .rv em, .rv s {
    font-size: inherit;
    line-height: inherit;
  }
  .rv b, .rv strong { font-weight: 600; }
  .rv em { font-style: normal; }
  .rv small { font-size: .8em; }
  .rv s { text-decoration: line-through; }

  /* WooCommerce price markup keeps whatever the template gives it */
  .rv .woocommerce-Price-amount,
  .rv .woocommerce-Price-currencySymbol,
  .rv bdi {
    font: inherit;
    color: inherit;
    background: none;
    letter-spacing: inherit;
  }

  /* stray theme pseudo elements */
  .rv .wrap::before, .rv .wrap::after,
  .rv section::before, .rv section::after { content: none; }
}
