/* Piggo order flow - dedicated stylesheet, loads only on order-form pages. */

/* ---------- Layout ---------- */

/* The shared theme stretches .container-md to 1400px/95vw, which runs the order
   flow edge to edge and leaves no page background visible.
   Constrain our own wrapper rather than the theme's container: the portal's
   footer is rendered inside that container, so narrowing it narrowed the footer
   too - leaving the nav, the content and the footer at three different widths
   on order pages only. This keeps the whole shared chrome untouched. */
.piggo-flow {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.piggo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1.25rem;
    align-items: start;
}

.piggo-main {
    min-width: 0;
}

.piggo-aside {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 991px) {
    .piggo-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .piggo-aside {
        position: static;
        margin-top: 1.5rem;
    }
}

/* ---------- Stepper ---------- */

.piggo-stepper {
    display: flex;
    align-items: flex-start;
    margin: 0 0 1.5rem 0;
}

.piggo-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
    flex-shrink: 0;
}

.piggo-stepper-node {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--bg-2);
    border: 2px solid var(--border);
    color: var(--dim);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.piggo-stepper-item-done .piggo-stepper-node {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.piggo-stepper-item-current .piggo-stepper-node {
    background: var(--bg-1);
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.piggo-stepper-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dim);
}

.piggo-stepper-item-done .piggo-stepper-label {
    color: var(--muted);
}

.piggo-stepper-item-current .piggo-stepper-label {
    color: var(--text);
}

a.piggo-stepper-label:hover {
    color: var(--blue);
}

.piggo-stepper-connector {
    flex: 1 1 auto;
    height: 2px;
    background: var(--border);
    margin-top: 17px;
    min-width: 20px;
}

.piggo-stepper-connector-done {
    background: var(--blue);
}

@media (max-width: 575px) {
    .piggo-stepper-label {
        display: none;
    }
    .piggo-stepper-item {
        width: auto;
    }
}

/* ---------- Shared step chrome ---------- */

.piggo-step-heading h1 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 0.2rem 0;
    color: var(--text);
}

.piggo-step-heading p {
    color: var(--muted);
    font-size: 0.9375rem;
    margin: 0 0 1.25rem 0;
}

/* Tighten the generous portal-wide card padding for the order flow. */
.piggo-main > .card > .card-body,
.piggo-aside .card > .card-body {
    padding: 1.25rem !important;
}

.piggo-aside .card > .card-header {
    padding: 1.1rem 1.25rem 0.4rem 1.25rem !important;
    font-size: 1.0625rem !important;
}

.piggo-section-title {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    margin: 1.25rem 0 0.75rem 0;
    color: var(--text);
}

.piggo-section-title:first-child {
    margin-top: 0;
}

/* ---------- Step 1: Configure - plan recap ---------- */

.piggo-plan-recap {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}

.piggo-plan-recap-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.piggo-plan-recap-name {
    font-weight: 700;
    color: var(--text);
}

.piggo-plan-recap-meta {
    color: var(--muted);
    font-size: 0.875rem;
}

.piggo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 575px) {
    .piggo-field-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Step 2: Account ---------- */

.piggo-account-toggle {
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--muted);
}

/* These two cards hold content directly, with no .card-body, so the theme's
   bare .card padding (0.5rem) applies instead of the 1.25rem every other card
   in the flow gets. Match the rest explicitly. */
.piggo-why-card,
.piggo-note-card {
    padding: 1.25rem !important;
}

.piggo-why-card {
    text-align: center;
}

/* Mascot art. images/why-account.png is 2x (176px tall) for sharp high-DPI screens. */
.piggo-why-figure {
    height: 88px;
    margin-bottom: 0.75rem;
}

.piggo-why-figure img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
}

.piggo-why-title {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text);
    margin: 0 0 0.875rem 0;
}

.piggo-why-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.piggo-why-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.piggo-why-list i {
    color: var(--blue);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Payment-security reassurance, shown ahead of the payment step. Copy tracks
   piggo.host/blog/how-piggo-handles-your-payment-details - keep them in sync. */
.piggo-note-card {
    margin-top: 0.875rem;
}

.piggo-note-title {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.piggo-note-title i {
    color: var(--green);
    margin-right: 0.375rem;
}

.piggo-note-card p {
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.55;
    margin: 0 0 0.625rem 0;
}

.piggo-note-card a {
    font-size: 0.8125rem;
    font-weight: 600;
}

.piggo-note-card a i {
    font-size: 0.6875rem;
    margin-left: 0.2rem;
}

.piggo-field-status {
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.piggo-field-status.is-ok { color: var(--green); }
.piggo-field-status.is-bad { color: var(--red); }

/* ---------- Step 3: Payment tiles ---------- */

.piggo-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.piggo-tile {
    position: relative;
    display: block;
    cursor: pointer;
}

.piggo-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.piggo-tile-body {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: var(--bg-2);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.125rem;
    transition: border-color 0.15s, background 0.15s;
}

.piggo-tile:hover .piggo-tile-body {
    border-color: rgba(255, 255, 255, 0.25);
}

.piggo-tile input[type="radio"]:checked ~ .piggo-tile-body,
.piggo-tile.is-selected .piggo-tile-body {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.08);
}

.piggo-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-1);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.piggo-tile input[type="radio"]:checked ~ .piggo-tile-body .piggo-tile-icon,
.piggo-tile.is-selected .piggo-tile-icon {
    background: var(--blue);
    color: #fff;
}

.piggo-tile-title {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9375rem;
}

.piggo-tile-desc {
    color: var(--dim);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.piggo-tile-check {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.piggo-tile input[type="radio"]:checked ~ .piggo-tile-body .piggo-tile-check,
.piggo-tile.is-selected .piggo-tile-check {
    border-color: var(--blue);
    background: var(--blue) center center no-repeat;
    background-size: 12px 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.5 4.5l-7 7L3 8'/%3E%3C/svg%3E");
}

.piggo-tile-check svg { display: none; }

.piggo-security-note {
    color: var(--dim);
    font-size: 0.8125rem;
    margin: -0.5rem 0 1.25rem 0;
}

.piggo-security-note i {
    color: var(--green);
}

/* ---------- Order Summary sidebar ---------- */

.piggo-summary-card .card-header {
    font-family: 'Ubuntu', sans-serif;
}

.piggo-trust-list {
    list-style: none;
    margin: 1rem 0 0 0;
    padding: 0.875rem 0 0 0;
    border-top: 1px solid var(--border);
}

.piggo-trust-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.8125rem;
    padding: 0.25rem 0;
    text-align: center;
}

.piggo-trust-list i {
    color: var(--green);
    width: 14px;
}

/* .order-guarantee, .order-cart-card, .order-cart-mascot, .order-sticky-actions,
   .order-package-chip, .order-trust-badge, .required-marker are already styled
   in echotrophe-theme.css (shared with the standard pack) - intentionally not
   redefined here, so both packs stay in sync and the standard rollback keeps
   working unmodified. */

/* ---------- Step 4: Confirmation ---------- */

.piggo-confirm-hero {
    text-align: center;
    padding: 1rem 0 1.5rem 0;
}

.piggo-confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.15);
    color: var(--green);
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.piggo-confirm-hero h1 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.piggo-confirm-hero p {
    color: var(--muted);
    margin: 0;
}

.piggo-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.piggo-confirm-links {
    text-align: center;
    color: var(--dim);
    font-size: 0.875rem;
}

.piggo-confirm-links a {
    margin: 0 0.5rem;
}

/* .order-sticky-actions, .required-marker, .order-package-chip, .order-trust-badge
   are already styled in echotrophe-theme.css - see note above. */

/* ---------- Sidebar cart + totals ---------- */

/* Bootstrap's .table-responsive forces white-space:nowrap on every cell, which
   clips the item description ("... @ €10.0") and grows a horizontal scrollbar
   in a 340px sidebar. Stock order.css countered this; keep countering it. */
.cart-summary table.table tbody tr,
.cart-summary table.table tbody td,
.cart-summary table.totals td {
    white-space: normal;
}

.cart-summary table.totals td {
    border: none;
    background: transparent;
    padding: 0.3rem 0;
    vertical-align: middle;
}

/* "Total When Renewing" is a label row plus one or more amount rows (Blesta
   allows several recurring lines). Right-aligning a label against an empty
   cell reads as broken, so the whole block is centered as its own note. */
.cart-summary table.totals .piggo-renewal-label td {
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.cart-summary table.totals .piggo-renewal-amount td {
    text-align: center;
    color: var(--text);
    padding-top: 0.1rem;
}

/* Label left, amount right - the standard receipt read. Both cells used to
   float right, which left a dead gutter and pushed the pair into the middle.
   :not([colspan]) keeps the centered renewal rows out of this. */
.cart-summary table.totals td:not([colspan]):first-child {
    text-align: left;
    color: var(--muted);
    width: 60%;
}

.cart-summary table.totals td:not([colspan]):last-child {
    text-align: right;
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Surfaces ---------- */

/* Drop the outline on the card frames - the surface colour already separates
   them from the page and the border was reading as a hard grey box. Scoped to
   .card itself, so the .card-footer divider (the Login section rule) survives.
   Form controls and payment tiles deliberately keep their borders: those mark
   where you can type and which option is selected. */
body[class^="plugin-order"] .card,
body[class^="plugin-order"] .card-blesta,
.piggo-plan-recap {
    border: none !important;
}

/* =========================================================================
   Configure step - refinement pass
   Scoped to .piggo-flow so Account and Payment keep their current look
   until this step is signed off; lift the scope to roll it out.
   ========================================================================= */

.piggo-flow {
    --pc-panel: #121215;
    --pc-field: #131317;
    --pc-field-border: rgba(255, 255, 255, 0.09);
    --pc-hairline: rgba(255, 255, 255, 0.07);
    --pc-hairline-strong: rgba(255, 255, 255, 0.13);
    --pc-text: #f4f4f6;
    --pc-text-2: #a6a6ae;
    --pc-text-3: #83838c;   /* 5.2:1 on the page, 4.9:1 on the panel */
    --pc-blue-hover: #2563eb;
    --pc-ease: cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 16px;
    padding-bottom: 72px;
}

/* ---- Layout: the form is the page; only the summary is a panel ---- */

.piggo-flow .piggo-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
}

.piggo-flow .piggo-main > .card {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.piggo-flow .piggo-main > .card > .card-body {
    padding: 0 !important;
}

.piggo-flow .piggo-aside {
    top: 24px;
}

/* ---- Progress: a compact checkout trail, not a full-width wizard bar ---- */

.piggo-flow .piggo-stepper {
    justify-content: flex-start;
    align-items: center;
    margin: 0 0 48px 0;
}

.piggo-flow .piggo-stepper-item {
    flex-direction: row;
    width: auto;
    gap: 10px;
}

.piggo-flow .piggo-stepper-node {
    width: 24px;
    height: 24px;
    border: 1px solid var(--pc-hairline-strong);
    background: transparent;
    color: var(--pc-text-3);
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

.piggo-flow .piggo-stepper-node i {
    font-size: 10px;
}

.piggo-flow .piggo-stepper-item-current .piggo-stepper-node {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: none;
}

.piggo-flow .piggo-stepper-item-done .piggo-stepper-node {
    background: rgba(59, 130, 246, 0.14);
    border-color: transparent;
    color: var(--blue);
}

.piggo-flow .piggo-stepper-label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-text-3);
    white-space: nowrap;
}

.piggo-flow .piggo-stepper-item-done .piggo-stepper-label {
    color: var(--pc-text-2);
}

.piggo-flow .piggo-stepper-item-current .piggo-stepper-label {
    color: var(--pc-text);
    font-weight: 600;
}

.piggo-flow .piggo-stepper-connector {
    flex: 0 0 40px;
    min-width: 0;
    height: 1px;
    margin: 0 14px;
    background: var(--pc-hairline-strong);
}

.piggo-flow .piggo-stepper-connector-done {
    background: rgba(59, 130, 246, 0.5);
}

/* ---- Type ---- */

.piggo-flow .piggo-step-heading h1 {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
    color: var(--pc-text);
}

.piggo-flow .piggo-step-heading p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--pc-text-2);
    max-width: 56ch;
    margin: 0 0 32px 0;
    text-wrap: balance;
}

.piggo-flow .piggo-section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--pc-text);
    margin: 40px 0 16px 0;
}

.piggo-flow .form-group {
    margin-bottom: 20px !important;
}

/* inline-block, not block: Account's labels are followed by a separate
   required-marker span that has to stay on the label's line. */
.piggo-flow .form-group label {
    display: inline-block !important;
    margin: 0 0 8px 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.005em;
    color: #c9c9d0 !important;
}

/* ---- Product: reads as the thing being bought, not a form field ---- */

.piggo-flow .piggo-plan-recap {
    gap: 16px;
    padding: 18px 20px;
    margin: 0 0 44px 0;
    background: var(--pc-panel);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.piggo-flow .piggo-plan-recap-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    font-size: 19px;
}

.piggo-flow .piggo-plan-recap-body {
    flex: 1 1 auto;
    min-width: 0;
}

.piggo-flow .piggo-plan-recap-name {
    font-family: 'Ubuntu', sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--pc-text);
}

.piggo-flow .piggo-plan-recap-meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--pc-text-3);
}

.piggo-flow .piggo-plan-recap-price {
    font-family: 'Ubuntu', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pc-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- Fields ---- */

.piggo-flow .form-control,
.piggo-flow input[type="text"],
.piggo-flow input[type="email"],
.piggo-flow input[type="password"],
.piggo-flow select {
    height: 46px !important;
    padding: 0 14px !important;
    background-color: var(--pc-field) !important;
    border: 1px solid var(--pc-field-border) !important;
    border-radius: 10px !important;
    color: var(--pc-text) !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    caret-color: var(--blue);
    transition: border-color 0.15s var(--pc-ease), box-shadow 0.15s var(--pc-ease), background-color 0.15s var(--pc-ease) !important;
}

.piggo-flow .form-control:hover,
.piggo-flow select:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.piggo-flow .form-control:focus,
.piggo-flow select:focus {
    background-color: #15151a !important;
    border-color: rgba(59, 130, 246, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18) !important;
    outline: none !important;
}

.piggo-flow .form-control::placeholder {
    color: var(--pc-text-3) !important;
}

/* Native select arrow replaced; color-scheme keeps the open list dark too. */
.piggo-flow select.form-control {
    -webkit-appearance: none;
    appearance: none;
    color-scheme: dark;
    padding-right: 42px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a6a6ae' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
    cursor: pointer;
}

/* These two module hints only restate their label ("The name of the server.") */
.piggo-flow #server_name ~ a[data-toggle="tooltip"],
.piggo-flow #server_description ~ a[data-toggle="tooltip"] {
    display: none !important;
}

/* A module field with a real hint keeps it, beside the label rather than under the input. */
.piggo-flow .generated_fields_div .form-group > a[data-toggle="tooltip"] {
    position: absolute !important;
    top: 1px;
    right: 0;
    margin: 0 !important;
}

/* ---- Primary action ---- */

.piggo-flow .order-sticky-actions {
    margin-top: 36px !important;
    bottom: 16px;
    justify-content: stretch;
}

.piggo-flow .order-sticky-actions .btn {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--blue) !important;
    color: #fff !important;
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.005em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 20px -10px rgba(0, 0, 0, 0.7) !important;
    transition: background-color 0.15s var(--pc-ease), transform 0.15s var(--pc-ease) !important;
}

.piggo-flow .order-sticky-actions .btn:hover {
    background: var(--pc-blue-hover) !important;
}

.piggo-flow .order-sticky-actions .btn:active {
    transform: translateY(1px);
}

.piggo-flow .order-sticky-actions .btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.piggo-flow .order-sticky-actions .btn i {
    font-size: 13px;
    transition: transform 0.2s var(--pc-ease);
}

.piggo-flow .order-sticky-actions .btn:hover i {
    transform: translateX(2px);
}

/* ---- Order summary: the one contained panel ---- */

.piggo-flow .piggo-summary-card {
    padding: 0 !important;
    background: var(--pc-panel) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.piggo-flow .piggo-summary-card > .card-header {
    padding: 24px 24px 4px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    color: var(--pc-text) !important;
}

.piggo-flow .piggo-summary-card > .card-body {
    padding: 16px 24px 24px 24px !important;
}

.piggo-flow .piggo-summary-card .cart-summary {
    overflow: visible;
}

.piggo-flow .piggo-summary-card table.table {
    margin: 0 !important;
    border: 0 !important;
}

.piggo-flow .piggo-summary-card tbody tr td,
.piggo-flow .piggo-summary-card tbody tr:hover td {
    background: transparent !important;
    border: 0 !important;
}

.piggo-flow .piggo-line td {
    padding: 6px 0 !important;
    vertical-align: top;
}

.piggo-flow .piggo-line-name {
    font-size: 14px;
    line-height: 1.45;
    color: var(--pc-text-2) !important;
}

.piggo-flow .piggo-line-name strong {
    font-weight: 600;
    color: var(--pc-text);
}

.piggo-flow .piggo-line-price {
    padding-left: 16px !important;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-text) !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap !important;
}

.piggo-flow .piggo-line-remove {
    width: 1%;
    padding-left: 10px !important;
}

.piggo-flow .piggo-line-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--pc-text-3);
    font-size: 12px;
    transition: color 0.15s var(--pc-ease), background-color 0.15s var(--pc-ease);
}

.piggo-flow .piggo-line-remove a:hover {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

/* The theme's hr rule sets border-top with no colour, so it falls back to
   currentColor (white). Colour has to be restated with !important. */
.piggo-flow .piggo-summary-card hr {
    margin: 14px 0 12px 0;
    border: 0;
    border-top: 1px solid var(--pc-hairline) !important;
    opacity: 1;
}

.piggo-flow .cart-summary table.totals td {
    padding: 5px 0 !important;
    font-size: 14px;
}

.piggo-flow .cart-summary table.totals td:not([colspan]):first-child {
    color: var(--pc-text-2);
}

.piggo-flow .cart-summary table.totals td:not([colspan]):last-child {
    color: var(--pc-text);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Total due today is the number the whole page exists to state. */
.piggo-flow .cart-summary table.totals .piggo-total-row td {
    padding-top: 16px !important;
    border-top: 1px solid var(--pc-hairline) !important;
    vertical-align: baseline;
}

.piggo-flow .cart-summary table.totals .piggo-total-row td:first-child {
    color: var(--pc-text);
    font-size: 15px;
    font-weight: 600;
}

.piggo-flow .cart-summary table.totals .piggo-total-row td:last-child {
    font-family: 'Ubuntu', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.piggo-flow .cart-summary table.totals .piggo-renewal-label td {
    padding-top: 14px !important;
    border-top: 0 !important;
    font-size: 12.5px;
    color: var(--pc-text-3);
}

.piggo-flow .cart-summary table.totals .piggo-renewal-amount td {
    padding-top: 0 !important;
    font-size: 13px;
    color: var(--pc-text-2);
}

.piggo-flow .piggo-trust-list {
    margin: 22px 0 0 0;
    padding: 0;
    border-top: 0;
}

.piggo-flow .piggo-trust-list li {
    gap: 8px;
    padding: 3px 0;
    font-size: 13px;
    color: var(--pc-text-2);
}

.piggo-flow .piggo-trust-list i {
    font-size: 12px;
}

.piggo-flow .piggo-summary-card > .card-footer {
    padding: 16px 24px 20px 24px !important;
    border-top: 1px solid var(--pc-hairline) !important;
    background: transparent !important;
    font-size: 13px !important;
    color: var(--pc-text-3) !important;
    text-align: center;
}

.piggo-flow .piggo-summary-card > .card-footer #login_box {
    text-align: left;
    margin-top: 16px;
}

.piggo-flow a:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.7);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Shared controls across steps ---- */

.piggo-flow .required-marker {
    margin-left: 2px;
    font-size: 13px;
    color: #f87171;
}

.piggo-flow .help-block {
    font-size: 13px !important;
    color: var(--pc-text-3) !important;
}

.piggo-flow input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 3px 0 0 0;
    vertical-align: top;
    flex-shrink: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

/* Checkbox rows (terms, recurring consent, save details) read as one line of
   supporting text, not as a label. Block + absolutely placed checkbox rather
   than flex: flex turns an inline link inside the text into its own column. */
.piggo-flow .checkbox label,
.piggo-flow .form-group .checkbox label {
    display: block !important;
    position: relative;
    padding-left: 26px;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5;
    color: var(--pc-text-2) !important;
    cursor: pointer;
}

/* Marketing opt-in: the theme gives .well a full card; here it is just a row. */
.piggo-flow .form-group.well {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.piggo-flow .form-group.well label {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5;
    color: var(--pc-text-2) !important;
}

.piggo-flow .btn {
    border-radius: 10px !important;
    font-family: 'Ubuntu', sans-serif !important;
    font-weight: 600 !important;
}

.piggo-flow .btn-light {
    background: #1a1a1f !important;
    border: 1px solid var(--pc-field-border) !important;
    color: var(--pc-text) !important;
}

.piggo-flow .btn-light:hover {
    background: #212127 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.piggo-flow .btn-success:not(.order-sticky-actions .btn) {
    background: var(--blue) !important;
    border-color: var(--blue) !important;
}

.piggo-flow .btn-success:not(.order-sticky-actions .btn):hover {
    background: var(--pc-blue-hover) !important;
    border-color: var(--pc-blue-hover) !important;
}

.piggo-flow .alert {
    margin-bottom: 24px;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    font-size: 14px;
    line-height: 1.5;
}

.piggo-flow a.piggo-stepper-label:hover {
    color: var(--pc-text);
}

/* Supporting copy that sits in the form (sign-in prompt, terms, security). */
.piggo-flow .piggo-account-toggle {
    margin: -12px 0 28px 0;
    font-size: 14px;
    color: var(--pc-text-2);
}

/* display:block - the theme makes .order-security-note a flex row with an 8px gap,
   which spaced its lock wider than the plain-text .piggo-security-note lock. */
.piggo-flow .piggo-security-note,
.piggo-flow .order-security-note {
    display: block;
    margin: 4px 0 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--pc-text-3);
}

.piggo-flow .piggo-security-note i,
.piggo-flow .order-security-note i {
    margin-right: 4px;
    color: var(--green);
}

/* ---- Account: sidebar panels match the Order Summary panel ---- */

.piggo-flow .piggo-aside .piggo-why-card,
.piggo-flow .piggo-aside .piggo-note-card {
    padding: 24px !important;
    background: var(--pc-panel) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.piggo-flow .piggo-aside .piggo-note-card {
    margin-top: 16px;
}

.piggo-flow .piggo-why-title {
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--pc-text);
}

.piggo-flow .piggo-why-list li {
    font-size: 13.5px;
    color: var(--pc-text-2);
}

.piggo-flow .piggo-note-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--pc-text);
}

.piggo-flow .piggo-note-card p {
    font-size: 13px;
    color: var(--pc-text-2);
}

.piggo-flow #piggo_login_box {
    margin-bottom: 28px;
}

/* ---- Payment: method tiles and the card/billing detail partials ---- */

.piggo-flow .piggo-tiles {
    gap: 12px;
    margin-bottom: 28px;
}

.piggo-flow .piggo-tile-body {
    gap: 14px;
    padding: 16px 18px;
    background: var(--pc-field);
    border: 1px solid var(--pc-field-border);
    border-radius: 12px;
    transition: border-color 0.15s var(--pc-ease), background-color 0.15s var(--pc-ease), box-shadow 0.15s var(--pc-ease);
}

.piggo-flow .piggo-tile:hover .piggo-tile-body {
    border-color: rgba(255, 255, 255, 0.16);
}

/* Selected: a 1px ring on top of the 1px border reads as 2px without shifting layout. */
.piggo-flow .piggo-tile input[type="radio"]:checked ~ .piggo-tile-body {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue);
}

/* The radio itself is invisible, so keyboard focus has to show on the tile. */
.piggo-flow .piggo-tile input[type="radio"]:focus-visible ~ .piggo-tile-body {
    box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.piggo-flow .piggo-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1b1b21;
    color: var(--pc-text-2);
    font-size: 16px;
}

.piggo-flow .piggo-tile input[type="radio"]:checked ~ .piggo-tile-body .piggo-tile-icon {
    background: rgba(59, 130, 246, 0.14);
    color: var(--blue);
}

.piggo-flow .piggo-tile-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--pc-text);
}

.piggo-flow .piggo-tile-desc {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--pc-text-3);
}

.piggo-flow .piggo-tile-check {
    width: 18px;
    height: 18px;
    border: 1px solid var(--pc-hairline-strong);
}

/* The base rule draws the tick as a *filled* open path, which renders as a
   sliver. Stroke it instead. */
.piggo-flow .piggo-tile input[type="radio"]:checked ~ .piggo-tile-body .piggo-tile-check {
    border-color: var(--blue);
    background-color: var(--blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-size: 11px 11px;
    background-position: center;
    background-repeat: no-repeat;
}

.piggo-flow #payment_details {
    margin-bottom: 8px;
}

.piggo-flow #payment_details h4,
.piggo-flow .piggo-main h4 {
    margin: 28px 0 14px 0;
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--pc-text);
}

.piggo-flow .piggo-main .checkbox {
    margin-bottom: 12px;
}

.piggo-flow .checkbox label > input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
}

/* 4. Blesta's base styles give these partial headings a near-white underline. */
.piggo-flow #payment_details h4 {
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

/* The billing-contact and card partials lay fields out in half-width columns;
   full width matches every other field in the flow. */
.piggo-flow #payment_details_cc .row > [class*="col-md-6"],
.piggo-flow #payment_details_ach .row > [class*="col-md-6"] {
    flex: 0 0 100%;
    max-width: 100%;
}

/* 1. Stripe's card form ships as a white field in a light-grey 370px box.
   Its selectors are .StripeElement / #stripe-cc-form; one extra class of
   specificity wins regardless of when Stripe injects its stylesheet. */
.piggo-flow #stripe-cc-form,
.piggo-flow #stripe-ach-form {
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

/* Only the classic single-line Card Element (mounted in #card-element by older
   Stripe Payments modules) gets the field look. Newer modules mount Stripe's
   Payment Element (with Link), which also carries the .StripeElement class but
   draws its own inputs: it must keep Stripe's own sizing and layout, so it is
   deliberately not targeted here. */
.piggo-flow #card-element.StripeElement {
    height: 46px;
    max-width: none;
    padding: 14px;
    background-color: var(--pc-field);
    border: 1px solid var(--pc-field-border);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color 0.15s var(--pc-ease), box-shadow 0.15s var(--pc-ease);
}

.piggo-flow #card-element.StripeElement--focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.piggo-flow #card-element.StripeElement--invalid {
    border-color: #f87171;
}

.piggo-flow #card-errors {
    margin-top: 8px;
    font-size: 13px;
    color: #f87171;
}

.piggo-flow #stripe-ach-form label {
    font-family: inherit;
    color: #c9c9d0;
}

/* ---- Confirmation and the no-JS Cart page: one contained panel ---- */

.piggo-flow > .card {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 !important;
    background: var(--pc-panel) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.piggo-flow > .card > .card-header {
    padding: 24px 28px 4px 28px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--pc-text) !important;
}

.piggo-flow > .card .card-body {
    padding: 24px 28px 28px 28px !important;
}

.piggo-flow .piggo-confirm-hero h1 {
    font-size: 30px;
    letter-spacing: -0.02em;
    color: var(--pc-text);
}

.piggo-flow .piggo-confirm-hero p {
    font-size: 15px;
    color: var(--pc-text-2);
}

.piggo-flow .piggo-confirm-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.piggo-flow .table-curved {
    border: 0 !important;
    border-radius: 0 !important;
}

.piggo-flow .table-curved thead th {
    padding: 10px 0 !important;
    background: transparent !important;
    border-bottom: 1px solid var(--pc-hairline) !important;
    font-size: 12px !important;
    color: var(--pc-text-3) !important;
}

.piggo-flow .table-curved tbody td,
.piggo-flow .table-curved tbody tr:nth-of-type(even) td,
.piggo-flow .table-curved tbody tr:hover td {
    padding: 12px 0 !important;
    background: transparent !important;
    border-bottom: 1px solid var(--pc-hairline) !important;
    font-size: 14px;
}

/* ---- Small screens ---- */

@media (max-width: 991px) {
    .piggo-flow .piggo-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .piggo-flow .piggo-aside {
        position: static;
        margin-top: 0;
    }
}

@media (max-width: 575px) {
    .piggo-flow {
        padding-top: 4px;
    }

    .piggo-flow .piggo-stepper {
        margin-bottom: 32px;
    }

    .piggo-flow .piggo-stepper-connector {
        flex-basis: 20px;
        margin: 0 8px;
    }

    /* Only the current step keeps its label on a phone. */
    .piggo-flow .piggo-stepper-item-current .piggo-stepper-label {
        display: block;
    }

    .piggo-flow .piggo-step-heading h1 {
        font-size: 26px;
    }

    .piggo-flow .piggo-plan-recap {
        padding: 16px;
        gap: 14px;
    }
}

/* ---- Guard against portal scripts that recolour table rows ----
   The client portal can run a dark-mode fixer that writes inline background
   and colour onto every tbody row and cell on the page. An important
   declaration beats a normal inline style, so the Order Summary and the
   confirmation receipt keep their own colours wherever such a script runs.
   More specific rules above still win, which is what keeps the hierarchy. */
.piggo-flow tbody tr,
.piggo-flow tbody th,
.piggo-flow tbody td {
    background-color: transparent !important;
    color: var(--pc-text) !important;
}

.piggo-flow .cart-summary table.totals td:not([colspan]):first-child,
.piggo-flow .cart-summary table.totals .piggo-renewal-amount td {
    color: var(--pc-text-2) !important;
}

.piggo-flow .cart-summary table.totals .piggo-renewal-label td {
    color: var(--pc-text-3) !important;
}

/* ---- "Want us to set it up?" question, last section before Continue ----
   A form section, not a card: it lives inside the form's own card, and reads as
   the final question rather than an advert pinned to the page. */
.piggo-flow .piggo-setup-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--pc-hairline);
}

.piggo-flow .piggo-setup-title {
    margin: 0 0 6px 0;
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px !important;
    /* the theme forces h2 to 700; match the other section headings instead */
    font-weight: 600 !important;
    line-height: 1.4;
    letter-spacing: -0.005em;
    color: var(--pc-text) !important;
}

.piggo-flow .piggo-setup-block p {
    margin: 0 0 14px 0;
    max-width: 52ch;
    font-size: 14px;
    line-height: 1.55;
    color: var(--pc-text-2) !important;
}

.piggo-flow .piggo-setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.piggo-flow .piggo-setup-btn {
    padding: 9px 16px;
    border: 1px solid var(--pc-field-border);
    border-radius: 10px;
    background: var(--pc-field);
    color: var(--pc-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s var(--pc-ease), border-color 0.15s var(--pc-ease);
}

.piggo-flow .piggo-setup-btn:hover {
    border-color: var(--pc-text-3);
}

.piggo-flow .piggo-setup-btn:focus-visible {
    outline: 2px solid var(--pc-blue, #3b82f6);
    outline-offset: 2px;
}

.piggo-flow .piggo-setup-btn-yes {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
}

.piggo-flow .piggo-setup-btn-yes:hover {
    border-color: #2f76e8;
    background: #2f76e8;
}

.piggo-flow .piggo-setup-btn.is-selected {
    border-color: #3b82f6;
}

/* Unanswered when Continue was pressed */
.piggo-flow .piggo-setup-block.is-missing {
    border-top-color: rgba(239, 68, 68, 0.5);
}

.piggo-flow .piggo-setup-block p.piggo-setup-error {
    margin: 12px 0 0 0;
    color: #f87171 !important;
    font-size: 13px;
    font-weight: 600;
}

.piggo-flow .piggo-setup-block p.piggo-setup-error[hidden],
.piggo-flow .piggo-setup-block p.piggo-setup-done[hidden] {
    display: none;
}

.piggo-flow .piggo-setup-block p.piggo-setup-done {
    margin: 0;
    color: var(--pc-text) !important;
}

.piggo-flow .piggo-setup-done i {
    margin-right: 8px;
    color: var(--pc-green, #4ade80);
}

@media (max-width: 575px) {
    .piggo-flow .piggo-setup-actions {
        flex-direction: column;
    }

    .piggo-flow .piggo-setup-btn {
        width: 100%;
    }
}

/* ---- Guard against portal scripts that recolour table rows ----
   The client portal can run a dark-mode fixer that writes inline background
   and colour onto every tbody row and cell on the page. An important
   declaration beats a normal inline style, so the Order Summary and the
   confirmation receipt keep their own colours wherever such a script runs.
   More specific rules above still win, which is what keeps the hierarchy. */
.piggo-flow tbody tr,
.piggo-flow tbody th,
.piggo-flow tbody td {
    background-color: transparent !important;
    color: var(--pc-text) !important;
}

.piggo-flow .cart-summary table.totals td:not([colspan]):first-child,
.piggo-flow .cart-summary table.totals .piggo-renewal-amount td {
    color: var(--pc-text-2) !important;
}

.piggo-flow .cart-summary table.totals .piggo-renewal-label td {
    color: var(--pc-text-3) !important;
}

/* ---- "Want us to set it up?" offer, under the Order Summary ----
   Same surface as the other sidebar cards: no tint, no second visual language. */
.piggo-flow .piggo-setup-card {
    margin-top: 16px;
}

.piggo-flow .piggo-setup-title {
    margin: 0 0 0.375rem 0;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.9375rem !important;
    font-weight: 700;
    line-height: 1.4;
    color: var(--pc-text) !important;
}

.piggo-flow .piggo-setup-card p {
    margin: 0 0 0.875rem 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--pc-text-2) !important;
}

.piggo-flow .piggo-setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.piggo-flow .piggo-setup-btn {
    padding: 7px 12px;
    border: 1px solid var(--pc-field-border);
    border-radius: 8px;
    background: var(--pc-field);
    color: var(--pc-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s var(--pc-ease), border-color 0.15s var(--pc-ease);
}

.piggo-flow .piggo-setup-btn:hover {
    border-color: var(--pc-text-3);
}

.piggo-flow .piggo-setup-btn:focus-visible {
    outline: 2px solid var(--pc-blue, #3b82f6);
    outline-offset: 2px;
}

.piggo-flow .piggo-setup-btn-yes {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
}

.piggo-flow .piggo-setup-btn-yes:hover {
    border-color: #2f76e8;
    background: #2f76e8;
}

.piggo-flow .piggo-setup-btn.is-selected {
    border-color: #3b82f6;
}

/* Unanswered when Continue was pressed */
.piggo-flow .piggo-aside .piggo-setup-card.is-missing {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 0 0 1px var(--pc-danger, #ef4444) !important;
}

.piggo-flow .piggo-setup-card p.piggo-setup-error {
    margin: 10px 0 0 0;
    color: #f87171 !important;
    font-size: 0.8125rem;
    font-weight: 600;
}

.piggo-flow .piggo-setup-card p.piggo-setup-error[hidden] {
    display: none;
}

.piggo-flow .piggo-setup-card p.piggo-setup-done {
    margin: 0;
    color: var(--pc-text) !important;
}

.piggo-flow .piggo-setup-card p.piggo-setup-done[hidden] {
    display: none;
}

.piggo-flow .piggo-setup-done i {
    margin-right: 0.375rem;
    color: var(--pc-green, #4ade80);
}


/* Coupon on the Configure step: what the plan costs now, next to what it cost before. */
.piggo-plan-recap-price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    white-space: nowrap;
}
.piggo-plan-recap-was {
    font-size: .85em;
    font-weight: 400;
    text-decoration: line-through;
    opacity: .55;
}
.piggo-plan-recap-coupon {
    margin-top: .2rem;
    font-size: .8rem;
    line-height: 1.35;
    color: #3ecf8e;
}
