/* Shopify App Page Styles */

.shopify-page h1,
.shopify-page h2 {
    text-wrap: balance;
}

/* Floating hero elements */
@keyframes sp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.sp-float { animation: sp-float 6s ease-in-out infinite; }
.sp-float-delay { animation: sp-float 6s ease-in-out 1.5s infinite; }

/* Entrance on scroll. Resilient with fallback so content is never stuck hidden */
.sp-reveal {
    opacity: 1;
    transform: none;
}
.sp-js .sp-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.sp-js .sp-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Feature cards */
.sp-feature-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 2rem;
    box-shadow: 0 15px 35px -12px rgba(15, 23, 42, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sp-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px -18px rgba(15, 23, 42, 0.12);
    border-color: rgba(38, 91, 192, 0.2);
}

.sp-mock {
    margin-top: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #eef2f7;
    padding: 1.5rem 1.25rem;
    min-height: 232px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.sp-mock::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(38, 91, 192, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}
.sp-mock > * { position: relative; }

.sp-mock-panel {
    width: 100%;
    max-width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.12);
}

/* Toggle used in the theme editor mockup */
.sp-toggle {
    width: 28px;
    height: 16px;
    border-radius: 9999px;
    background: #265BC0;
    position: relative;
    flex-shrink: 0;
}
.sp-toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    background: #ffffff;
}

/* Brand editor mockup (interactive) */
.sp-swatch {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sp-swatch:hover { transform: scale(1.1); }
.sp-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #0F172A; }
.sp-swatch:focus-visible { outline: 2px solid #265BC0; outline-offset: 2px; }

.sp-radius-btn {
    font-size: 10px;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
    border-radius: 0.5rem;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sp-radius-btn[aria-pressed="true"] {
    color: #265BC0;
    background: #ffffff;
    border-color: rgba(38, 91, 192, 0.35);
}
.sp-radius-btn:focus-visible { outline: 2px solid #265BC0; outline-offset: 2px; }

.sp-preview-btn {
    transition: background-color 0.3s ease, border-radius 0.3s ease;
}

/* Analytics mockup bars */
@keyframes sp-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
.sp-bar {
    height: 6px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #1D4BA7, #5BCBFA);
    transform-origin: left center;
}
.sp-js .is-visible .sp-bar { animation: sp-grow 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Category mosaic */
.sp-tile img { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.sp-tile:hover img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
    .sp-float, .sp-float-delay { animation: none; }
    .sp-js .sp-reveal { opacity: 1; transform: none; transition: none; }
    .sp-js .is-visible .sp-bar { animation: none; }
}
