/**
 * Hide Price for WooCommerce — Frontend Styles
 *
 * BEM-style class naming (.hp-*) ensures zero collision with themes.
 * All rules are scoped to plugin-specific elements.
 *
 * @package HidePrice
 */

/* ── Price Message ───────────────────────────────────────────────────────── */
.hp-price-message {
    display: inline-block;
    line-height: 1.5;
    font-size: 0.95em;
    color: #555;
}

.hp-price-message a {
    color: #7f54b3;
    text-decoration: underline;
    font-weight: 500;
}

.hp-price-message a:hover {
    opacity: 0.75;
}

.hp-price-message--archive {
    color: #4a5568;
}

.hp-price-message--single {
    color: #2d3748;
    font-weight: 500;
}

/* ── Login Button – shared base ──────────────────────────────────────────── */
.hp-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.4;
}

.hp-login-btn:focus {
    outline: 2px solid #7f54b3;
    outline-offset: 2px;
}

/* ── Button Style ────────────────────────────────────────────────────────── */
.hp-login-btn.hp-btn-button,
.hp-login-btn.button {
    background-color: #7f54b3;
    color: #fff !important;
    border: 2px solid #7f54b3;
    border-radius: 4px;
    padding: 0.6em 1.4em;
    font-size: 0.95em;
    letter-spacing: 0.02em;
}

.hp-login-btn.hp-btn-button:hover,
.hp-login-btn.button:hover {
    background-color: #6a3f9e;
    border-color: #6a3f9e;
    color: #fff !important;
    transform: translateY(-1px);
}

.hp-login-btn.hp-btn-button:active,
.hp-login-btn.button:active {
    transform: translateY(0);
}

/* ── Link Style ──────────────────────────────────────────────────────────── */
.hp-login-btn.hp-btn-link {
    color: #7f54b3 !important;
    text-decoration: underline !important;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-weight: 600;
}

.hp-login-btn.hp-btn-link:hover {
    color: #5b3b8a !important;
    opacity: 1;
}

/* ── Plain Text Style ────────────────────────────────────────────────────── */
.hp-login-btn.hp-btn-text {
    color: #555 !important;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-weight: normal;
    text-decoration: none !important;
    cursor: default;
    pointer-events: none;
}

/* ── Single Product Wrapper ──────────────────────────────────────────────── */
.hp-single-login-wrap {
    margin: 1.2em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    align-items: center;
}

/* ── Loop / Shop Card Wrapper ────────────────────────────────────────────── */
.hp-loop-login-wrap {
    margin-top: 0.6em;
    text-align: center;
}

.hp-loop-login-wrap .hp-login-btn.hp-btn-button {
    width: 100%;
    justify-content: center;
}

/* ── CTA Block (message + button) ───────────────────────────────────────── */
.hp-cta-block {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
}

.hp-cta-message {
    line-height: 1.45;
}

.hp-cta-button {
    display: inline-flex;
}

.hp-cta-archive {
    align-items: stretch;
}

.hp-cta-archive .hp-cta-button .hp-login-btn.hp-btn-button,
.hp-cta-archive .hp-cta-button .hp-login-btn.button {
    width: 100%;
}

.hp-cta-single {
    align-items: flex-start;
}

.hp-cta-single .hp-cta-message {
    max-width: 42ch;
}

/* ── Shortcode wrapper ───────────────────────────────────────────────────── */
.hp-shortcode {
    display: inline-block;
}

/* ── Compatibility Layer Output Wrapper ─────────────────────────────────── */
.hp-compat-replace {
    display: inline-block;
    max-width: 100%;
}

/* ── Request Quote CTA ───────────────────────────────────────────────────── */
.hp-request-quote-btn {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
}

.hp-request-quote-btn:hover {
    background-color: #0b5f59 !important;
    border-color: #0b5f59 !important;
}

/* ── Hidden Price Placeholder (cart / mini-cart / widgets) ────────────────── */
.hp-hidden-price {
    display: inline-block;
    font-style: italic;
    color: #999;
    font-size: 0.9em;
}

/* ── Grouped Product Table ───────────────────────────────────────────────── */
.hp-grouped-hidden .woocommerce-grouped-product-list-item__price {
    visibility: hidden;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 480px ) {
    .hp-single-login-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .hp-single-login-wrap .hp-login-btn.hp-btn-button {
        width: 100%;
        text-align: center;
    }

    .hp-cta-single .hp-cta-button,
    .hp-cta-single .hp-cta-button .hp-login-btn.hp-btn-button,
    .hp-cta-single .hp-cta-button .hp-login-btn.button {
        width: 100%;
    }
}
