/* TPT Bag a Bargain — Elementor widgets
   Marker: TPT_BAG_A_BARGAIN_WP_V1_20261106 */

.tpt-bag-widget {
    width: 100%;
    max-width: 100%;
}

.tpt-bag-widget-title {
    margin: 0 0 0.4rem;
    color: #1F4D2B;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.12;
    font-weight: 800;
}

.tpt-bag-widget-intro {
    margin: 0 0 1rem;
    color: #4A5546;
    font-size: 1.02rem;
    line-height: 1.6;
}

.tpt-bag-iframe {
    display: block;
    width: 100%;
    min-height: 120px;
    border: 0;
    border-radius: 24px;
    background: transparent;
    overflow: hidden;
}

.tpt-bag-fallback {
    margin: 0.75rem 0 0;
    font-weight: 700;
}

.tpt-bag-fallback a {
    color: #1F4D2B;
}

/* -------------------------------------------------------------------------
 * Download App button
 * Small, high-contrast pill. Hidden on desktop by default; tablets are
 * covered both by width and by a coarse pointer, so landscape iPads work.
 * ---------------------------------------------------------------------- */

.tpt-app-download-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--tpt-app-bg, #F5B324);
    color: var(--tpt-app-color, #0A2239);
    border: 1px solid rgba(7, 26, 43, 0.12);
    box-shadow: 0 10px 26px rgba(7, 26, 43, 0.28);
    font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.tpt-app-download-btn:hover,
.tpt-app-download-btn:focus {
    color: var(--tpt-app-color, #0A2239);
    text-decoration: none;
    transform: translateY(-1px);
}

.tpt-app-download-btn:focus-visible {
    outline: 3px solid rgba(245, 179, 36, 0.55);
    outline-offset: 3px;
}

.tpt-app-download-btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.tpt-app-download-btn--floating {
    position: fixed;
    bottom: calc(var(--tpt-app-offset, 16px) + env(safe-area-inset-bottom));
    z-index: 2147482000;
}

.tpt-app-download-btn--right {
    right: max(var(--tpt-app-offset, 16px), env(safe-area-inset-right));
}

.tpt-app-download-btn--left {
    left: max(var(--tpt-app-offset, 16px), env(safe-area-inset-left));
}

.tpt-app-download-btn--inline {
    position: static;
    margin: 8px 0;
}

/* Mobile and tablet only. */
@media (max-width: 1024px) {
    .tpt-app-download-btn {
        display: inline-flex;
    }
}

@media (hover: none) and (pointer: coarse) and (max-width: 1366px) {
    .tpt-app-download-btn {
        display: inline-flex;
    }
}

/* Explicit desktop hide, unless the editor chose "All devices". */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .tpt-app-download-btn {
        display: none !important;
    }
    .tpt-app-download-btn--all {
        display: inline-flex !important;
    }
}

/* Do not stack on top of the existing Parish Trust app prompt. */
body:has(#tpt-app-prompt:not([hidden])) .tpt-app-download-btn--floating {
    opacity: 0;
    pointer-events: none;
}

/* Keep the Elementor editor canvas usable. */
.elementor-editor-active .tpt-app-download-btn--floating {
    display: none !important;
}

/* -------------------------------------------------------------------------
 * Page content helpers used by the Bag a Bargain Elementor layout.
 * ---------------------------------------------------------------------- */

.tpt-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #D9433A;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tpt-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #E9F7E1;
    color: #1F4D2B;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tpt-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2F9E44;
    box-shadow: 0 0 0 4px rgba(47, 158, 68, 0.18);
    animation: tpt-live-pulse 2.2s ease-in-out infinite;
}

@keyframes tpt-live-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.14); }
    50% { box-shadow: 0 0 0 7px rgba(47, 158, 68, 0.08); }
}

@media (prefers-reduced-motion: reduce) {
    .tpt-live-dot { animation: none; }
    .tpt-app-download-btn { transition: none; }
}

.tpt-step {
    height: 100%;
    border: 1px solid #DFE6D5;
    border-radius: 24px;
    background: #FFFFFF;
    padding: 24px 22px;
    box-shadow: 0 12px 26px rgba(31, 77, 43, 0.06);
}

.tpt-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #1F4D2B;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 900;
}

.tpt-step h3 {
    margin: 0 0 8px;
    color: #1F4D2B;
    font-size: 20px;
    line-height: 1.2;
}

.tpt-step p {
    margin: 0;
    color: #4A5546;
    font-size: 15px;
    line-height: 1.6;
}

.tpt-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tpt-fact {
    border: 1px solid #DFE6D5;
    border-radius: 20px;
    background: #F7FAF1;
    padding: 18px 16px;
}

.tpt-fact strong {
    display: block;
    color: #1F4D2B;
    font-size: 26px;
    line-height: 1.1;
}

.tpt-fact span {
    display: block;
    margin-top: 4px;
    color: #66705F;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .tpt-fact-grid { grid-template-columns: 1fr; }
}

.tpt-note {
    margin: 14px 0 0;
    color: #66705F;
    font-size: 13px;
    line-height: 1.55;
}

.tpt-address-card {
    border: 1px solid #DFE6D5;
    border-left: 5px solid #D9433A;
    border-radius: 20px;
    background: #FFFFFF;
    padding: 20px 22px;
    box-shadow: 0 12px 26px rgba(31, 77, 43, 0.06);
}

.tpt-address-card strong {
    display: block;
    margin-bottom: 4px;
    color: #1F4D2B;
    font-size: 17px;
}

.tpt-address-card p {
    margin: 0;
    color: #4A5546;
    font-size: 15px;
    line-height: 1.6;
}

/* Stack the two hero calls to action on phones so neither is cramped. */
@media (max-width: 767px) {
    .tpt-bag-hero .elementor-inner-section {
        display: block;
    }
    .tpt-bag-hero .elementor-inner-section .elementor-column {
        width: 100% !important;
        max-width: 100% !important;
    }
    .tpt-bag-hero .elementor-inner-section .elementor-column:first-child {
        margin-bottom: 10px;
    }
    .tpt-bag-hero .elementor-inner-section .elementor-button {
        width: 100%;
    }
}

/* Hero calls to action: one flex row on desktop, stacked full-width on phones. */
.tpt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 0 1rem;
}

.tpt-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 999px;
    background: #D9433A;
    color: #FFFFFF !important;
    font-family: Raleway, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(217, 67, 58, 0.22);
    transition: transform 0.15s ease, background 0.15s ease;
}

.tpt-hero-btn:hover,
.tpt-hero-btn:focus {
    transform: translateY(-1px);
    background: #B8322A;
    color: #FFFFFF !important;
}

.tpt-hero-btn--ghost {
    background: transparent;
    color: #1F4D2B !important;
    border: 2px solid #1F4D2B;
    box-shadow: none;
}

.tpt-hero-btn--ghost:hover,
.tpt-hero-btn--ghost:focus {
    background: #1F4D2B;
    color: #FFFFFF !important;
}

@media (max-width: 600px) {
    .tpt-hero-actions {
        flex-direction: column;
    }
    .tpt-hero-btn {
        width: 100%;
    }
}

/* Keep clear of the bottom cookie bar until the visitor has chosen. */
body.cookies-not-set .tpt-app-download-btn--floating {
    bottom: calc(var(--tpt-app-offset, 16px) + 62px + env(safe-area-inset-bottom));
}
