/*
 * Shared styles for Buy/Upgrade pages
 * Uses Web Awesome design tokens for consistency with the app
 */

/* Page background and container */
.buy-page {
    background: var(--wa-color-brand-50);
    min-height: 100vh;
}

.buy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--wa-space-l);
}

.buy-title {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 var(--wa-space-l) 0;
    color: white;
}

/* Main content wrapper */
.buy-content {
    background: var(--wa-color-surface-raised);
    border-radius: var(--wa-border-radius-xl);
    padding: var(--wa-space-l);
    box-shadow: var(--wa-shadow-m);
}

/* Two-column layout */
.buy-layout {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: var(--wa-space-2xl);
    align-items: start;
}

@media (max-width: 900px) {
    .buy-layout {
        grid-template-columns: 1fr;
        gap: var(--wa-space-xl);
    }
}

/* Configuration sections */
.config-section {
    background: var(--wa-color-surface-raised);
}

.config-group {
    margin-bottom: var(--wa-space-xl);
}

.config-group:last-child {
    margin-bottom: 0;
}

.config-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--wa-color-text-normal);
    margin: 0 0 var(--wa-space-xs) 0;
}

.config-title-inline {
    margin: 0;
}

/* Upgrade callout (wa-callout) */
.upgrade-callout {
    margin-bottom: var(--wa-space-xl);
}

.upgrade-callout a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Option cards (product selection, updates selection) */
.options-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: var(--wa-space-m);
    margin-bottom: var(--wa-space-m);
}

.option-card {
    border: 1px solid var(--wa-color-surface-border);
    border-radius: var(--wa-border-radius-m);
    padding: var(--wa-space-s);
    cursor: pointer;
    transition: all var(--wa-transition-fast) var(--wa-transition-easing);
    background: var(--wa-color-surface-default);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.option-card:hover {
    border-color: var(--wa-color-brand-border-quiet);
}

.option-card.selected {
    border-color: var(--wa-color-brand-border-quiet);
    background: var(--wa-color-brand-fill-quiet);
}

.option-card-with-icon {
    display: flex;
    align-items: flex-start;
    gap: var(--wa-space-s);
}

.option-card-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.option-card-icon.brand {
    color: var(--wa-color-brand-50);
}

.option-card-icon.muted {
    color: var(--wa-color-text-quiet);
}

.option-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wa-color-text-normal);
    margin-bottom: 3px;
}

.option-card-subtitle {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    margin-bottom: 4px;
}

.option-card-price {
    font-size: 13px;
    color: var(--wa-color-brand-50);
    font-weight: 600;
}

.price-strikethrough {
    text-decoration: line-through;
    color: var(--wa-color-text-quiet);
    font-size: 16px;
    font-weight: normal;
    margin-right: var(--wa-space-s);
}

.price-upgrade {
    color: var(--wa-color-success-fill-loud);
}

.section-description {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    line-height: 1.5;
}

/* Upgrade page specific styles */
.upgrade-intro {
    margin-bottom: var(--wa-space-m);
}

.upgrade-links {
    margin-top: var(--wa-space-m);
    font-size: 13px;
}

.upgrade-links a {
    color: var(--wa-color-text-link);
    text-decoration: none;
    font-weight: 600;
}

.upgrade-contact {
    margin-top: var(--wa-space-m);
    font-size: 13px;
    color: var(--wa-color-text-quiet);
}

.upgrade-contact a {
    color: var(--wa-color-text-link);
    text-decoration: none;
    font-weight: 600;
}

/* User selection buttons */
.user-count-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wa-space-xs);
    margin-bottom: var(--wa-space-s);
}

.user-btn {
    border: 1px solid var(--wa-color-surface-border);
    border-radius: var(--wa-border-radius-m);
    padding: var(--wa-space-xs);
    cursor: pointer;
    transition: all var(--wa-transition-fast) var(--wa-transition-easing);
    background: var(--wa-color-surface-default);
    display: flex;
    align-items: center;
    gap: var(--wa-space-xs);
}

.user-btn:hover {
    border-color: var(--wa-color-brand-border-quiet);
}

.user-btn.selected {
    border-color: var(--wa-color-brand-border-quiet);
    background: var(--wa-color-brand-fill-quiet);
}

.user-btn .user-icon {
    font-size: 17px;
    flex-shrink: 0;
}

.user-btn .user-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wa-color-text-normal);
}

.user-btn.selected .user-label {
    font-weight: 600;
}

/* Updates description bullets */
.updates-description {
    margin-top: var(--wa-space-m);
}

/* Checkmark bullets */
.checkmark-bullets {
    list-style: none;
    padding: 0;
    margin: var(--wa-space-s) 0 0 0;
}

.checkmark-bullets li {
    padding: 2px 0 2px 20px;
    position: relative;
    font-size: 13px;
    color: var(--wa-color-text-normal);
    line-height: 1.5;
}

.checkmark-bullets li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--wa-color-brand-50);
    font-weight: bold;
    font-size: 13px;
    line-height: 1;
}

/* Plain bullets for updates description (when oneyear selected) */
.plain-bullets {
    list-style: none;
    padding: 0;
    margin: var(--wa-space-s) 0 0 0;
}

.plain-bullets li {
    padding: 2px 0 2px 20px;
    position: relative;
    font-size: 13px;
    color: var(--wa-color-text-normal);
    line-height: 1.5;
}

.plain-bullets li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--wa-color-text-quiet);
    font-weight: normal;
    font-size: 16px;
    line-height: 1;
}

.plain-bullets ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
}

.plain-bullets ul li {
    padding: 2px 0 2px 20px;
    position: relative;
}

.plain-bullets ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--wa-color-text-quiet);
    font-weight: normal;
    font-size: 16px;
    line-height: 1;
}

/* Add-ons section */
.addons-summary-desc {
    margin-top: var(--wa-space-s);
}

.addons-content {
    margin-top: var(--wa-space-m);
}

.addons-callout {
    margin-bottom: var(--wa-space-m);
}

/* wa-details customization for add-ons section */
wa-details.addons-details {
    --background-color: var(--wa-color-surface-lowered);
    --show-duration: var(--wa-transition-fast);
    --hide-duration: var(--wa-transition-fast);
}

wa-details.addons-details::part(base) {
    border: 1px solid var(--wa-color-surface-border);
    border-radius: var(--wa-border-radius-m);
    background: var(--wa-color-surface-lowered);
}

wa-details.addons-details::part(header) {
    padding: var(--wa-space-s);
}

wa-details.addons-details::part(content) {
    padding: 0 var(--wa-space-s) var(--wa-space-s) var(--wa-space-s);
}

/* wa-checkbox customization for add-ons */
wa-checkbox.addon-checkbox {
    --wa-checkbox-size: 1.3rem;
}

wa-checkbox.addon-checkbox::part(label) {
    font-size: 14px;
    font-weight: 600;
    color: var(--wa-color-text-normal);
}

.addon-price {
    font-size: 13px;
    color: var(--wa-color-brand-50);
    font-weight: 600;
    margin-left: var(--wa-space-xs);
}

.addon-description {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    line-height: 1.5;
    margin-left: calc(1.3rem + var(--wa-space-s));
    margin-top: var(--wa-space-2xs);
}

/* Order summary section (right column) */
.order-section {
    background: #002538;
    padding: var(--wa-space-xl);
    border-radius: var(--wa-border-radius-l);
    height: 100%;
    color: white;
}

.wa-dark .order-section {
    background: var(--wa-color-brand-fill-quiet);
    color: var(--wa-color-text-normal);
}

.order-card {
    background: var(--wa-color-surface-raised);
    border-radius: var(--wa-border-radius-l);
    padding: var(--wa-space-l);
    color: var(--wa-color-text-normal);
}

.order-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 var(--wa-space-m) 0;
    color: var(--wa-color-text-normal);
}

.order-items {
    margin-bottom: var(--wa-space-m);
    padding-bottom: var(--wa-space-m);
    border-bottom: 1px solid var(--wa-color-surface-border);
}

.order-item {
    display: flex;
    align-items: flex-start;
    gap: var(--wa-space-s);
    margin-bottom: var(--wa-space-m);
    font-size: 13px;
    line-height: 1.5;
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-item-icon {
    font-size: 16px;
    color: var(--wa-color-brand-50);
    flex-shrink: 0;
    margin-top: 1px;
    width: 16px;
    text-align: center;
}

.order-item-icon.pending {
    color: var(--wa-color-warning-fill-normal);
}

.order-item-text {
    flex: 1;
    color: var(--wa-color-text-normal);
}

.order-item-text.pending {
    color: var(--wa-color-text-quiet);
    font-style: italic;
}

.order-item-text .secondary-line {
    font-size: 12px;
    color: var(--wa-color-text-quiet);
    margin-top: 2px;
}

/* Total display */
.order-total {
    margin-bottom: var(--wa-space-m);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--wa-color-text-normal);
}

.order-total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--wa-color-brand-50);
}

/* wa-button customization for checkout */
wa-button.checkout-btn {
    width: 100%;
    margin-top: var(--wa-space-m);
}

/* User selection dialogs */
wa-dialog.users-dialog {
    --width: 500px;
}

wa-dialog.users-dialog .modal-subtitle {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    margin-bottom: var(--wa-space-l);
}

wa-dialog.custom-users-dialog {
    --width: 400px;
}

.custom-users-help {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    margin: var(--wa-space-s) 0 0 0;
}

/* Quantity grid with wa-buttons */
.qty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--wa-space-s);
    margin-bottom: var(--wa-space-m);
}

.qty-btn {
    min-width: 0;
}

.qty-btn-custom {
    grid-column: span 2;
}

/* =============================================================================
   NEW SIMPLIFIED BUY PAGE
   ============================================================================= */

/* Narrow container for single-column layout */
.buy-container--narrow {
    max-width: 660px;
}

/* Product Card */
.product-card {
    margin-bottom: var(--wa-space-l);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--wa-space-2xs);
}

.product-name {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--wa-color-text-normal);
}

#product-price-display {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--wa-color-text-normal);
}

.product-subheader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.product-meta {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
}

.whats-included-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 2px;
}

.whats-included-link:hover {
    color: var(--wa-color-text-link);
}

.product-price-note {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
}

/* User Selection */
.user-selection {
    margin-top: var(--wa-space-m);
}


/* =============================================================================
   BARCODE CLUB - LISA FRANK EDITION ✨
   ============================================================================= */

.club-card {
    position: relative;
    background: linear-gradient(
        135deg,
        #ff6b9d 0%,
        #c44cff 25%,
        #6b5bff 50%,
        #00d4ff 75%,
        #7fff6b 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    border-radius: var(--wa-border-radius-xl);
    padding: 3px;
    margin-bottom: var(--wa-space-l);
    box-shadow:
        0 4px 20px rgba(196, 76, 255, 0.3),
        0 0 40px rgba(107, 91, 255, 0.2);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.club-content {
    background: var(--wa-color-surface-raised);
    border-radius: calc(var(--wa-border-radius-xl) - 2px);
    padding: var(--wa-space-l);
}

.club-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--wa-space-m);
    flex-wrap: nowrap;
}

/* Club checkbox styling */
.club-checkbox {
    --wa-checkbox-size: 1.4rem;
}

.club-checkbox::part(label) {
    display: flex;
    align-items: center;
}

.club-title {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #c44cff, #6b5bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.wa-dark .club-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
    background-clip: unset;
}

.club-title--muted {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    background: none;
    -webkit-text-fill-color: var(--wa-color-text-quiet);
    color: var(--wa-color-text-quiet);
}

.club-title-group {
    flex: 1;
}

.club-pricing {
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.club-price-main {
    font-size: 15px;
    font-weight: 600;
    color: var(--wa-color-text-normal);
}

.club-price-after {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
}

.club-price-strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Club features list - uses checkmark-bullets class */
.club-features.checkmark-bullets {
    margin: var(--wa-space-m) 0 0 0;
    padding-left: var(--wa-space-s);
}

.club-features.checkmark-bullets li {
    font-size: 14px;
}

/* Popover styling */
.club-features wa-popover {
    --max-width: 280px;
}

.club-features wa-popover::part(body) {
    font-size: 13px;
    line-height: 1.5;
    padding: var(--wa-space-s);
}

/* Disabled state */
.club-card--disabled {
    background: var(--wa-color-surface-border);
    box-shadow: none;
    animation: none;
}

.club-card--disabled .club-content {
    background: var(--wa-color-surface-lowered);
}

.club-header-disabled {
    display: flex;
    flex-direction: column;
    gap: var(--wa-space-s);
}

.club-disabled-desc {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    line-height: 1.5;
    margin: 0;
}

.club-header-disabled wa-button {
    align-self: flex-start;
}

/* =============================================================================
   ADVANCED PRODUCTION PLUG-IN (wa-details)
   ============================================================================= */

/* Addon disabled state */
.addon-disabled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wa-color-surface-lowered);
    border: 1px solid var(--wa-color-surface-border);
    border-radius: var(--wa-border-radius-xl);
    padding: var(--wa-space-m) var(--wa-space-l);
    margin-bottom: var(--wa-space-m);
}

.addon-disabled-title {
    font-size: 14px;
    color: var(--wa-color-text-quiet);
}

.addon-disabled-note {
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 2px;
    cursor: pointer;
}

.addon-disabled-note:hover {
    color: var(--wa-color-text-link);
}

.addon-details {
    margin-bottom: var(--wa-space-m);
}

.addon-details::part(base) {
    background: var(--wa-color-surface-default);
    border: 1px solid var(--wa-color-surface-border);
    border-radius: var(--wa-border-radius-xl);
}

.addon-details::part(header) {
    padding: var(--wa-space-m) var(--wa-space-l);
}

.addon-details::part(content) {
    padding: 0 var(--wa-space-l) var(--wa-space-l) var(--wa-space-l);
}

.addon-details::part(summary-icon) {
    display: none;
}

.addon-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--wa-space-m);
}

.addon-title-group {
    display: flex;
    align-items: center;
    gap: var(--wa-space-s);
}

.addon-checkbox {
    --wa-checkbox-size: 1.3rem;
}

.addon-title {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--wa-color-text-normal);
}

.addon-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--wa-color-text-normal);
    flex-shrink: 0;
}

.addon-need-link {
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    cursor: pointer;
}

.addon-need-link:hover {
    color: var(--wa-color-text-link);
    text-decoration: underline;
}

.addon-bullets {
    margin: 0;
}

.addon-bullets li {
    font-size: 13px;
}

/* =============================================================================
   CHECKOUT FOOTER
   ============================================================================= */

.checkout-footer {
    display: flex;
    justify-content: center;
}

.checkout-footer .checkout-btn {
    min-width: 280px;
}

/* Team dialog styles */
.team-dialog-content {
    text-align: center;
    padding: var(--wa-space-m) 0;
}

.team-dialog-price {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--wa-color-text-normal);
    margin-bottom: var(--wa-space-2xs);
}

.team-dialog-desc {
    font-size: 16px;
    color: var(--wa-color-text-quiet);
    margin-bottom: var(--wa-space-l);
}

.team-dialog-content .checkmark-bullets {
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

/* Opt-out dialog footer */
.optout-footer {
    display: flex;
    gap: var(--wa-space-s);
    justify-content: flex-end;
}

/* =============================================================================
   PURCHASE TYPE TABS
   ============================================================================= */

.purchase-tabs {
    display: flex;
    gap: var(--wa-space-xs);
    margin-bottom: var(--wa-space-l);
}

.purchase-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 var(--wa-space-l);
    border: none;
    background: rgba(255, 255, 255, 0.35);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--wa-border-radius-m);
    cursor: pointer;
    transition: all var(--wa-transition-fast);
    text-decoration: none;
    box-sizing: border-box;
    font-family: inherit;
}

.wa-dark .purchase-tab {
    background: rgba(0, 0, 0, 0.35);
    color: white;
}

a.purchase-tab {
    color: white;
}

.purchase-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: white;
}

.wa-dark .purchase-tab:hover {
    background: rgba(0, 0, 0, 0.5);
    color: white;
}

a.purchase-tab:hover {
    color: white;
}

.purchase-tab.active {
    background: var(--wa-color-surface-raised);
    color: var(--wa-color-text-normal);
}

.wa-dark .purchase-tab.active {
    background: var(--wa-color-surface-raised);
    color: var(--wa-color-text-normal);
}

/* =============================================================================
   UPGRADE LOOKUP
   ============================================================================= */

.upgrade-lookup-card {
    background: var(--wa-color-surface-raised);
    border-radius: var(--wa-border-radius-xl);
    padding: var(--wa-space-2xl);
    box-shadow: var(--wa-shadow-m);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.upgrade-lookup-title {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 var(--wa-space-s) 0;
    color: var(--wa-color-text-normal);
}

.upgrade-lookup-desc {
    font-size: 15px;
    color: var(--wa-color-text-quiet);
    margin: 0 0 var(--wa-space-l) 0;
}

.upgrade-lookup-form {
    display: flex;
    gap: var(--wa-space-s);
    margin-bottom: var(--wa-space-l);
}

.upgrade-lookup-form wa-input {
    flex: 1;
}

.upgrade-lookup-help {
    font-size: 13px;
    color: var(--wa-color-text-quiet);
    margin: 0;
}

.upgrade-lookup-help a {
    color: var(--wa-color-text-link);
    text-decoration: none;
    font-weight: 500;
}

.upgrade-lookup-help a:hover {
    text-decoration: underline;
}

/* Not found state */
.not-found-icon {
    font-size: 48px;
    color: var(--wa-color-text-quiet);
    margin-bottom: var(--wa-space-m);
}

.not-found-options {
    display: flex;
    gap: var(--wa-space-s);
    justify-content: center;
    margin-bottom: var(--wa-space-l);
}

/* =============================================================================
   UPGRADE OFFER
   ============================================================================= */

.upgrade-offer {
    display: flex;
    flex-direction: column;
    gap: var(--wa-space-m);
}

#upgrade-welcome,
#coupon-banner {
    margin-bottom: var(--wa-space-s);
}

.upgrade-price-display {
    display: flex;
    align-items: baseline;
    gap: var(--wa-space-s);
    justify-content: flex-end;
}

.upgrade-price-old {
    font-size: 16px;
    color: var(--wa-color-text-quiet);
    text-decoration: line-through;
}

#upgrade-price-new {
    font-family: "neuzeit-grotesk", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--wa-color-success-fill-normal);
}

.product-subtitle {
    font-size: 14px;
    color: var(--wa-color-text-quiet);
    margin: 0;
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .product-header {
        flex-direction: column;
        gap: var(--wa-space-s);
    }

    .product-price {
        text-align: left;
    }

    .user-count-row {
        flex-wrap: wrap;
    }

    .club-header {
        flex-wrap: wrap;
    }

    .club-pricing {
        width: 100%;
        text-align: left;
        margin-top: var(--wa-space-s);
    }

    .addon-features {
        grid-template-columns: 1fr;
    }

    .checkout-footer .checkout-btn {
        width: 100%;
    }

    .purchase-tabs {
        flex-direction: column;
    }

    .purchase-tab {
        text-align: center;
    }

    .upgrade-lookup-form {
        flex-direction: column;
    }

    .not-found-options {
        flex-direction: column;
    }

    .upgrade-price-display {
        justify-content: flex-start;
    }
}
