/**
 * Cadastro pricing / signup flows — small screens: less chrome, more content.
 * Loaded after page_level_styles so it overrides inline rules on cadastro/index.
 */

@media (max-width: 767.98px) {
    body.cadastro-shell {
        padding-bottom: calc(2.65rem + env(safe-area-inset-bottom, 0px));
    }

    body.cadastro-shell footer.cadastro-footer {
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        font-size: 0.7rem;
        line-height: 1.25;
    }

    body.cadastro-shell .page-header,
    body.cadastro-shell .plan-comparison-header {
        padding: 0.35rem 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    body.cadastro-shell .page-header .container,
    body.cadastro-shell .plan-comparison-header .container {
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
    }

    body.cadastro-shell .page-header .logo-img,
    body.cadastro-shell .plan-comparison-header .logo-img {
        height: 32px;
        max-width: 132px;
    }

    body.cadastro-shell .page-header .help-link,
    body.cadastro-shell .plan-comparison-header .help-link {
        font-size: 0.8125rem;
    }

    /* Kill vertical centering + huge min-height so content scrolls above footer */
    body.cadastro-shell .pricing-section {
        min-height: 0 !important;
        padding: 0.5rem 0.25rem 0.75rem !important;
        align-items: flex-start !important;
        display: flex;
        flex-direction: column;
    }

    body.cadastro-shell .pricing-section .container {
        padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
        width: 100%;
        max-width: 100%;
    }

    body.cadastro-shell .pricing-section .row {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    body.cadastro-shell .pricing-section .xs-padding {
        padding: 0.35rem 0.25rem !important;
    }

    body.cadastro-shell .pricing-wrap,
    body.cadastro-shell .plan-comparison-wrap.pricing-wrap {
        border-radius: 10px;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    body.cadastro-shell .pricing-box {
        min-height: 0 !important;
    }

    body.cadastro-shell .pricing-container,
    body.cadastro-shell .company-info,
    body.cadastro-shell .plan-comparison-wrap .pricing-container,
    body.cadastro-shell .plan-comparison-wrap .company-info {
        padding: 0.85rem 0.65rem !important;
    }

    body.cadastro-shell .plan-badge,
    body.cadastro-shell .plan-comparison-wrap .plan-badge {
        margin-bottom: 0.45rem;
        padding: 4px 10px;
        font-size: 10px;
        letter-spacing: 0.04em;
        line-height: 1.2;
    }

    body.cadastro-shell .pricing-head h2,
    body.cadastro-shell .plan-comparison-wrap .pricing-head h2 {
        font-size: 1.35rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.65rem !important;
    }

    body.cadastro-shell .price-section,
    body.cadastro-shell .plan-comparison-wrap .price-section {
        padding: 0.65rem 0.75rem !important;
        margin-bottom: 0.65rem !important;
    }

    body.cadastro-shell .trial-badge {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        margin-bottom: 0.65rem;
        line-height: 1.35;
        white-space: normal;
    }

    body.cadastro-shell .price-display,
    body.cadastro-shell .plan-comparison-wrap .price-display {
        margin-bottom: 0.25rem;
    }

    body.cadastro-shell .price-value,
    body.cadastro-shell .plan-comparison-wrap .price-value {
        font-size: 1.65rem !important;
        line-height: 1.1 !important;
    }

    body.cadastro-shell .currency,
    body.cadastro-shell .plan-comparison-wrap .currency {
        font-size: 1rem !important;
    }

    body.cadastro-shell .price-period,
    body.cadastro-shell .plan-comparison-wrap .price-period {
        font-size: 0.875rem !important;
    }

    body.cadastro-shell .price-description {
        font-size: 0.75rem;
        margin-top: 0.15rem;
    }

    body.cadastro-shell .value-props,
    body.cadastro-shell .plan-comparison-wrap .value-props {
        padding: 0.65rem 0.75rem;
    }

    body.cadastro-shell .value-item,
    body.cadastro-shell .plan-comparison-wrap .value-item {
        padding: 0.35rem 0;
        gap: 0.5rem;
    }

    body.cadastro-shell .value-item span,
    body.cadastro-shell .plan-comparison-wrap .value-item span {
        font-size: 0.8125rem;
    }

    body.cadastro-shell .value-item i,
    body.cadastro-shell .plan-comparison-wrap .value-item i {
        font-size: 1rem;
    }

    body.cadastro-shell .pricing-list {
        margin-top: 0.75rem;
    }

    body.cadastro-shell .form-header,
    body.cadastro-shell .plan-comparison-wrap .form-header {
        margin-bottom: 0.85rem;
    }

    body.cadastro-shell .form-header h3,
    body.cadastro-shell .plan-comparison-wrap .form-header h3 {
        font-size: 1.15rem !important;
        margin-bottom: 0.25rem !important;
    }

    body.cadastro-shell .form-header .subtitle,
    body.cadastro-shell .plan-comparison-wrap .form-header .subtitle {
        font-size: 0.8125rem;
    }

    body.cadastro-shell .trial-notice {
        padding: 0.55rem 0.65rem;
        margin-bottom: 0.85rem;
        gap: 0.5rem;
    }

    body.cadastro-shell .trial-notice span {
        font-size: 0.8125rem;
    }

    body.cadastro-shell .trial-notice i {
        font-size: 1rem;
    }

    body.cadastro-shell .target-plan-container,
    body.cadastro-shell .plan-comparison-wrap .target-plan-container {
        padding: 0.85rem 0.65rem !important;
        margin-bottom: 0.75rem;
    }

    body.cadastro-shell .target-plan-container h2,
    body.cadastro-shell .plan-comparison-wrap .target-plan-container h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    body.cadastro-shell .plan-comparison-actions {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    body.cadastro-shell .plan-comparison-wrap .btn-plan-cta {
        padding: 0.65rem 1rem;
        font-size: 0.9375rem;
    }

    body.cadastro-shell .plan-upgrade-differences--scroll {
        max-height: min(40vh, 320px);
    }

    /*
     * Google / auth row buttons: avoid wrapped labels in a fixed-height bar;
     * keep icon + text vertically centered on one line.
     */
    body.cadastro-shell .google-container .gsi-material-button {
        height: auto !important;
        min-height: 48px !important;
        padding: 10px 12px !important;
        font-size: 0.8125rem !important;
        line-height: 1.25 !important;
    }

    body.cadastro-shell .google-container .gsi-material-button .gsi-material-button-content-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        gap: 0.5rem;
    }

    body.cadastro-shell .google-container .gsi-material-button .gsi-material-button-icon {
        flex-shrink: 0;
        margin-right: 0 !important;
        align-self: center;
    }

    body.cadastro-shell .google-container .gsi-material-button .gsi-material-button-contents {
        white-space: nowrap !important;
        font-size: inherit !important;
        line-height: 1.25 !important;
    }

    body.cadastro-shell .btn-passkey-signup,
    body.cadastro-shell .btn-email-signup {
        height: auto !important;
        min-height: 48px;
        padding: 10px 12px !important;
        font-size: 0.8125rem !important;
        line-height: 1.25 !important;
        white-space: nowrap;
    }
}
