/* --- PALETA DE CORES OFICIAL PLAY --- */
/* Azul Marinho: #0F2F43 (Primária, Texto) */
/* Vermelho/Laranja: #ED3025 (Secundária, Ação/Destaque) */
/* Amarelo/Sand: #FFD004 (Fundo/Seleção Clara) */
:root {
    --play-navy: #0F2F43;
    --play-red: #ED3025;
    --play-yellow: #FFD004;
    --play-sand: #FFF8E1;
    --play-dark-orange: #d42c1f;
}

/* --- ESTILOS GERAIS E RESPONSIVIDADE --- */
body {
    /* Fundo do corpo em gradiente, como solicitado no projeto original */
    background: linear-gradient(to bottom, var(--play-red), var(--play-yellow));
    font-family: 'Franklin Gothic Demi Cond', 'Trakya Sans 700 Medium Italic', sans-serif;
    padding: 0;
    color: var(--play-navy);
}

.container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Cores Primárias (Azul Marinho) */
.text-primary-play {
    color: var(--play-navy);
}

.bg-primary-play {
    background-color: var(--play-navy);
}

/* Cores Secundárias (Vermelho/Laranja) */
.text-action-play {
    color: var(--play-red);
}

.bg-action-play {
    background-color: var(--play-red);
}

.btn-action-play {
    background-color: var(--play-red);
    color: white;
    border: 2px solid var(--play-dark-orange);
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-action-play:hover {
    background-color: var(--play-dark-orange);
    color: white;
}

/* Estilo para a área principal */
.main-content {
    background-color: white;
    padding: 30px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    margin-top: -5px;
}

/* Títulos */
h1,
h2,
h3,
h4 {
    font-family: 'Franklin Gothic Demi Cond', sans-serif;
    color: var(--play-navy);
    font-weight: 700;
}

/* Caixas de destaque (Wells) */
.well-play {
    background-color: var(--play-sand);
    border: 2px solid var(--play-yellow);
    color: var(--play-navy);
    border-radius: 8px;
    padding: 15px;
}

/* Sobrescreve classes antigas do JS (MANTIDO) */
.text-teal,
.text-orange {
    color: var(--play-navy) !important;
}

.btn-teal,
.btn-orange {
    background-color: var(--play-red) !important;
    border-color: var(--play-dark-orange) !important;
}

.btn-teal:hover,
.btn-orange:hover {
    background-color: var(--play-dark-orange) !important;
}

.panel-default[style*="#f97316"] {
    border-top: 4px solid var(--play-red) !important;
}

.panel-default[style*="#14b8a6"] {
    border-top: 4px solid var(--play-navy) !important;
}

.label-danger {
    background-color: var(--play-red);
}

.logo_empresa {
    margin: 25px auto;
}

/* --- AJUSTES DE RESPONSIVIDADE PARA MÓVEL --- */

@media (max-width: 767px) {
    h2 {
        font-size: 24px !important;
    }

    .court-card h4 {
        font-size: 16px !important;
    }

    .court-card .col-xs-4 h4 {
        font-size: 16px !important;
    }


    .btn {
        white-space: normal !important;
    }

    .logo_empresa {
        margin: 10px auto;
    }

}

/* ---------------------------------------------------------------------- */
/* --- NAVEGAÇÃO SUPERIOR (Flexbox Refactoring) */
/* ---------------------------------------------------------------------- */

.header-top-bar {
    background-color: var(--play-yellow);
    padding-top: 20px;
    padding-bottom: 20px;
}

.navigation-wrapper {
    display: flex;
    align-items: stretch;
    background-color: var(--play-red);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-selection-link {
    background-color: var(--play-red);
    color: white;
    padding: 15px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1.2;
    text-align: center;
    border-radius: 5px 0 0 0;
}

.text-center>.btn-group {
    width: 100%;
    margin-bottom: 0;
    display: flex;
    flex-grow: 1;
}

.text-center>.btn-group>a {
    flex-grow: 1;
    width: auto;
    float: none;
    min-width: 0;
    padding: 15px 10px !important;
    font-size: 14px;
    white-space: normal;
    line-height: 1.2;
    border: none !important;
    box-shadow: none !important;
}

.btn-tab-play {
    background-color: white;
    color: var(--play-navy);
    font-weight: bold;
    border-bottom: 2px solid var(--play-navy) !important;
}

.btn-tab-play.active {
    background-color: var(--play-red);
    color: white;
    border-bottom: none !important;
    z-index: 2;
}

/* Regras de arredondamento */
.text-center>.btn-group>a:first-child {
    border-radius: 0 0 0 0;
}

.text-center>.btn-group>a:last-child {
    border-radius: 0 5px 0 0;
}

/* Mídia Query para empilhar em telas muito pequenas (abaixo de 550px) */
@media (max-width: 550px) {

    .navigation-wrapper {
        flex-direction: column;
    }

    .back-selection-link {
        order: -1;
        border-radius: 5px 5px 0 0;
    }

    .text-center>.btn-group {
        flex-direction: column;
    }

    .text-center>.btn-group>a {
        width: 100%;
        margin-bottom: 2px;
        border-radius: 0 !important;
        border-bottom: none !important;
    }

    .text-center>.btn-group>a:first-child {
        border-radius: 0;
    }

    .text-center>.btn-group>a:last-child {
        border-radius: 0;
    }
}


/* --- BOTÃO DO PASSO 2 (CORREÇÃO DE QUEBRA DE TEXTO) --- */

#confirm-payment-btn {
    padding: 12px 10px !important;
    font-size: 20px !important;
    white-space: nowrap;
    /* IMPEDE A QUEBRA DE TEXTO */
    overflow: hidden;
}

/* --- CARDS DE QUADRA (4. Escolha a Quadra) --- */

.court-card {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    transition: border 0.2s, background-color 0.2s;
}

.court-card.selected {
    border: 3px solid var(--play-red);
    background-color: var(--play-sand);
}

.court-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.court-card .row {
    width: 100%;
    margin: 0;
}

.court-card .col-xs-8 {
    padding-left: 0;
    padding-right: 5px;
}

.court-card .col-xs-4 {
    padding-right: 0;
    padding-left: 5px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 480px) {

    .court-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .court-card .col-xs-8,
    .court-card .col-xs-4 {
        width: 100%;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }

    .court-card .col-xs-8 {
        margin-bottom: 8px;
    }

    .court-card .col-xs-4 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px dashed #ddd;
        padding-top: 8px;
    }
}


/* --- SLOTS DE TEMPO (5. Escolha o Horário) --- */

.btn-selection {
    border: 2px solid #ccc;
    background-color: white;
    color: var(--play-navy);
    box-shadow: none;
    transition: all 0.2s;
    border-radius: 6px;
    font-weight: 600;
}

.btn-selection > .text-muted {
    color: #b81111ff;
}

.btn-selection.active {
    background-color: var(--play-red);
    color: white;
    border-color: var(--play-red);
    box-shadow: 0 0 8px rgba(237, 48, 37, 0.5);
    z-index: 10;
}

.btn-selection.active > .text-muted {
    color: white;
}




.btn-group-justified {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
}

.btn-group-justified a {
    flex: 1 1 50%;
    min-width: 0;
    font-size: 14px;
    margin: 2px;
}

@media (max-width: 450px) {

    .btn-group-justified a {
        flex: 1 1 100%;
    }
}


/* --- OPÇÃO DE PAGAMENTO (RESUMO - CORRIGIDO OVERLAP) --- */

.btn-payment {
    /* NOVO ESTADO PADRÃO: Azul Marinho (cor principal) */
    border: 2px solid var(--play-navy);
    background-color: var(--play-navy);
    /* Fundo Azul Marinho */
    color: white;
    /* Texto Branco */
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

/* NOVO ESTADO ATIVO/SELECIONADO (a classe .active é aplicada no <a class="btn-payment active">) */
.btn-payment.active {
    /* NOVO ESTADO ATIVO: Branco com texto Azul Marinho */
    background-color: white;
    color: var(--play-navy);
    border-color: var(--play-navy);
    /* Borda Azul Marinho */
    box-shadow: 0 0 8px rgba(15, 47, 67, 0.4);
    /* Leve sombra para destacar a seleção */
}

.btn-payment:hover {
	color: #ccc !important;
}

/* Container do grupo de botões de pagamento: CORREÇÃO DE LAYOUT */
.panel-body .btn-group-justified[data-toggle="buttons"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    overflow-x: visible;
    padding-bottom: 0;
}

.panel-body .btn-group-justified[data-toggle="buttons"] a {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
    min-width: 0;
    white-space: nowrap;
    margin-right: 0;
}

/* Espaçamento entre os botões */
.panel-body .btn-group-justified[data-toggle="buttons"] a:first-child {
    margin-right: 10px;
}

.panel-body .btn-group-justified[data-toggle="buttons"] a:last-child {
    margin-right: 0;
}

/* --- MODAL E NOTIFICAÇÃO (TOAST) --- */

#notification-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.5s;
    max-width: 90%;
    min-width: 300px;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: white;
}

#notification-toast.show {
    opacity: 1;
}

.alert-danger {
    background-color: var(--play-red) !important;
    color: white !important;
    border-color: var(--play-dark-orange) !important;
}

.modal-header {
    background-color: var(--play-red) !important;
}

.modal-title {
    word-break: break-word;
    white-space: normal;
    color: white !important;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: none;
}

.modal-footer .btn {
    flex: 1;
    margin-left: 5px;
    margin-right: 5px;
}


/* --- Estilos Flutuantes (Adicionado no styles.css) --- */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    /* Usa !important para garantir o fundo branco e sobrescrever estilos inline/conflitantes */
    background-color: white !important;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    /* Sombra mais destacada */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #f0f0f0 !important;
    /* Garantido que o hover funcione */
    text-decoration: none;
}

.whatsapp-float .whatsapp-icon-img {
    width: 38px;
    height: 38px;
}

/* --- BOTÃO DE VOLTAR FLUTUANTE --- */

.floating-back-btn {
    position: fixed;
    top: 10px;
    /* Distância do topo */
    left: 10px;
    /* Distância da esquerda */
    width: 40px;
    height: 40px;
    background-color: white;
    /* Fundo branco */
    border-radius: 50%;
    /* Faz a bolinha */
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1010;
    cursor: pointer;

    /* INICIA OCULTO pelo CSS. O JS irá mudar para 'flex' no Passo 2. */
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.floating-back-btn:hover {
    background-color: var(--play-sand);
    transform: scale(1.05);
}

.floating-back-btn .material-symbols-outlined {
    /* O tamanho e a cor controlam o ícone da seta */
    width: 20px;
    height: 20px;
    color: var(--play-navy);
    /* Cor da seta (Azul Marinho) */
    font-size: 20px;
    /* Garante um tamanho adequado */
    stroke-width: 0;
    /* Não usa stroke, é uma fonte */
}