/**
 * Nexus Price Configurator - Styles
 * Apple-inspired design system
 */

/* ══════════════════════════════════════════════════════════════
   CSS Variables
   ══════════════════════════════════════════════════════════════ */

.npxc-configurator {
    --npxc-primary: #0071e3;
    --npxc-primary-hover: #0077ed;
    --npxc-primary-light: rgba(0, 113, 227, 0.08);
    --npxc-text: #1d1d1f;
    --npxc-text-secondary: #6e6e73;
    --npxc-text-tertiary: #86868b;
    --npxc-border: #d2d2d7;
    --npxc-border-light: #e8e8ed;
    --npxc-bg: #ffffff;
    --npxc-bg-secondary: #f5f5f7;
    --npxc-success: #34c759;
    --npxc-radius: 12px;
    --npxc-radius-sm: 8px;
    --npxc-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --npxc-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --npxc-transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--npxc-text);
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

/* ══════════════════════════════════════════════════════════════
   Title & Subtitle
   ══════════════════════════════════════════════════════════════ */

.npxc-title {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem;
    text-align: center;
    color: var(--npxc-text);
}

.npxc-subtitle {
    font-size: 1.125rem;
    color: var(--npxc-text-secondary);
    text-align: center;
    margin: 0 0 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ══════════════════════════════════════════════════════════════
   Features Container
   ══════════════════════════════════════════════════════════════ */

.npxc-features-container {
    max-width: 900px;
    margin: 0 auto;
}

.npxc-features-container.npxc-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1200px;
    align-items: start;
}

.npxc-features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════
   Feature Card
   ══════════════════════════════════════════════════════════════ */

.npxc-feature-card {
    background: var(--npxc-bg);
    border: 1px solid var(--npxc-border-light);
    border-radius: var(--npxc-radius);
    padding: 1.75rem;
    transition: var(--npxc-transition);
}

.npxc-feature-card:hover {
    border-color: var(--npxc-border);
}

.npxc-feature-header {
    margin-bottom: 1.25rem;
}

.npxc-feature-name {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--npxc-text);
    margin: 0 0 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.npxc-feature-icon {
    font-size: 1.25rem;
    color: var(--npxc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.npxc-feature-icon svg,
.npxc-feature-icon i {
    width: 1em;
    height: 1em;
    fill: currentColor;
    color: inherit;
    display: block;
}

.npxc-feature-description {
    font-size: 0.9375rem;
    color: var(--npxc-text-secondary);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   Options (Required - Card Selection)
   ══════════════════════════════════════════════════════════════ */

.npxc-feature-options[data-type="required"] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.npxc-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--npxc-bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--npxc-radius-sm);
    cursor: pointer;
    transition: var(--npxc-transition);
}

.npxc-option:hover {
    background: var(--npxc-bg);
    border-color: var(--npxc-border);
}

.npxc-option.selected {
    background: var(--npxc-primary-light);
    border-color: var(--npxc-primary);
}

.npxc-option-content {
    flex: 1;
    min-width: 0;
    padding-right: 1rem;
}

.npxc-option-name {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--npxc-text);
    margin-bottom: 0.125rem;
}

.npxc-option-desc {
    display: none !important;
    font-size: 0.8125rem;
    color: var(--npxc-text-tertiary);
    line-height: 1.4;
    margin-top: 0.375rem;
}

.npxc-option-desc.expanded,
.npxc-desc-wrapper.expanded {
    display: block !important;
    /* Force display block */
}

.npxc-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    padding: 0;
    margin: 0.25rem 0 0 0;
    font-size: 0.75rem;
    color: var(--npxc-primary);
    cursor: pointer;
    font-family: inherit;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    transition: opacity 0.2s ease;
    /* Force reset of button styles */
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0.25rem 0 0 0 !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
}

.npxc-desc-toggle:hover {
    opacity: 0.7;
    background-color: transparent !important;
}

.npxc-desc-toggle:focus,
.npxc-desc-toggle:active,
.npxc-desc-toggle.selected {
    outline: none;
    box-shadow: none;
    background-color: transparent !important;
}

.npxc-desc-toggle .npxc-desc-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.625rem;
    line-height: 1;
}

.npxc-desc-toggle.expanded .npxc-desc-toggle-icon {
    transform: rotate(180deg);
}

.npxc-option-price {
    text-align: right;
    white-space: nowrap;
}

.npxc-option-price-setup {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--npxc-text);
}

.npxc-option-price-diff {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--npxc-primary);
}

.npxc-option-price-monthly {
    display: block;
    font-size: 0.75rem;
    color: var(--npxc-text-tertiary);
    margin-top: 0.125rem;
}

.npxc-option-price-included {
    font-size: 0.875rem;
    color: var(--npxc-primary);
    font-weight: 500;
}

/* Check mark */
.npxc-option-check {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--npxc-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--npxc-transition);
    opacity: 0;
}

.npxc-option-check svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.npxc-option.selected .npxc-option-check {
    background: var(--npxc-border);
    opacity: 1;
}

.npxc-option .npxc-option-price {
    margin-right: 2rem;
}

/* ══════════════════════════════════════════════════════════════
   Options (Optional - Toggle Style)
   ══════════════════════════════════════════════════════════════ */

.npxc-toggle-container {
    padding: 0.5rem 0;
}

.npxc-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.npxc-toggle-label {
    font-size: 0.9375rem;
    color: var(--npxc-text-secondary);
    transition: var(--npxc-transition);
}

.npxc-toggle-label.npxc-toggle-yes {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.npxc-toggle.active~.npxc-toggle-label.npxc-toggle-yes {
    color: var(--npxc-text);
}

.npxc-toggle:not(.active)~.npxc-toggle-label.npxc-toggle-no {
    color: var(--npxc-text);
}

.npxc-toggle.active+.npxc-toggle-label.npxc-toggle-no {
    color: var(--npxc-text-secondary);
}

.npxc-toggle-price {
    font-size: 0.8125rem;
    color: var(--npxc-primary);
    font-weight: 500;
}

/* Toggle Switch */
.npxc-toggle {
    position: relative;
    width: 51px;
    height: 31px;
    background: var(--npxc-border);
    border-radius: 31px;
    transition: var(--npxc-transition);
    flex-shrink: 0;
}

.npxc-toggle.active {
    background: var(--npxc-primary);
}

.npxc-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: var(--npxc-transition);
}

.npxc-toggle.active .npxc-toggle-slider {
    transform: translateX(20px);
}

/* toggle description styles moved to expandable section below */

/* ══════════════════════════════════════════════════════════════
   Expandable Toggle Description
   ══════════════════════════════════════════════════════════════ */

.npxc-toggle-container .npxc-option-description {
    display: none !important;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--npxc-text-tertiary);
    padding-left: 0;
}

.npxc-toggle-container .npxc-option-description.expanded {
    display: block !important;
}

.npxc-toggle-container .npxc-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   Summary Section
   ══════════════════════════════════════════════════════════════ */

.npxc-summary {
    background: var(--npxc-bg);
    border: 1px solid var(--npxc-border-light);
    border-radius: var(--npxc-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.npxc-summary-sticky {
    position: sticky;
    bottom: 1rem;
    z-index: 100;
    box-shadow: var(--npxc-shadow-hover);
    margin-top: 2rem;
}

.npxc-summary-side {
    position: sticky;
    top: 2rem;
    margin-top: 0;
}

.npxc-summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.npxc-summary-side .npxc-summary-content {
    flex-direction: column;
    align-items: stretch;
}

.npxc-summary-prices {
    display: flex;
    gap: 2.5rem;
}

.npxc-summary-side .npxc-summary-prices {
    flex-direction: column;
    gap: 1rem;
}

.npxc-summary-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.npxc-summary-side .npxc-summary-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--npxc-border-light);
}

.npxc-summary-side .npxc-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.npxc-summary-label {
    font-size: 0.8125rem;
    color: var(--npxc-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.npxc-price-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--npxc-text);
}

.npxc-summary-side .npxc-price-value {
    font-size: 1.25rem;
}

/* CTA Button */
.npxc-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--npxc-primary);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--npxc-radius);
    text-decoration: none;
    transition: var(--npxc-transition);
    white-space: nowrap;
}

.npxc-cta-button:hover {
    background: var(--npxc-primary-hover);
    transform: scale(1.02);
    color: white;
    text-decoration: none;
}

.npxc-summary-side .npxc-cta-button {
    width: 100%;
    margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   Animations
   ══════════════════════════════════════════════════════════════ */

@keyframes npxc-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.npxc-option.selected .npxc-option-check {
    animation: npxc-pulse 0.3s ease-out;
}

/* Price update animation */
.npxc-price-value.updating {
    animation: npxc-price-update 0.3s ease-out;
}

@keyframes npxc-price-update {
    0% {
        transform: translateY(-5px);
        opacity: 0.5;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ══════════════════════════════════════════════════════════════
   Responsive Design
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .npxc-features-container.npxc-with-sidebar {
        grid-template-columns: 1fr;
    }

    .npxc-summary-side {
        position: static;
        margin-top: 2rem;
    }

    .npxc-summary-side .npxc-summary-content {
        flex-direction: row;
        align-items: center;
    }

    .npxc-summary-side .npxc-summary-prices {
        flex-direction: row;
        gap: 2.5rem;
    }

    .npxc-summary-side .npxc-summary-row {
        flex-direction: column;
        border-bottom: none;
        padding-bottom: 0;
    }

    .npxc-summary-side .npxc-cta-button {
        width: auto;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .npxc-title {
        font-size: 1.75rem;
    }

    .npxc-subtitle {
        font-size: 1rem;
    }

    .npxc-feature-card {
        padding: 1.25rem;
    }

    .npxc-feature-name {
        font-size: 1.125rem;
    }

    .npxc-summary-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .npxc-summary-prices {
        flex-direction: column;
        gap: 0.75rem;
    }

    .npxc-summary-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .npxc-cta-button {
        width: 100%;
    }

    .npxc-toggle-wrapper {
        flex-wrap: wrap;
    }

    .npxc-toggle-label.npxc-toggle-yes {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .npxc-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-right: 3rem;
    }

    .npxc-option-content {
        padding-right: 0;
    }

    .npxc-option-price {
        text-align: left;
    }

    .npxc-option .npxc-option-price {
        margin-right: 0;
    }

    .npxc-option-check {
        top: 1rem;
        transform: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   Summary Text
   ══════════════════════════════════════════════════════════════ */

.npxc-summary-text {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    color: var(--npxc-text-secondary);
    line-height: 1.6;
}

.npxc-summary-text p:last-child {
    margin-bottom: 0;
}

.npxc-summary-side .npxc-summary-text {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--npxc-border-light);
}

/* ══════════════════════════════════════════════════════════════
   Email / Save Configuration
   ══════════════════════════════════════════════════════════════ */

.npxc-email-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--npxc-border-light);
}

.npxc-email-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--npxc-text);
    margin: 0 0 0.75rem;
}

.npxc-email-form {
    display: flex;
    gap: 0.5rem;
}

.npxc-email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--npxc-border);
    border-radius: var(--npxc-radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--npxc-text);
    background: var(--npxc-bg);
    transition: var(--npxc-transition);
    outline: none;
}

.npxc-email-input:focus {
    border-color: var(--npxc-primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.npxc-email-input::placeholder {
    color: var(--npxc-text-tertiary);
}

.npxc-email-submit {
    padding: 0.75rem 1.5rem;
    background: var(--npxc-primary);
    color: white;
    border: none;
    border-radius: var(--npxc-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--npxc-transition);
    white-space: nowrap;
}

.npxc-email-submit:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.npxc-email-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.npxc-email-status {
    font-size: 0.8125rem;
    margin: 0.5rem 0 0;
    min-height: 1.2em;
}

.npxc-email-status.success {
    color: var(--npxc-success);
}

.npxc-email-status.error {
    color: #ff3b30;
}

@media (max-width: 480px) {
    .npxc-email-form {
        flex-direction: column;
    }

    .npxc-email-submit {
        width: 100%;
    }
}

/* Sidebar Fix for Email Form */
.npxc-summary-side .npxc-email-form {
    flex-direction: column;
}

.npxc-summary-side .npxc-email-submit {
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   Dark Mode Support (if theme supports it)
   ══════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    .npxc-configurator[data-theme="auto"] {
        --npxc-text: #f5f5f7;
        --npxc-text-secondary: #a1a1a6;
        --npxc-text-tertiary: #6e6e73;
        --npxc-border: #424245;
        --npxc-border-light: #2d2d2d;
        --npxc-bg: #1d1d1f;
        --npxc-bg-secondary: #2d2d2d;
    }
}

/* ══════════════════════════════════════════════════════════════
   Elementor Editor Adjustments
   ══════════════════════════════════════════════════════════════ */

.elementor-editor-active .npxc-summary-sticky {
    position: relative;
    bottom: auto;
}

/* ══════════════════════════════════════════════════════════════
   Fix Elementor Icons
   ══════════════════════════════════════════════════════════════ */

.npxc-feature-icon svg,
.npxc-feature-icon i,
svg.npxc-feature-icon,
i.npxc-feature-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    color: inherit;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.npxc-feature-name .npxc-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}