/**
 * GAS LearningPass Widget Styles
 * Uses design tokens from gas-design-tokens.css
 */

/* =============================================
   Shared LearningPass base
   ============================================= */

.gas-shop-widget-learningpass {
    font-family: var(--gas-font-family, sans-serif);
}

.gas-shop-widget-learningpass-main-title {
    font-size: var(--gas-text-xl);
    font-weight: var(--gas-weight-bold, 700);
    color: var(--gas-primary, #004253);
    margin: 0 0 var(--gas-space-m, 16px) 0;
}

.gas-shop-widget-learningpass-header h3 {
    margin: 0 0 var(--gas-space-xs, 4px) 0;
    color: var(--gas-primary, #004253);
    font-size: var(--gas-text-l);
    font-weight: var(--gas-weight-bold, 700);
}

.gas-shop-widget-learningpass-period {
    color: var(--gas-neutral-500);
    font-size: var(--gas-text-xs);
    margin-bottom: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-description {
    margin: var(--gas-space-s, 8px) 0;
    padding: var(--gas-space-s, 8px);
    background: var(--gas-neutral-100, #f8f9fa);
    border-radius: var(--gas-radius-s, 4px);
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-normal, 1.5);
}

.gas-shop-widget-learningpass-description p:last-child {
    margin-bottom: 0;
}

.gas-shop-widget-learningpass-price {
    margin: var(--gas-space-s, 8px) 0;
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 16px);
    background: linear-gradient(135deg, var(--gas-primary, #004253) 0%, var(--gas-primary-dark, #00303d) 100%);
    border-radius: var(--gas-radius-m, 6px);
    text-align: center;
}

.gas-shop-widget-learningpass-price-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--gas-text-xs);
    margin-bottom: var(--gas-space-xs, 2px);
}

.gas-shop-widget-learningpass-price-amount {
    display: block;
    color: var(--gas-text-color-inverse, #fff);
    font-size: var(--gas-text-xl);
    font-weight: var(--gas-weight-bold, 700);
}

.gas-shop-widget-learningpass-replacement-notice {
    background: var(--gas-warning-light, #fff3cd);
    border: 1px solid var(--gas-warning, #ffc107);
    border-radius: var(--gas-radius-m, 6px);
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 12px);
    margin-bottom: var(--gas-space-s, 8px);
    color: var(--gas-warning-text, #856404);
    line-height: var(--gas-leading-normal, 1.5);
    font-size: var(--gas-text-s);
}

.gas-shop-widget-learningpass-replacement-notice strong {
    display: block;
    margin-top: var(--gas-space-xs, 4px);
    color: var(--gas-warning-text-strong, #664d03);
}

/* Already owned (simple) */
.gas-shop-widget-learningpass-already-owned-simple {
    margin-top: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-badge-simple {
    display: flex;
    align-items: center;
    gap: var(--gas-space-s, 8px);
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 16px);
    background: var(--gas-success-light, #d4edda);
    border-radius: var(--gas-radius-m, 6px);
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-s);
}

.gas-badge-icon-simple {
    font-size: var(--gas-text-l);
    color: var(--gas-success, #28a745);
    font-weight: var(--gas-weight-bold, 700);
}

/* Already owned (detailed) */
.gas-shop-widget-learningpass-already-owned {
    background: var(--gas-success-light, #d4edda);
    border-radius: var(--gas-radius-m, 6px);
    padding: var(--gas-space-m, 16px);
    margin: var(--gas-space-s, 8px) 0;
}

.gas-shop-widget-learningpass-badge {
    display: inline-block;
    background: var(--gas-success, #28a745);
    color: var(--gas-text-color-inverse, #fff);
    padding: 2px var(--gas-space-s, 8px);
    border-radius: var(--gas-radius-full, 9999px);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi, 600);
    margin-bottom: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-already-owned p {
    margin: var(--gas-space-xs, 4px) 0;
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-s);
}

.gas-pass-renewal-info {
    font-size: var(--gas-text-xs);
    opacity: 0.85;
}

.gas-info-icon {
    margin-right: var(--gas-space-xs, 4px);
}

/* Renewal available */
.gas-shop-widget-learningpass-renewal-available {
    margin: var(--gas-space-s, 8px) 0;
}

.gas-shop-widget-learningpass-renewal-badge {
    display: flex;
    align-items: center;
    gap: var(--gas-space-s, 8px);
    font-weight: var(--gas-weight-semi, 600);
    color: var(--gas-primary, #004253);
    margin-bottom: var(--gas-space-s, 8px);
    font-size: var(--gas-text-s);
}

.gas-renewal-icon {
    font-size: var(--gas-text-l);
}

.gas-renewal-info-box {
    background: var(--gas-primary-ultra-light);
    border-left: 3px solid var(--gas-primary, #004253);
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 12px);
    border-radius: 0 var(--gas-radius-s, 4px) var(--gas-radius-s, 4px) 0;
    margin-bottom: var(--gas-space-s, 8px);
    font-size: var(--gas-text-s);
}

.gas-renewal-info-box p {
    margin: var(--gas-space-xs, 4px) 0;
}

.gas-renewal-current-pass {
    color: var(--gas-neutral-700);
}

.gas-renewal-encourage {
    color: var(--gas-success-dark, #0f5132);
}

.gas-check-icon {
    color: var(--gas-success, #28a745);
    margin-right: var(--gas-space-xs, 4px);
}

.gas-renewal-benefit {
    font-size: var(--gas-text-xs);
    color: var(--gas-neutral-500);
    font-style: italic;
}

/* In cart */
.gas-shop-widget-learningpass-in-cart {
    text-align: center;
    padding: var(--gas-space-m, 16px) 0;
}

.gas-shop-widget-learningpass-notice {
    font-weight: var(--gas-weight-semi, 600);
    color: var(--gas-primary, #004253);
    margin-bottom: var(--gas-space-s, 8px);
    font-size: var(--gas-text-s);
}

/* Login / Member required */
.gas-shop-widget-learningpass-member-only-badge {
    display: inline-block;
    background: var(--gas-accent-ultra-light);
    color: var(--gas-accent-dark);
    padding: var(--gas-space-xs, 4px) var(--gas-space-m, 12px);
    border-radius: var(--gas-radius-full, 9999px);
    font-size: var(--gas-text-xs);
    font-weight: var(--gas-weight-semi, 600);
    margin: var(--gas-space-s, 8px) 0;
}

.gas-shop-widget-learningpass-actions-compact {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s, 8px);
    margin-top: var(--gas-space-s, 8px);
}

/* Info box */
.gas-shop-widget-learningpass-info {
    background: var(--gas-primary-ultra-light);
    border-left: 3px solid var(--gas-primary, #004253);
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 12px);
    margin: var(--gas-space-s, 8px) 0;
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass-info p {
    margin: 0 0 var(--gas-space-xs, 4px) 0;
    color: var(--gas-primary-dark);
}

.gas-shop-widget-learningpass-info ul {
    margin: var(--gas-space-xs, 4px) 0 0 var(--gas-space-m, 16px);
    color: var(--gas-primary-dark);
    padding-left: var(--gas-space-m, 16px);
}

.gas-shop-widget-learningpass-info li {
    margin: var(--gas-space-xs, 2px) 0;
}

/* Cart warning */
.gas-shop-widget-learningpass-cart-warning {
    background: var(--gas-warning-light, #fff3cd);
    border: 1px solid var(--gas-warning, #ffeaa7);
    border-radius: var(--gas-radius-m, 6px);
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 12px);
    margin: var(--gas-space-s, 8px) 0;
}

.gas-shop-widget-learningpass-cart-warning-text {
    margin: var(--gas-space-xs, 4px) 0 0 0;
    font-size: var(--gas-text-xs);
    color: var(--gas-warning-text, #856404);
    line-height: 1.4;
}

/* Checkbox label */
.gas-shop-widget-learningpass .gas-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--gas-space-s, 8px);
    font-size: var(--gas-text-xs);
    cursor: pointer;
}

/* Button shared for LearningPass */
.gas-shop-widget-learningpass .gas-shop-widget-btn {
    display: inline-block;
    padding: var(--gas-space-s, 8px) var(--gas-space-m, 16px);
    border-radius: var(--gas-radius-m, 6px);
    text-decoration: none;
    font-weight: var(--gas-weight-semi, 600);
    text-align: center;
    transition: all var(--gas-transition-normal, 0.15s ease);
    border: none;
    cursor: pointer;
    font-size: var(--gas-text-s);
    line-height: var(--gas-leading-normal, 1.5);
}

.gas-shop-widget-learningpass .gas-shop-widget-btn-primary {
    background: var(--gas-primary, #004253);
    color: var(--gas-text-color-inverse, #fff);
}

.gas-shop-widget-learningpass .gas-shop-widget-btn-primary:hover {
    background: var(--gas-primary-dark);
    transform: translateY(-1px);
    color: var(--gas-text-color-inverse, #fff);
}

.gas-shop-widget-learningpass .gas-shop-widget-btn-secondary {
    background: var(--gas-bg-surface, #fff);
    color: var(--gas-primary, #004253);
    border: 2px solid var(--gas-primary, #004253);
}

.gas-shop-widget-learningpass .gas-shop-widget-btn-secondary:hover {
    background: var(--gas-primary-ultra-light);
}

/* Add to cart button */
.gas-shop-widget-learningpass .gas-shop-add-to-cart-button {
    width: 100%;
}


/* =============================================
   Style: Default LearningPass
   ============================================= */

.gas-shop-widget-learningpass--default {
    background: var(--gas-bg-surface, #fff);
    border: 2px solid var(--gas-primary, #004253);
    border-radius: var(--gas-radius-m, 8px);
    padding: var(--gas-space-m, 16px);
    margin: var(--gas-space-m, 16px) 0;
    max-width: 480px;
}


/* =============================================
   Style: Horizontal LearningPass — 2 colonnes
   ============================================= */

.gas-shop-widget-learningpass--horizontal {
    background: var(--gas-bg-surface, #fff);
    border: 2px solid var(--gas-primary, #004253);
    border-radius: var(--gas-radius-m, 8px);
    padding: var(--gas-space-l, 24px);
    margin: var(--gas-space-l, 20px) 0;
    max-width: 100%;
    width: 100%;
}

/* Titre principal dans la colonne info */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-main-title {
    margin: 0 0 var(--gas-space-s, 8px) 0;
}

/* Grille 2 colonnes : infos | actions */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-body {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: var(--gas-space-l, 24px);
    align-items: start;
}

/* Colonne gauche : contenu */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-info {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s, 8px);
}

/* Colonne droite : prix + actions — compact */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s, 8px);
    background: var(--gas-neutral-50, #f8f9fa);
    border-radius: var(--gas-radius-m, 8px);
    padding: var(--gas-space-s, 12px) var(--gas-space-m, 16px);
    border: 1px solid var(--gas-neutral-200, #e9ecef);
    align-self: start;
}

/* Prix réduit dans la colonne actions */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-price {
    margin: 0;
    padding: var(--gas-space-s, 8px);
    border-radius: var(--gas-radius-s, 4px);
}

.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-price-label {
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-price-amount {
    font-size: var(--gas-text-l);
}

/* Boutons compacts pleine largeur */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-btn {
    width: 100%;
    text-align: center;
    padding: var(--gas-space-xs, 6px) var(--gas-space-m, 16px);
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-actions-compact {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-xs, 6px);
}

/* Member badge compact et centré */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-member-only-badge {
    text-align: center;
    display: block;
    font-size: var(--gas-text-xs);
    padding: 2px var(--gas-space-s, 8px);
    margin: 0;
}

/* Info box compact */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-info {
    margin: 0;
    padding: var(--gas-space-xs, 4px) var(--gas-space-s, 8px);
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-info ul {
    margin: var(--gas-space-xs, 2px) 0 0 var(--gas-space-s, 12px);
    padding-left: var(--gas-space-s, 10px);
}

/* Cart warning compact */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-cart-warning {
    margin: 0;
    padding: var(--gas-space-xs, 4px) var(--gas-space-s, 8px);
    font-size: var(--gas-text-xs);
}

/* Renewal 2 colonnes internes */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-renewal-available .gas-renewal-info-box {
    margin-bottom: 0;
}

/* Info box dans colonne actions */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-info {
    margin: 0;
}

/* Cart warning dans colonne actions */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions .gas-shop-widget-learningpass-cart-warning {
    margin: 0;
}

/* Already owned — pleine largeur */
.gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-already-owned-simple {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .gas-shop-widget-learningpass--horizontal {
        padding: var(--gas-space-m, 16px);
    }

    .gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-body {
        grid-template-columns: 1fr;
        gap: var(--gas-space-m, 16px);
    }

    .gas-shop-widget-learningpass--horizontal .gas-shop-widget-learningpass-col-actions {
        padding: var(--gas-space-m, 16px);
    }
}


/* =============================================
   Style: Compact LearningPass
   ============================================= */

.gas-shop-widget-learningpass--compact {
    background: var(--gas-bg-surface, #fff);
    border: 2px solid var(--gas-primary, #004253);
    border-radius: var(--gas-radius-m, 8px);
    padding: var(--gas-space-m, 16px);
    margin: var(--gas-space-m, 16px) 0;
    max-width: 300px;
    text-align: center;
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-learningpass-main-title {
    font-size: var(--gas-text-l);
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-learningpass-header h3 {
    font-size: var(--gas-text-m);
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-learningpass-savings-total-label {
    font-size: var(--gas-text-m);
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-learningpass-price-amount {
    font-size: var(--gas-text-xl);
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-learningpass-actions-compact {
    align-items: stretch;
}

.gas-shop-widget-learningpass--compact .gas-shop-widget-btn {
    width: 100%;
}

/* Compact renewal override */
.gas-shop-widget-learningpass-renewal-compact {
    text-align: center;
}


/* =============================================
   Savings section
   ============================================= */

.gas-shop-widget-learningpass-savings {
    background: linear-gradient(135deg, var(--gas-success-light, #d4edda) 0%, var(--gas-success-lighter, #c3e6cb) 100%);
    border: 2px solid var(--gas-success, #28a745);
    border-radius: var(--gas-radius-m, 8px);
    padding: var(--gas-space-m, 16px);
    margin: var(--gas-space-m, 16px) 0;
}

.gas-shop-widget-learningpass-savings-header {
    display: flex;
    align-items: center;
    gap: var(--gas-space-s, 8px);
    margin-bottom: var(--gas-space-s, 12px);
}

.gas-shop-widget-learningpass-savings-icon {
    font-size: var(--gas-text-xl);
}

.gas-shop-widget-learningpass-savings-title {
    margin: 0;
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-m);
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass-savings-summary {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--gas-radius-m, 6px);
    padding: var(--gas-space-s, 12px);
    margin-bottom: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-savings-comparison {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s, 8px);
    margin-bottom: var(--gas-space-s, 10px);
    padding-bottom: var(--gas-space-s, 10px);
    border-bottom: 2px solid var(--gas-success, #28a745);
}

.gas-shop-widget-learningpass-savings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gas-shop-widget-learningpass-savings-item--highlight {
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass-savings-label {
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-s);
}

.gas-shop-widget-learningpass-savings-value {
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-m);
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass-savings-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--gas-success, #28a745);
    color: var(--gas-text-color-inverse, #fff);
    padding: var(--gas-space-s, 8px);
    border-radius: var(--gas-radius-m, 6px);
    margin-top: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-savings-total-label {
    font-size: var(--gas-text-m);
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass-savings-total-value {
    font-size: var(--gas-text-l);
    font-weight: var(--gas-weight-bold, 700);
}

.gas-shop-widget-learningpass-savings-percentage {
    font-size: var(--gas-text-s);
    opacity: 0.9;
    margin-left: var(--gas-space-xs, 4px);
}

/* Details toggle */
.gas-shop-widget-learningpass-savings-details {
    margin-top: var(--gas-space-s, 12px);
}

.gas-shop-widget-learningpass-savings-details-toggle {
    cursor: pointer;
    color: var(--gas-success-text, #155724);
    font-weight: var(--gas-weight-semi, 600);
    font-size: var(--gas-text-s);
    padding: var(--gas-space-s, 8px);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--gas-radius-s, 4px);
    list-style: none;
}

.gas-shop-widget-learningpass-savings-details-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
}

.gas-shop-widget-learningpass-savings-details-toggle::marker {
    content: none;
}

.gas-shop-widget-learningpass-savings-details[open] .gas-shop-widget-learningpass-savings-details-toggle {
    margin-bottom: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-savings-products {
    display: flex;
    flex-direction: column;
    gap: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-savings-product {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--gas-success, #28a745);
    border-radius: var(--gas-radius-m, 6px);
    padding: var(--gas-space-s, 10px);
}

.gas-shop-widget-learningpass-savings-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--gas-space-s, 8px);
    font-weight: var(--gas-weight-semi, 600);
    color: var(--gas-success-text, #155724);
    font-size: var(--gas-text-s);
}

.gas-shop-widget-learningpass-savings-product-qty {
    background: var(--gas-success, #28a745);
    color: var(--gas-text-color-inverse, #fff);
    padding: 2px var(--gas-space-s, 8px);
    border-radius: var(--gas-radius-full, 9999px);
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass-savings-product-prices {
    font-size: var(--gas-text-xs);
}

.gas-shop-widget-learningpass-savings-product-price {
    display: flex;
    justify-content: space-between;
    margin: var(--gas-space-xs, 4px) 0;
}

.gas-shop-widget-learningpass-savings-product-price--highlight {
    font-weight: var(--gas-weight-semi, 600);
}

.gas-shop-widget-learningpass-savings-product-saving {
    margin-top: var(--gas-space-s, 8px);
    padding-top: var(--gas-space-s, 8px);
    border-top: 1px solid var(--gas-success, #28a745);
    color: var(--gas-success, #28a745);
    font-weight: var(--gas-weight-semi, 600);
    text-align: right;
    font-size: var(--gas-text-s);
}

/* Savings compact variant */
.gas-shop-widget-learningpass-savings--compact {
    padding: var(--gas-space-s, 12px);
    margin: var(--gas-space-s, 12px) 0;
}

.gas-shop-widget-learningpass-savings--compact .gas-shop-widget-learningpass-savings-title {
    font-size: var(--gas-text-s);
}

.gas-shop-widget-learningpass-savings--compact .gas-shop-widget-learningpass-savings-icon {
    font-size: var(--gas-text-l);
}

.gas-shop-widget-learningpass-savings--compact .gas-shop-widget-learningpass-savings-summary {
    padding: var(--gas-space-s, 8px);
}

.gas-shop-widget-learningpass-savings--compact .gas-shop-widget-learningpass-savings-total-value {
    font-size: var(--gas-text-m);
}

/* Savings horizontal variant */
.gas-shop-widget-learningpass-savings--horizontal {
    margin: var(--gas-space-s, 12px) 0;
}