/*
Theme Name: ProPluginStack
Theme URI: https://propluginstack.com
Author: Amortoae Petru PFA
Author URI: https://propluginstack.com
Description: A modern SaaS-style WordPress theme for ProPluginStack, a premium plugin storefront. Built with Tailwind CSS CDN, custom post types for plugins, docs and changelogs, and a Freemius-ready architecture. Designed with the Indigo Prism design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: propluginstack
Tags: e-commerce, blog, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, one-column, two-columns, threaded-comments, translation-ready
*/

/* ==========================================================================
   INDIGO PRISM DESIGN SYSTEM - CSS Custom Properties
   ========================================================================== */

:root {
    /* Surface hierarchy (tonal layering, no borders) */
    --pps-surface: #f9f9ff;
    --pps-surface-container-low: #f1f3ff;
    --pps-surface-container: #e9edff;
    --pps-surface-container-high: #e1e8fd;
    --pps-surface-container-highest: #dce2f7;
    --pps-surface-container-lowest: #ffffff;
    --pps-surface-variant: #dce2f7;
    --pps-surface-dim: #d3daef;
    --pps-surface-bright: #f9f9ff;

    /* Primary - Indigo energy */
    --pps-primary: #3525cd;
    --pps-primary-container: #4f46e5;
    --pps-primary-fixed: #e2dfff;
    --pps-primary-fixed-dim: #c3c0ff;
    --pps-on-primary: #ffffff;
    --pps-on-primary-container: #dad7ff;
    --pps-on-primary-fixed: #0f0069;
    --pps-on-primary-fixed-variant: #3323cc;
    --pps-inverse-primary: #c3c0ff;

    /* Secondary - Green / FREE */
    --pps-secondary: #006c49;
    --pps-secondary-container: #6cf8bb;
    --pps-secondary-fixed: #6ffbbe;
    --pps-secondary-fixed-dim: #4edea3;
    --pps-on-secondary: #ffffff;
    --pps-on-secondary-container: #00714d;
    --pps-on-secondary-fixed: #002113;
    --pps-on-secondary-fixed-variant: #005236;

    /* Tertiary - Purple / PRO */
    --pps-tertiary: #571ac0;
    --pps-tertiary-container: #6f3dd9;
    --pps-tertiary-fixed: #e9ddff;
    --pps-tertiary-fixed-dim: #d0bcff;
    --pps-on-tertiary: #ffffff;
    --pps-on-tertiary-container: #e3d5ff;
    --pps-on-tertiary-fixed: #23005c;
    --pps-on-tertiary-fixed-variant: #5516be;

    /* Neutral text */
    --pps-on-surface: #141b2b;
    --pps-on-surface-variant: #464555;
    --pps-on-background: #141b2b;
    --pps-outline: #777587;
    --pps-outline-variant: #c7c4d8;
    --pps-inverse-surface: #293040;
    --pps-inverse-on-surface: #edf0ff;

    /* Error */
    --pps-error: #ba1a1a;
    --pps-error-container: #ffdad6;
    --pps-on-error: #ffffff;
    --pps-on-error-container: #93000a;

    /* Shadows (tinted, never pure black) */
    --pps-shadow-ambient: 0 20px 50px -12px rgba(20, 27, 43, 0.08);
    --pps-shadow-card: 0 1px 3px rgba(20, 27, 43, 0.04);
    --pps-shadow-hover: 0 10px 30px -8px rgba(20, 27, 43, 0.12);
    --pps-shadow-cta: 0 8px 24px -4px rgba(53, 37, 205, 0.3);

    /* Typography scale */
    --pps-font-headline: 'Plus Jakarta Sans', system-ui, sans-serif;
    --pps-font-body: 'Inter', system-ui, sans-serif;
    --pps-font-label: 'Inter', system-ui, sans-serif;

    /* Border radius */
    --pps-radius-sm: 0.125rem;
    --pps-radius-md: 0.25rem;
    --pps-radius-lg: 0.5rem;
    --pps-radius-xl: 0.75rem;
    --pps-radius-2xl: 1rem;
    --pps-radius-3xl: 1.5rem;
    --pps-radius-full: 9999px;
}

/* ==========================================================================
   GLOBAL RESETS & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--pps-font-body);
    color: var(--pps-on-surface);
    background-color: var(--pps-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Glass card (glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* CTA gradient (primary to primary-container at 135deg) */
.gradient-primary {
    background: linear-gradient(135deg, var(--pps-primary) 0%, var(--pps-primary-container) 100%);
}

/* Hero gradient alias */
.hero-gradient {
    background: linear-gradient(135deg, #3525cd 0%, #4f46e5 100%);
}

/* Material Symbols config */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* FREE pill badge */
.badge-free {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--pps-radius-full);
    background-color: var(--pps-secondary-container);
    color: var(--pps-on-secondary-container);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* PRO pill badge */
.badge-pro {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--pps-radius-full);
    background-color: var(--pps-tertiary-container);
    color: var(--pps-on-tertiary-container);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

.pps-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--pps-outline-variant);
    box-shadow: 0 -4px 24px rgba(20, 27, 43, 0.08);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pps-cookie-banner.is-visible {
    transform: translateY(0);
}

.pps-cookie-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.pps-cookie-banner__text {
    flex: 1;
    min-width: 280px;
    font-size: 0.875rem;
    color: var(--pps-on-surface-variant);
    line-height: 1.5;
}

.pps-cookie-banner__text a {
    color: var(--pps-primary);
    text-decoration: underline;
}

.pps-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pps-cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--pps-radius-xl);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--pps-font-headline);
}

.pps-cookie-btn--accept {
    background: var(--pps-primary);
    color: var(--pps-on-primary);
}

.pps-cookie-btn--accept:hover {
    opacity: 0.9;
}

.pps-cookie-btn--customize {
    background: var(--pps-surface-container-high);
    color: var(--pps-on-surface);
}

.pps-cookie-btn--customize:hover {
    background: var(--pps-surface-variant);
}

.pps-cookie-btn--reject {
    background: transparent;
    color: var(--pps-on-surface-variant);
    border: 1px solid var(--pps-outline-variant);
}

.pps-cookie-btn--reject:hover {
    background: var(--pps-surface-container-low);
}

/* Cookie preferences panel */
.pps-cookie-prefs {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pps-outline-variant);
}

.pps-cookie-prefs.is-open {
    display: block;
}

.pps-cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.pps-cookie-category__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pps-on-surface);
}

.pps-cookie-category__desc {
    font-size: 0.75rem;
    color: var(--pps-on-surface-variant);
}

/* Toggle switch */
.pps-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    appearance: none;
    background: var(--pps-outline-variant);
    border-radius: var(--pps-radius-full);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.pps-toggle:checked {
    background: var(--pps-primary);
}

.pps-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.pps-toggle:checked::before {
    transform: translateX(18px);
}

.pps-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   LEGAL PAGE STYLES
   ========================================================================== */

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-family: var(--pps-font-headline);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--pps-on-surface);
}

.legal-content h3 {
    font-family: var(--pps-font-headline);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--pps-on-surface);
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--pps-on-surface-variant);
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--pps-on-surface-variant);
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.legal-content a {
    color: var(--pps-primary);
    text-decoration: underline;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.legal-content th,
.legal-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
}

.legal-content th {
    background: var(--pps-surface-container-low);
    font-weight: 600;
    color: var(--pps-on-surface);
}

.legal-content td {
    border-bottom: 1px solid var(--pps-surface-container);
    color: var(--pps-on-surface-variant);
}

/* ==========================================================================
   WORDPRESS CORE OVERRIDES
   ========================================================================== */

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.alignwide {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
    max-width: 100%;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto;
    clip-path: none;
    display: block;
    height: auto;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 99999;
    padding: 0.75rem 1.5rem;
    background: var(--pps-primary);
    color: var(--pps-on-primary);
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   PAGINATION STYLES
   ========================================================================== */

.nav-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--pps-radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    background: var(--pps-surface-container-lowest);
    color: var(--pps-on-surface-variant);
    text-decoration: none;
}

.nav-links .page-numbers:hover {
    background: var(--pps-surface-container-high);
    color: var(--pps-on-surface);
}

.nav-links .page-numbers.current {
    background: var(--pps-primary);
    color: var(--pps-on-primary);
}

.nav-links .prev,
.nav-links .next {
    font-weight: 700;
    color: var(--pps-primary);
}

/* ==========================================================================
   FORM BASE STYLES
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
    font-family: var(--pps-font-body);
    font-size: 0.875rem;
    color: var(--pps-on-surface);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--pps-primary);
}
