/**
 * PrestaHU
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Commercial License
 * you can't distribute, modify or sell this code
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file
 * If you need help please contact info@presta.hu
 *
 * @author    PrestaHU <info@presta.hu>
 * @copyright PrestaHU
 * @license   commercial
 */
/* Referral programme on the storefront: the referral page, the landing page of a link, the
   product page share box. The look follows the theme (text colour, buttons, fields); only
   spacing and layout are set here. */
.pshuvc-ref {
    --pshuvc-ref-line: rgba(0, 0, 0, 0.12);
    --pshuvc-ref-line: color-mix(in srgb, currentColor 14%, transparent);
    --pshuvc-ref-soft: rgba(0, 0, 0, 0.03);
    --pshuvc-ref-soft: color-mix(in srgb, currentColor 4%, transparent);
    --pshuvc-ref-muted: rgba(0, 0, 0, 0.62);
    --pshuvc-ref-muted: color-mix(in srgb, currentColor 64%, transparent);
    --pshuvc-ref-ok: #1e7e34;
    --pshuvc-ref-error: #b02a37;
    max-width: 52rem;
}
.pshuvc-ref.is-page {
    max-width: none;
}
.pshuvc-ref [hidden] {
    display: none !important;
}
.pshuvc-ref-card {
    margin: 0 0 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--pshuvc-ref-line);
    border-radius: 6px;
    background: var(--pshuvc-ref-soft);
}
.pshuvc-ref-card > :last-child {
    margin-bottom: 0;
}
.pshuvc-ref-lead {
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    line-height: 1.5;
}
.pshuvc-ref-meta {
    display: block;
    color: var(--pshuvc-ref-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}
.pshuvc-ref-h {
    margin: 0 0 0.75rem;
}
.pshuvc-ref-section {
    margin: 0 0 1.5rem;
}
.pshuvc-ref-label {
    display: block;
    margin: 0 0 0.375rem;
    font-weight: 600;
}

/* What each side gets */
.pshuvc-ref-gets {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: 0.5rem 1rem;
    margin: 0 0 1.25rem;
}
.pshuvc-ref-gets dt {
    font-weight: 600;
}
.pshuvc-ref-gets dd {
    margin: 0;
}
.pshuvc-ref-level2 {
    margin-top: 0.25rem;
}

/* Link field with the copy button */
/* In a narrow column (product page on a phone) the button drops under the field, so the link stays readable. */
.pshuvc-ref-field {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}
.pshuvc-ref-field .form-control {
    flex: 999 1 12rem;
    min-width: 0;
    min-height: 44px;
}
.pshuvc-ref-field .pshuvc-ref-copy {
    flex: 1 0 auto;
}
.pshuvc-ref-copy,
.pshuvc-ref-btn,
.pshuvc-ref-send,
.pshuvc-ref .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    white-space: nowrap;
}
.pshuvc-ref-copied {
    margin: 0.375rem 0 0;
    font-size: 0.875rem;
}
.pshuvc-ref-ico {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}
.pshuvc-ref-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}
.pshuvc-ref-mailalt {
    margin: 0.75rem 0 0;
    padding: 0.75rem;
    border: 1px solid var(--pshuvc-ref-line);
    border-radius: 6px;
    background: var(--pshuvc-ref-soft);
}
.pshuvc-ref-mailalt[hidden] {
    display: none;
}
.pshuvc-ref-mailalt-text {
    margin: 0;
    font-size: 0.875rem;
}
.pshuvc-ref-mailalt .pshuvc-ref-buttons {
    margin-top: 0.5rem;
}
.pshuvc-ref-link + .pshuvc-ref-meta,
.pshuvc-ref-code-line {
    margin-top: 0.75rem;
}

/* Counts */
.pshuvc-ref-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}
.pshuvc-ref-stats li {
    padding: 0.875rem 1rem;
    border: 1px solid var(--pshuvc-ref-line);
    border-radius: 6px;
}
.pshuvc-ref.is-page .pshuvc-ref-stats li {
    padding: 1rem 1.25rem;
}
.pshuvc-ref-stat-n {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.pshuvc-ref.is-page .pshuvc-ref-stat-n {
    font-size: 1.75rem;
}

/* Referral page: share and invitation side by side, the two lists side by side */
.pshuvc-ref-card.is-plain {
    background: transparent;
}
.pshuvc-ref-grid > .pshuvc-ref-card,
.pshuvc-ref-lists > .pshuvc-ref-section {
    min-width: 0;
}
@media (min-width: 992px) {
    .pshuvc-ref-grid,
    .pshuvc-ref-lists {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
        align-items: start;
    }
    .pshuvc-ref-grid.is-single {
        grid-template-columns: minmax(0, 1fr);
        max-width: 52rem;
    }
    .pshuvc-ref-grid {
        margin: 0 0 1.5rem;
    }
    .pshuvc-ref-grid > .pshuvc-ref-card {
        margin: 0;
    }
    .pshuvc-ref.is-page > .pshuvc-ref-card {
        max-width: 52rem;
    }
}

/* Invitations */
.pshuvc-ref-invite textarea {
    resize: vertical;
}
.pshuvc-ref-invite .form-group {
    margin: 0 0 1rem;
}
.pshuvc-ref-invite .form-group > .pshuvc-ref-meta {
    margin-top: 0.375rem;
}
.pshuvc-ref-invite .form-group + .form-group {
    margin-top: 1.25rem;
}
.pshuvc-ref-result {
    margin-top: 0.75rem;
    outline: 0;
}
.pshuvc-ref-msg {
    margin: 0 0 0.5rem;
    font-weight: 600;
}
.pshuvc-ref-msg.is-ok {
    color: var(--pshuvc-ref-ok);
}
.pshuvc-ref-msg.is-error {
    color: var(--pshuvc-ref-error);
}
.pshuvc-ref-alert {
    margin: 0 0 0.5rem;
}
.pshuvc-ref-alert-title {
    margin: 0;
    font-weight: 600;
}
.pshuvc-ref-alert-list {
    margin: 0.25rem 0 0;
    overflow-wrap: anywhere;
}
.pshuvc-ref-skipped {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}
.pshuvc-ref-skipped li {
    margin: 0.5rem 0 0;
    overflow-wrap: anywhere;
}
.pshuvc-ref-skipped-email,
.pshuvc-ref-skipped-why {
    display: block;
}

/* Lists: invited customers, rewards */
.pshuvc-ref-rows {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--pshuvc-ref-line);
}
.pshuvc-ref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pshuvc-ref-line);
}
.pshuvc-ref-row-main {
    flex: 1 1 14rem;
    min-width: 0;
    overflow-wrap: anywhere;
}
.pshuvc-ref-tag {
    flex: 0 0 auto;
    padding: 0.125rem 0.625rem;
    border: 1px solid var(--pshuvc-ref-line);
    border-radius: 999px;
    font-size: 0.8125rem;
    line-height: 1.6;
}
.pshuvc-ref-row.is-ordered .pshuvc-ref-tag,
.pshuvc-ref-row.is-active .pshuvc-ref-tag,
.pshuvc-ref-row.is-done .pshuvc-ref-tag {
    font-weight: 600;
}
.pshuvc-ref-row.is-rejected,
.pshuvc-ref-row.is-revoked,
.pshuvc-ref-row.is-expired {
    color: var(--pshuvc-ref-muted);
}
.pshuvc-ref-code {
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
}
.pshuvc-ref-code--big {
    display: block;
    margin: 0.25rem 0;
    font-size: 1.5rem;
}

/* Landing page */
.pshuvc-ref--landing {
    margin: 0 auto;
}
.pshuvc-ref-coupon {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px dashed var(--pshuvc-ref-line);
    border-radius: 6px;
}
.pshuvc-ref-coupon .pshuvc-ref-copy {
    margin-top: 0.5rem;
}
.pshuvc-ref-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Product page */
.pshuvc-ref-slot:empty {
    display: none;
}
.pshuvc-ref--product {
    max-width: none;
    margin: 0.75rem 0;
}
.pshuvc-ref-product {
    border: 1px solid var(--pshuvc-ref-line);
    border-radius: 6px;
}
.pshuvc-ref-product-sum {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.pshuvc-ref-product-sum::-webkit-details-marker {
    display: none;
}
.pshuvc-ref-product-sum::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease-out;
}
.pshuvc-ref-product[open] .pshuvc-ref-product-sum::after {
    transform: rotate(-135deg);
}
.pshuvc-ref-product-body {
    padding: 0 1rem 1rem;
}

@media (max-width: 575px) {
    .pshuvc-ref-card {
        padding: 1rem;
    }
    .pshuvc-ref-gets {
        grid-template-columns: 1fr;
        gap: 0.125rem;
    }
    .pshuvc-ref-gets dd {
        margin-bottom: 0.5rem;
    }
    .pshuvc-ref-stats {
        gap: 0.5rem;
    }
    .pshuvc-ref-stats li {
        padding: 0.625rem;
    }
    .pshuvc-ref-buttons .pshuvc-ref-btn,
    .pshuvc-ref-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
    }
    .pshuvc-ref-send {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pshuvc-ref-product-sum::after {
        transition: none;
    }
}

/* Page title: drawn by the module, some themes leave the page header empty */
.pshuvc-ref-header {
    margin: 0 0 1rem;
}
.pshuvc-ref-header .h1 {
    margin: 0;
    overflow-wrap: anywhere;
}
.pshuvc-ref-nw {
    white-space: nowrap;
}

/* The theme capitalises every word of a button, which breaks Hungarian labels. */
.pshuvc-ref .btn {
    text-transform: none;
}

/* Touch targets: every module button at least 44px high */
.pshuvc-ref .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
