/* =========================================================
   GS_MOBILE_PLAN_GRID_V1
   GS_MOBILE_PLAN_COMPARISON_V1
   GS Central 1.12.11
   ========================================================= */

.gs-plan-name-short,
.gs-mobile-comparison-cards {
    display: none;
}

/* Evita que qualquer conteúdo dos cards amplie a página. */
.gs-portal-body .compact-segment-grid,
.gs-portal-body .public-plan-grid,
.gs-portal-body .signup-plan-grid,
.gs-portal-body .public-plan-card,
.gs-portal-body .compact-segment-card,
.gs-portal-body .signup-choice.plan,
.gs-portal-body .comparison-public,
.gs-portal-body .portal-table {
    min-width: 0;
    max-width: 100%;
}

/* =========================================================
   TABLET E CELULAR — DUAS COLUNAS
   ========================================================= */

@media (min-width: 340px) and (max-width: 768px) {
    /*
     * Soluções disponíveis.
     */
    .gs-portal-body .compact-segment-grid {
        display: grid !important;
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .gs-portal-body .compact-segment-card {
        min-height: 280px !important;
        padding: 11px !important;
        gap: 8px !important;
        border-radius: 14px !important;
    }

    .gs-portal-body .segment-card-header {
        min-height: 34px;
        gap: 6px;
    }

    .gs-portal-body
    .compact-segment-card
    .segment-icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 10px;
        font-size: 14px;
    }

    .gs-portal-body .segment-status-badge {
        max-width: 82px;
        padding: 4px 6px !important;
        overflow: hidden;
        font-size: 7px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gs-portal-body
    .compact-segment-card
    .segment-category {
        font-size: 7px;
    }

    .gs-portal-body
    .compact-segment-card
    h3 {
        display: -webkit-box;
        min-height: 34px;
        margin: 4px 0 5px;
        overflow: hidden;
        font-size: clamp(13px, 3.8vw, 17px) !important;
        line-height: 1.08;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .gs-portal-body
    .compact-segment-card
    .segment-description {
        display: -webkit-box;
        min-height: 46px;
        overflow: hidden;
        font-size: 8px !important;
        line-height: 1.42;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .gs-portal-body .segment-rating {
        min-height: 20px;
        font-size: 8px;
    }

    .gs-portal-body .segment-card-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding-top: 8px;
        font-size: 7px;
    }

    .gs-portal-body .segment-card-meta strong {
        overflow-wrap: anywhere;
        font-size: 8px;
    }

    .gs-portal-body .segment-card-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 5px !important;
    }

    .gs-portal-body
    .segment-card-actions
    .portal-btn,
    .gs-portal-body
    .segment-card-actions
    .portal-status-chip {
        width: 100%;
        min-height: 36px;
        padding: 7px 5px;
        font-size: 8px;
        line-height: 1.15;
        white-space: normal;
    }

    /*
     * Cards de planos da página pública e da página da solução.
     */
    .gs-portal-body .public-plan-grid,
    .gs-portal-body .public-plan-grid.detailed {
        display: grid !important;
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        align-items: stretch;
    }

    .gs-portal-body .public-plan-card {
        min-width: 0;
        min-height: 100%;
        padding: 11px !important;
        gap: 8px !important;
        border-radius: 14px !important;
    }

    .gs-portal-body
    .public-plan-card.featured {
        transform: none !important;
    }

    .gs-portal-body
    .public-plan-card
    header {
        min-width: 0;
        gap: 7px;
    }

    .gs-portal-body
    .public-plan-card
    header > span {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 10px;
        font-size: 14px;
    }

    .gs-portal-body
    .public-plan-card
    header div {
        min-width: 0;
    }

    .gs-portal-body
    .public-plan-card
    header small {
        max-width: 100%;
        overflow: hidden;
        font-size: 7px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gs-portal-body
    .public-plan-card
    h2,
    .gs-portal-body
    .public-plan-card
    h3 {
        display: -webkit-box;
        min-height: 30px;
        margin: 3px 0 0 !important;
        overflow: hidden;
        font-size: clamp(13px, 3.8vw, 17px) !important;
        line-height: 1.08;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .gs-portal-body
    .public-plan-card > p {
        display: -webkit-box;
        min-height: 42px;
        overflow: hidden;
        font-size: 8px !important;
        line-height: 1.4;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .gs-portal-body .public-plan-price {
        font-size: clamp(13px, 3.4vw, 17px) !important;
        line-height: 1.15;
    }

    .gs-portal-body .plan-public-price {
        min-height: 63px;
        gap: 2px;
        padding: 7px 0;
    }

    .gs-portal-body
    .plan-public-price
    strong {
        font-size: clamp(14px, 3.7vw, 18px) !important;
        line-height: 1.12;
        overflow-wrap: anywhere;
    }

    .gs-portal-body
    .plan-public-price
    span,
    .gs-portal-body
    .plan-public-price
    em {
        font-size: 7px !important;
        line-height: 1.25;
    }

    .gs-portal-body .plan-limit-list {
        gap: 4px;
        padding: 7px;
        border-radius: 10px;
    }

    .gs-portal-body
    .plan-limit-list
    div {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 5px;
        font-size: 7px;
        line-height: 1.25;
    }

    .gs-portal-body
    .plan-limit-list
    span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .gs-portal-body
    .plan-limit-list
    b {
        text-align: right;
        white-space: normal;
    }

    .gs-portal-body
    .plan-feature-list,
    .gs-portal-body
    .public-plan-card > ul {
        gap: 4px !important;
        font-size: 7px !important;
        line-height: 1.3;
    }

    .gs-portal-body
    .public-plan-card
    > .portal-btn {
        width: 100%;
        min-height: 40px;
        margin-top: auto;
        padding: 7px 5px;
        font-size: 8px;
        line-height: 1.15;
        white-space: normal;
    }

    /*
     * Escolha de plano dentro do cadastro.
     */
    .gs-portal-body .signup-plan-grid {
        display: grid !important;
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .gs-portal-body .signup-choice.plan {
        min-width: 0;
        min-height: 230px;
        padding: 10px !important;
        gap: 6px;
        border-radius: 13px;
    }

    .gs-portal-body
    .signup-choice.plan
    input {
        top: 8px;
        right: 8px;
        width: 16px;
        height: 16px;
    }

    .gs-portal-body
    .signup-choice.plan
    header {
        min-width: 0;
        padding-right: 12px;
        gap: 6px;
    }

    .gs-portal-body
    .signup-choice.plan
    header > span {
        width: 31px;
        height: 31px;
        flex: 0 0 31px;
        border-radius: 9px;
        font-size: 13px;
    }

    .gs-portal-body
    .signup-choice.plan
    header div {
        min-width: 0;
    }

    .gs-portal-body
    .signup-choice.plan
    header small {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: 7px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gs-portal-body
    .signup-choice.plan
    header strong {
        display: -webkit-box;
        overflow: hidden;
        font-size: clamp(12px, 3.5vw, 15px);
        line-height: 1.1;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .gs-portal-body
    .signup-choice.plan
    p {
        display: -webkit-box;
        min-height: 42px;
        margin: 0;
        overflow: hidden;
        font-size: 8px;
        line-height: 1.4;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }

    .gs-portal-body
    .signup-choice.plan
    em {
        font-size: 10px;
        font-weight: 800;
        line-height: 1.25;
    }

    .gs-portal-body
    .signup-choice.plan
    ul {
        margin-top: auto;
        padding-left: 13px;
        font-size: 7px;
        line-height: 1.35;
    }

    /*
     * Seletor mensal, semestral e anual.
     */
    .gs-portal-body .billing-toggle {
        display: grid !important;
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
        width: 100%;
        max-width: 520px;
        gap: 4px;
        padding: 4px;
    }

    .gs-portal-body
    .billing-toggle
    button {
        min-width: 0;
        min-height: 43px;
        padding: 6px 3px !important;
        font-size: 8px;
        line-height: 1.1;
    }

    .gs-portal-body
    .billing-toggle
    small {
        font-size: 6px;
        line-height: 1;
    }
}

/* =========================================================
   COMPARAÇÃO EM TABELA COMPACTA — 430PX A 768PX
   ========================================================= */

@media (min-width: 430px) and (max-width: 768px) {
    .gs-portal-body
    .gs-plan-comparison-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow: hidden !important;
        border-radius: 13px;
    }

    .gs-portal-body
    .gs-plan-comparison-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
    }

    .gs-portal-body
    .gs-plan-comparison-table
    th,
    .gs-portal-body
    .gs-plan-comparison-table
    td {
        min-width: 0;
        padding: 7px 3px !important;
        overflow-wrap: anywhere;
        font-size: 7px !important;
        line-height: 1.2;
    }

    .gs-portal-body
    .gs-plan-comparison-table
    th:first-child,
    .gs-portal-body
    .gs-plan-comparison-table
    td:first-child {
        width: 28%;
        padding-left: 6px !important;
        text-align: left;
    }

    .gs-portal-body
    .gs-plan-comparison-table
    th:not(:first-child),
    .gs-portal-body
    .gs-plan-comparison-table
    td:not(:first-child) {
        width: auto;
        text-align: center;
    }

    .gs-portal-body
    .gs-plan-comparison-table
    .feature-answer {
        padding: 3px 4px;
        font-size: 6px;
    }

    .gs-plan-name-full {
        display: none;
    }

    .gs-plan-name-short {
        display: inline;
    }
}

/* =========================================================
   COMPARAÇÃO EM CARDS — CELULARES MENORES
   ========================================================= */

@media (max-width: 429px) {
    .gs-portal-body
    .gs-plan-comparison-table-wrap {
        display: none !important;
    }

    .gs-portal-body
    .gs-mobile-comparison-cards {
        display: grid;
        gap: 7px;
        width: 100%;
    }

    .gs-portal-body
    .gs-mobile-comparison-card {
        min-width: 0;
        padding: 9px;
        border: 1px solid var(--portal-line);
        border-radius: 12px;
        background: rgba(255, 255, 255, .025);
    }

    .gs-portal-body
    .gs-mobile-comparison-card
    h3 {
        margin: 0 0 8px;
        font-size: 10px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .gs-portal-body
    .gs-mobile-comparison-values {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .gs-portal-body
    .gs-mobile-comparison-value {
        display: flex;
        min-width: 0;
        min-height: 51px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, .07);
        border-radius: 9px;
        background: rgba(255, 255, 255, .025);
    }

    .gs-portal-body
    .gs-mobile-comparison-value
    > span:first-child {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: var(--portal-muted);
        font-size: 7px;
        font-weight: 800;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gs-portal-body
    .gs-mobile-comparison-value
    strong {
        display: block;
        font-size: 9px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .gs-portal-body
    .gs-mobile-comparison-value
    .feature-answer {
        width: fit-content;
        padding: 3px 5px;
        font-size: 7px;
    }

    .gs-plan-name-full {
        display: none;
    }

    .gs-plan-name-short {
        display: inline;
    }
}

/* =========================================================
   TELAS MUITO ESTREITAS — UMA COLUNA
   ========================================================= */

@media (max-width: 339px) {
    .gs-portal-body .compact-segment-grid,
    .gs-portal-body .public-plan-grid,
    .gs-portal-body .public-plan-grid.detailed,
    .gs-portal-body .signup-plan-grid {
        grid-template-columns: 1fr !important;
    }

    .gs-portal-body .compact-segment-card,
    .gs-portal-body .signup-choice.plan {
        min-height: 0 !important;
    }
}

/* =========================================================
   PAISAGEM COM BAIXA ALTURA
   ========================================================= */

@media
    (max-width: 768px)
    and (orientation: landscape)
    and (max-height: 520px) {

    .gs-portal-body .public-plan-card,
    .gs-portal-body .compact-segment-card,
    .gs-portal-body .signup-choice.plan {
        padding: 9px !important;
    }

    .gs-portal-body .plans-hero {
        padding-top: 15px;
    }
}
