/**
 * web-payments.css — stili della monetizzazione web (Stripe).
 * Incluso dalla shell PHP solo quando window.TY_WEB === true.
 * I nomi delle classi delle card pricing / form gift card sono gli stessi
 * della webapp legacy: eventuale CSS custom dei canali continua a valere.
 * Qui solo il layout di base che nel capacitor non esiste.
 */

/* ---------------- pricing (pagina checkout) ---------------- */

/* lo sfondo (anche custom del canale) va a tutta larghezza:
   è il CONTENUTO interno a essere vincolato e centrato */
.pageMob-checkout .premiumContents {
    padding: 20px 12px 60px;
}

.pageMob-checkout .premiumContents .titlePaymentPreview {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.pageMob-checkout .premiumContents .flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
}

.pageMob-checkout .itemPricing {
    flex: 0 1 320px;
    max-width: 360px;
    width: 100%;
    cursor: pointer;
    display: flex;
}

.pageMob-checkout .itemPricingContent {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 24px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pageMob-checkout .itemPricingContent.itemPricingFeatured {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
}

.pageMob-checkout .full-description-premium-pack {
    font-size: 13px;
    opacity: 0.8;
    white-space: pre-line;
}

/* ---------------- gift card: form ---------------- */

.pageMob-giftcard #paymentGiftcardForm {
    padding: 20px 12px 60px;
    margin: 0 auto;
}

.pageMob-giftcard_redeem .fixed_w_s {
    max-width: 420px;
    margin: 40px auto;
    padding: 0 12px;
}

/* ---------------- gift card: dropdown custom ----------------
   (nella webapp questi stili erano iniettati via JS da giftcard.js) */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    cursor: pointer;
}

.selected-option {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
}

.selected-option .option-item {
    pointer-events: none;
}

.options-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.custom-select.open .options-list {
    display: block;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
    transition: background-color 0.2s;
}

.option-item:hover {
    background-color: #f5f5f5;
}

.option-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-info .title {
    font-weight: bold;
    color: black;
}

.option-info .description {
    font-size: 12px;
    color: #666;
}

.option-item .price {
    font-weight: bold;
    color: black;
    white-space: nowrap;
}

/* ---------------- pagina pagamenti (profilo) ---------------- */

.pageMob-payments .ty-web-payments {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 12px 60px;
}

.pageMob-payments .ty-web-payments-actions .button-soft {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pageMob-payments .list-subscriptions-user > div {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pageMob-payments .ty-web-charge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pageMob-payments .ty-web-charge-row a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* ---------------- thank you ---------------- */

.pageMob-thankyou .ty-web-thankyou {
    max-width: 520px;
    margin: 60px auto;
    padding: 0 12px;
    color: #fff;
}

.pageMob-thankyou .ty-web-thankyou img {
    max-width: 100%;
    border-radius: 10px;
}

/* ---------------- checkout dentro l'app nativa (IAP) ----------------
   Stessa pagina del web (js/native-payments.js riusa tyWebRenderPricing),
   ma tarata sul tap: colonna singola, card compatte a tutta larghezza,
   call to action grande. Fuori dall'app nativa niente di questo si applica. */

html.ty-native .pageMob-checkout .premiumContents {
    padding: 14px 14px 90px;
}

html.ty-native .pageMob-checkout .premiumContents .titlePaymentPreview {
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 18px !important;
}

html.ty-native .pageMob-checkout .premiumContents .flex-row {
    gap: 12px;
}

html.ty-native .pageMob-checkout .itemPricing {
    flex: 1 1 100%;
    max-width: 520px;
    /* lo zoom all'hover sul touch resta "appiccicato" dopo il tap */
    transform: none !important;
    transition: none;
}

html.ty-native .pageMob-checkout .itemPricingContent {
    padding: 16px;
    border-radius: 12px;
}

html.ty-native .pageMob-checkout .itemPricingContent h1 {
    font-size: 26px;
    margin: 6px 0 0;
}

html.ty-native .pageMob-checkout .title-section-premium-pack {
    font-size: 18px;
    margin-top: 0 !important;
}

html.ty-native .pageMob-checkout .description-premium-pack {
    font-size: 14px;
}

html.ty-native .pageMob-checkout .full-description-premium-pack {
    font-size: 13px;
}

html.ty-native .pageMob-checkout .callToAction {
    display: block;
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    text-align: center;
}

/* rimando alla gestione abbonamenti dello store */
html.ty-native .pageMob-checkout .ty-native-store-manage {
    display: block;
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    opacity: 0.75;
}
