/**
 * Guest Price Control – Front-end styles
 */

/* Login link replacing prices – rendered as <a class="button gpc-login-link">
   so it automatically inherits the active theme's/WooCommerce's button
   styling (colours, shape, hover state, etc.). Only non-visual layout
   helpers live here. */
.gpc-login-link {
    display: inline-block;
    margin: 0.35em 0;
    white-space: nowrap;
    text-align: center;

    /* The theme's .button class is written for a different context (e.g. an
       overlay button positioned over a thumbnail) and sets an absolute
       position with a large negative top offset. Reset that here so our
       button sits inline where the price used to be, not floated away from
       it. Colours/shape from .button are still inherited. */
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* The theme's .price wrapper is normally sized for a single line of plain
   text. Since our button is taller than that text, let the wrapper grow to
   fit it instead of clipping/overlapping the line below, and add a bit of
   breathing room after it (this also spaces it from the "Select options"
   button that follows on variable products). */
.price:has(.gpc-login-link) {
    display: inline-block;
    height: auto;
    line-height: normal;
    overflow: visible;
    margin-bottom: 0.5em;
}

/* Plain text (no URL configured) */
.gpc-login-text {
    font-style: italic;
    color: #767676;
}

/* Guest marked-up price wrapper */
.gpc-guest-price {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

/* Original price shown alongside marked-up price */
.gpc-original-price del {
    font-size: 0.85em;
    color: #767676;
}
