/**
 * Pixidia Subscriptions - Public Styles
 *
 * Color scheme:
 *   primary:   #016a64
 *   secondary: #ff8f00
 *   dark:      #012827
 */

/* ──────────────────────────────────────
   Reset / Base
   ────────────────────────────────────── */

.pixsub-pricing-section,
.pixsub-account,
.pixsub-checkout,
.pixsub-gated,
.pixsub-itinerary-limit {
    box-sizing: border-box;
    font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #012827;
    line-height: 1.6;
}

.pixsub-pricing-section *,
.pixsub-account *,
.pixsub-checkout *,
.pixsub-gated *,
.pixsub-itinerary-limit * {
    box-sizing: border-box;
}

/* ──────────────────────────────────────
   Pricing Table
   ────────────────────────────────────── */

.pixsub-pricing-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 2rem;
    color: #012827;
}

.pixsub-pricing-table {
    display: grid;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.pixsub-pricing-cols-1 { grid-template-columns: 1fr; max-width: 400px; }
.pixsub-pricing-cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 700px; }
.pixsub-pricing-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pixsub-pricing-cols-4 { grid-template-columns: repeat(4, 1fr); }

.pixsub-pricing-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* ──────────────────────────────────────
   Pricing Card
   ────────────────────────────────────── */

.pixsub-pricing-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pixsub-pricing-card:hover {
    box-shadow: 0 8px 30px rgba(1, 106, 100, 0.12);
    transform: translateY(-2px);
}

.pixsub-pricing-card--current {
    border-color: #016a64;
    border-width: 2px;
}

.pixsub-pricing-card--popular {
    border-color: #ff8f00;
    border-width: 2px;
    box-shadow: 0 4px 20px rgba(255, 143, 0, 0.15);
}

/* Badges */

.pixsub-pricing-popular-badge,
.pixsub-pricing-current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.pixsub-pricing-popular-badge {
    background: #ff8f00;
    color: #fff;
}

.pixsub-pricing-current-badge {
    background: #016a64;
    color: #fff;
}

.pixsub-pricing-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    color: #012827;
}

/* Price */

.pixsub-pricing-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
}

.pixsub-pricing-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #016a64;
    line-height: 1;
}

.pixsub-pricing-currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: #016a64;
}

.pixsub-pricing-period {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.pixsub-pricing-description {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 1rem;
}

.pixsub-pricing-limit {
    font-size: 0.85rem;
    color: #016a64;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.75rem;
    background: rgba(1, 106, 100, 0.08);
    border-radius: 6px;
    display: inline-block;
}

/* Feature list */

.pixsub-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
    flex-grow: 1;
}

.pixsub-pricing-features li {
    padding: 0.4rem 0 0.4rem 1.75rem;
    position: relative;
    font-size: 0.9rem;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}

.pixsub-pricing-features li:last-child {
    border-bottom: none;
}

/* CSS-only check / cross icons */
.pixsub-feature-yes::before,
.pixsub-feature-no::before {
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.pixsub-feature-yes::before {
    content: "\2713";
    background: #016a64;
    color: #fff;
}

.pixsub-feature-no::before {
    content: "\2717";
    background: #e0e0e0;
    color: #999;
}

.pixsub-feature-no {
    color: #999;
}

/* CTA */

.pixsub-pricing-cta-wrap {
    margin-top: auto;
    padding-top: 0.5rem;
}

.pixsub-pricing-cta {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    background: #016a64;
    color: #fff;
}

.pixsub-pricing-cta:hover {
    background: #01524d;
    color: #fff;
    transform: translateY(-1px);
}

.pixsub-pricing-cta--disabled {
    background: #e0e0e0;
    color: #999;
    cursor: default;
    pointer-events: none;
}

.pixsub-pricing-card--popular .pixsub-pricing-cta {
    background: #ff8f00;
}

.pixsub-pricing-card--popular .pixsub-pricing-cta:hover {
    background: #e68200;
}

/* ──────────────────────────────────────
   Plan Badge
   ────────────────────────────────────── */

.pixsub-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pixsub-badge--free {
    background: #e0e0e0;
    color: #555;
}

.pixsub-badge--standard {
    background: #d0e8ff;
    color: #1a5fa8;
}

.pixsub-badge--premium {
    background: linear-gradient(135deg, #f5d76e 0%, #f7a836 100%);
    color: #6b4700;
}

/* ──────────────────────────────────────
   Status Badges
   ────────────────────────────────────── */

.pixsub-status {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pixsub-status--active,
.pixsub-status--completed {
    background: #d4edda;
    color: #155724;
}

.pixsub-status--pending {
    background: #fff3cd;
    color: #856404;
}

.pixsub-status--cancelled,
.pixsub-status--expired,
.pixsub-status--failed {
    background: #f8d7da;
    color: #721c24;
}

.pixsub-status--past_due {
    background: #ffe0b2;
    color: #e65100;
}

.pixsub-status--paused {
    background: #e0e0e0;
    color: #555;
}

.pixsub-status--refunded,
.pixsub-status--partially_refunded {
    background: #e3d5f5;
    color: #4a2282;
}

/* ──────────────────────────────────────
   Account Section
   ────────────────────────────────────── */

.pixsub-account {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pixsub-account-heading {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #016a64;
    color: #012827;
}

.pixsub-account-plan {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.pixsub-account-plan-info > div {
    margin-bottom: 0.5rem;
}

.pixsub-account-features {
    margin-top: 1.5rem;
}

.pixsub-account-features h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #012827;
}

.pixsub-account-usage {
    margin-top: 1.5rem;
}

.pixsub-account-usage h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #012827;
}

.pixsub-account-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.pixsub-account--login {
    text-align: center;
    padding: 3rem 1rem;
}

/* Transactions table */

.pixsub-account-transactions {
    margin-top: 2rem;
}

.pixsub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pixsub-table thead th {
    background: #f5f5f5;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #012827;
    border-bottom: 2px solid #e0e0e0;
}

.pixsub-table tbody td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.pixsub-table tbody tr:hover {
    background: #fafafa;
}

/* ──────────────────────────────────────
   Progress Bar
   ────────────────────────────────────── */

.pixsub-progress {
    background: #e0e0e0;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
}

.pixsub-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #016a64, #01a89f);
    border-radius: 8px;
    transition: width 0.4s ease;
}

.pixsub-progress-bar--full {
    background: linear-gradient(90deg, #e65100, #ff8f00);
}

.pixsub-progress-text {
    font-size: 0.85rem;
    color: #555;
    margin: 0.5rem 0 0;
}

/* ──────────────────────────────────────
   Gated Content
   ────────────────────────────────────── */

.pixsub-gated {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.pixsub-gated-overlay {
    background: linear-gradient(180deg, rgba(1, 40, 39, 0.03) 0%, rgba(1, 40, 39, 0.08) 100%);
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
}

.pixsub-gated-message p {
    font-size: 1rem;
    color: #555;
    margin: 0 0 1rem;
}

/* ──────────────────────────────────────
   Checkout
   ────────────────────────────────────── */

.pixsub-checkout {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pixsub-checkout-summary {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.pixsub-checkout-summary h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #012827;
}

.pixsub-checkout-plan {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.pixsub-checkout-plan-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #012827;
    margin-bottom: 0.5rem;
}

.pixsub-checkout-plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
}

.pixsub-checkout-plan-price .pixsub-pricing-amount {
    font-size: 2rem;
}

.pixsub-checkout-plan-limit {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.pixsub-checkout-action {
    margin-top: 1rem;
}

.pixsub-checkout-secure {
    font-size: 0.8rem;
    color: #999;
    margin: 0.75rem 0 0;
}

.pixsub-checkout-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.pixsub-checkout--success,
.pixsub-checkout--cancelled {
    text-align: center;
    padding: 3rem 1rem;
}

.pixsub-checkout--success h3 {
    color: #016a64;
}

.pixsub-checkout--cancelled h3 {
    color: #856404;
}

.pixsub-checkout--login {
    text-align: center;
    padding: 3rem 1rem;
}

.pixsub-checkout-icon--success {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: #016a64;
    border-radius: 50%;
    position: relative;
}

.pixsub-checkout-icon--success::after {
    content: "\2713";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
}

/* ──────────────────────────────────────
   Itinerary Limit
   ────────────────────────────────────── */

.pixsub-itinerary-limit {
    max-width: 400px;
}

.pixsub-itinerary-limit-upgrade {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    text-align: center;
}

.pixsub-itinerary-limit-upgrade p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #856404;
}

/* ──────────────────────────────────────
   Buttons
   ────────────────────────────────────── */

.pixsub-btn {
    display: inline-block;
    padding: 0.7rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    line-height: 1.4;
}

.pixsub-btn:hover {
    transform: translateY(-1px);
}

.pixsub-btn--primary {
    background: #016a64;
    color: #fff;
}

.pixsub-btn--primary:hover {
    background: #01524d;
    color: #fff;
}

.pixsub-btn--secondary {
    background: #ff8f00;
    color: #fff;
}

.pixsub-btn--secondary:hover {
    background: #e68200;
    color: #fff;
}

.pixsub-btn:disabled,
.pixsub-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ──────────────────────────────────────
   Responsive
   ────────────────────────────────────── */

@media (max-width: 768px) {
    .pixsub-pricing-cols-2,
    .pixsub-pricing-cols-3,
    .pixsub-pricing-cols-4 {
        grid-template-columns: 1fr;
    }

    .pixsub-pricing-card {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pixsub-table {
        font-size: 0.8rem;
    }

    .pixsub-table thead th,
    .pixsub-table tbody td {
        padding: 0.4rem 0.5rem;
    }

    .pixsub-checkout-summary {
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pixsub-pricing-cols-3,
    .pixsub-pricing-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ──────────────────────────────────────
   /nos-offres/ - Current plan & included states
   ────────────────────────────────────── */

a.pixsub-current-plan,
a.pixsub-included-plan,
.pixidia-btn.pixsub-current-plan,
.pixidia-btn.pixsub-included-plan {
    background: linear-gradient(135deg, #8a9298 0%, #a0a8ad 100%) !important;
    color: #fff !important;
    cursor: default !important;
    pointer-events: none !important;
    opacity: 0.85;
    box-shadow: none !important;
    transform: none !important;
}

a.pixsub-current-plan:hover,
a.pixsub-included-plan:hover,
.pixidia-btn.pixsub-current-plan:hover,
.pixidia-btn.pixsub-included-plan:hover {
    transform: none !important;
    box-shadow: none !important;
    background: linear-gradient(135deg, #8a9298 0%, #a0a8ad 100%) !important;
}

/* ──────────────────────────────────────
   Toast Notifications
   ────────────────────────────────────── */

.pixsub-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 3rem);
}

.pixsub-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-family: "Urbanist", sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #012827;
    background: #fff;
    box-shadow:
        0 4px 24px rgba(1, 40, 39, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #016a64;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    animation: pixsub-toast-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    backdrop-filter: blur(12px);
}

.pixsub-toast--exiting {
    animation: pixsub-toast-out 0.3s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.pixsub-toast--error {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.pixsub-toast--success {
    border-left-color: #016a64;
    background: #f0faf9;
}

.pixsub-toast--warning {
    border-left-color: #ff8f00;
    background: #fff8ee;
}

.pixsub-toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.pixsub-toast--error .pixsub-toast-icon {
    background: #dc3545;
    color: #fff;
}

.pixsub-toast--success .pixsub-toast-icon {
    background: #016a64;
    color: #fff;
}

.pixsub-toast--warning .pixsub-toast-icon {
    background: #ff8f00;
    color: #fff;
}

.pixsub-toast-body {
    flex: 1;
    min-width: 0;
}

.pixsub-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.pixsub-toast-message {
    font-size: 0.85rem;
    color: #4a5568;
}

.pixsub-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem;
    margin: -0.2rem -0.2rem 0 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.pixsub-toast-close:hover {
    opacity: 1;
}

.pixsub-toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 12px 0;
    overflow: hidden;
}

.pixsub-toast-progress-bar {
    height: 100%;
    background: currentColor;
    opacity: 0.25;
    animation: pixsub-toast-timer linear forwards;
}

@keyframes pixsub-toast-in {
    from {
        transform: translateX(calc(100% + 2rem));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pixsub-toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
        max-height: 200px;
        margin-bottom: 0;
    }
    70% {
        transform: translateX(calc(100% + 2rem));
        opacity: 0;
        max-height: 200px;
    }
    to {
        transform: translateX(calc(100% + 2rem));
        opacity: 0;
        max-height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

@keyframes pixsub-toast-timer {
    from { width: 100%; }
    to { width: 0%; }
}

/* ──────────────────────────────────────
   Loading Spinner (Button)
   ────────────────────────────────────── */

.pixsub-btn--loading,
.pixsub-pricing-cta--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.pixsub-btn--loading::after,
.pixsub-pricing-cta--loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pixsub-spin 0.6s linear infinite;
}

@keyframes pixsub-spin {
    to { transform: rotate(360deg); }
}

/* ──────────────────────────────────────
   Pricing Card Entrance Animations
   ────────────────────────────────────── */

.pixsub-pricing-card {
    animation: pixsub-card-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pixsub-pricing-card:nth-child(1) { animation-delay: 0.05s; }
.pixsub-pricing-card:nth-child(2) { animation-delay: 0.12s; }
.pixsub-pricing-card:nth-child(3) { animation-delay: 0.19s; }
.pixsub-pricing-card:nth-child(4) { animation-delay: 0.26s; }
.pixsub-pricing-card:nth-child(5) { animation-delay: 0.33s; }

@keyframes pixsub-card-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ──────────────────────────────────────
   Enhanced CTA Hover States
   ────────────────────────────────────── */

.pixsub-pricing-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pixsub-pricing-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pixsub-pricing-cta:hover::before {
    opacity: 1;
}

.pixsub-pricing-cta:active {
    transform: translateY(0) scale(0.98);
}

/* ──────────────────────────────────────
   Success Page Animation
   ────────────────────────────────────── */

.pixsub-checkout--success {
    animation: pixsub-success-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pixsub-checkout-icon--success {
    animation: pixsub-success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes pixsub-success-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pixsub-success-pop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ──────────────────────────────────────
   Checkout Button Pulse (pre-redirect)
   ────────────────────────────────────── */

.pixsub-checkout-btn--redirecting {
    animation: pixsub-pulse 1.5s ease-in-out infinite;
}

@keyframes pixsub-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(1, 106, 100, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(1, 106, 100, 0); }
}

/* ──────────────────────────────────────
   Responsive Toast
   ────────────────────────────────────── */

@media (max-width: 768px) {
    .pixsub-toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        width: auto;
    }

    .pixsub-toast {
        font-size: 0.85rem;
    }
}
