/**
 * Pagine device-specific: /iphone-wallpapers, /ipad, /desktop.
 * Riusa lo stile dei pill matching; qui solo: padding-top, riga licenza CC,
 * pill device + modal "Scarica l'App".
 */

/* Spaziatura sopra: distacco dal menu orizzontale dell'header. */
.wc-page-device {
    padding-top: 28px;
}

@media (max-width: 640px) {
    .wc-page-device {
        padding-top: 18px;
    }
}

/* License card (Creative Commons) — info card in brand-tinted surface. */
.wc-license-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 8px 0 22px;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--wc-brand, #1e63d4) 7%, var(--wc-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--wc-brand, #1e63d4) 20%, transparent);
    border-radius: 14px;
}

.wc-license-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--wc-brand, #1e63d4) 14%, var(--wc-surface, #fff));
    color: var(--wc-brand, #1e63d4);
}

.wc-license-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.wc-license-card__title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--wc-ink, #0f1d36);
    line-height: 1.3;
}

.wc-license-card__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--wc-mute, #57667d);
}

.wc-license-card__text strong {
    color: var(--wc-ink, #0f1d36);
    font-weight: 600;
}

.wc-license-card__text a {
    color: var(--wc-brand, #1e63d4);
    font-weight: 600;
    text-decoration: none;
}

.wc-license-card__text a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .wc-license-card {
        gap: 12px;
        padding: 12px 14px;
    }
    .wc-license-card__icon {
        width: 36px;
        height: 36px;
    }
}

/* Segmented control device — full-width, 3 segmenti equal-flex. */
.wc-device-switch {
    display: flex;
    width: 100%;
    margin: 0 0 22px;
    padding: 5px;
    background: color-mix(in srgb, var(--wc-ink, #0f1d36) 6%, var(--wc-surface, #fff));
    border: 1px solid var(--wc-border, #e3e7ee);
    border-radius: 14px;
    gap: 4px;
}

.wc-device-switch__seg {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 11px 10px;
    border-radius: 10px;
    background: transparent;
    color: var(--wc-mute, #57667d);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.wc-device-switch__seg:hover {
    color: var(--wc-ink, #0f1d36);
    background: color-mix(in srgb, var(--wc-ink, #0f1d36) 4%, transparent);
}

.wc-device-switch__seg.is-active {
    background: var(--wc-brand, #1e63d4);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--wc-brand, #1e63d4) 35%, transparent);
}

.wc-device-switch__seg.is-active:hover {
    background: var(--wc-brand, #1e63d4);
    color: #fff;
}

.wc-device-switch__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.wc-device-switch__label {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .wc-device-switch {
        padding: 4px;
    }
    .wc-device-switch__seg {
        padding: 10px 6px;
        font-size: 13px;
        gap: 6px;
    }
    .wc-device-switch__icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Link "scarica la nostra app" nel testo intro: brand color. */
.wc-page-device .wc-page-intro__body a {
    color: var(--wc-brand, #1e63d4);
    font-weight: 600;
    text-decoration: none;
}

.wc-page-device .wc-page-intro__body a:hover {
    text-decoration: underline;
}

/* ──────────────────────────────────────────────────────────────
   App Download Modal (componente globale, partial: components/app-download-modal)
   ────────────────────────────────────────────────────────────── */

.wc-app-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-app-modal[hidden] { display: none; }

.wc-app-modal__card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 36px 28px 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    /* Centra anche l'icona orizzontalmente. */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wc-app-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.wc-app-modal__close:hover {
    background: #e6e6e6;
    color: #555;
}

.wc-app-modal__icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    margin-bottom: 18px;
    display: block;
}

.wc-app-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px;
    line-height: 1.25;
}

.wc-app-modal__text {
    font-size: 14px;
    color: #6e6e73;
    margin: 0 0 22px;
    line-height: 1.5;
    max-width: 320px;
}

.wc-app-modal__badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wc-app-modal__badge {
    display: inline-flex;
    align-items: center;
    height: 42px;
    line-height: 0;
}

.wc-app-modal__badge img {
    height: 42px;
    width: auto;
    display: block;
}

.wc-app-modal__badge--play img {
    /* I badge ufficiali Google Play hanno padding nativo: compensiamo per parità altezza. */
    height: 62px;
    margin: -10px 0;
}
