.ttt-registrants-auto-injected,
.ttt-registrants-app {
    box-sizing: border-box;
}

.ttt-registrants-auto-injected {
    margin: 22px 0;
    clear: both;
}

.ttt-registrants-app *,
.ttt-registrants-app *::before,
.ttt-registrants-app *::after {
    box-sizing: border-box;
}

.ttt-reg-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    overflow: hidden;
    margin: 18px 0;
    font-family: inherit;
}

.ttt-reg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #111820;
    color: #fff;
}

.ttt-reg-head h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.ttt-reg-head p {
    margin: 5px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 14px;
}

.ttt-reg-total {
    white-space: nowrap;
    background: #ffcc00;
    color: #111820;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 999px;
}

.ttt-reg-debug {
    margin: 14px 18px 0;
    padding: 10px 12px;
    border: 1px solid #f59e0b;
    background: #fff7ed;
    color: #92400e;
    border-radius: 10px;
    font-size: 13px;
}

.ttt-reg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.ttt-reg-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.ttt-reg-search {
    flex: 1 1 260px;
}

.ttt-reg-field select,
.ttt-reg-field input {
    min-height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 11px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-family: inherit;
}

.ttt-reg-clear,
.ttt-reg-pages button {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: #111820;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.ttt-reg-clear:hover,
.ttt-reg-pages button:hover:not(:disabled) {
    opacity: .88;
}

.ttt-reg-pages button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ttt-reg-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 0;
}

.ttt-reg-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.ttt-reg-pill:hover,
.ttt-reg-pill:focus {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    outline: none;
}

.ttt-reg-pill.is-active {
    border-color: #111820;
    box-shadow: 0 0 0 2px rgba(17,24,32,.08);
}

.ttt-reg-pill.is-confirmed {
    background: #dcfce7;
    color: #166534;
}

.ttt-reg-pill.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.ttt-reg-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 14px 20px 0;
}

.ttt-reg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ttt-reg-table th,
.ttt-reg-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.ttt-reg-table th {
    background: #f3f4f6;
    color: #111827;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.ttt-reg-table th.is-asc::after { content: ' ▲'; font-size: 10px; }
.ttt-reg-table th.is-desc::after { content: ' ▼'; font-size: 10px; }

.ttt-reg-table tbody tr:hover td {
    background: #fff8df;
}

.ttt-reg-name {
    font-weight: 700;
    color: #111827;
}


.ttt-reg-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ttt-reg-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 16px;
    line-height: 1;
}

.ttt-reg-name-text {
    display: inline-block;
}

.ttt-reg-course {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fef3c7;
    color: #78350f;
    font-weight: 700;
    font-size: 12px;
}

.ttt-reg-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.ttt-reg-status.is-confirmed {
    background: #dcfce7;
    color: #166534;
}

.ttt-reg-status.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.ttt-reg-empty,
.ttt-reg-loading {
    padding: 18px !important;
    text-align: center !important;
    color: #6b7280;
}

.ttt-reg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 18px;
    color: #374151;
    font-size: 14px;
}

.ttt-reg-pages {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 760px) {
    .ttt-reg-head,
    .ttt-reg-footer {
        display: block;
    }

    .ttt-reg-total {
        display: inline-flex;
        margin-top: 12px;
    }

    .ttt-reg-toolbar {
        display: block;
    }

    .ttt-reg-field,
    .ttt-reg-clear {
        width: 100%;
        margin-top: 10px;
    }

    .ttt-reg-table thead {
        display: none;
    }

    .ttt-reg-table,
    .ttt-reg-table tbody,
    .ttt-reg-table tr,
    .ttt-reg-table td {
        display: block;
        width: 100%;
    }

    .ttt-reg-table tr {
        border-bottom: 1px solid #e5e7eb;
        padding: 10px 0;
    }

    .ttt-reg-table td {
        border: 0;
        padding: 7px 4px;
    }

    .ttt-reg-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        font-weight: 800;
        color: #6b7280;
        margin-bottom: 2px;
    }

    .ttt-reg-pages {
        margin-top: 12px;
        justify-content: space-between;
    }
}


/* v9: bandeiras por imagem, porque Windows/Chrome não mostra emoji de bandeiras de forma consistente */
.ttt-reg-flag-imgwrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 0 0 1px rgba(17,24,32,.08);
    position: relative;
}

.ttt-reg-flag-imgwrap.is-fallback::after {
    content: attr(data-code);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    color: #374151;
}

.ttt-reg-flag-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* v9.1: correção de bandeiras em Chrome/Windows e templates Joomla que impõem max-height/height:auto em imagens */
.ttt-registrants-app .ttt-reg-flag-imgwrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 0 2px 0 0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    line-height: 0 !important;
    background: #f3f4f6 !important;
    box-shadow: 0 0 0 1px rgba(17,24,32,.10) !important;
    flex: 0 0 26px !important;
}

.ttt-registrants-app .ttt-reg-flag-img {
    display: block !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    vertical-align: top !important;
}

.ttt-registrants-app .ttt-reg-name-cell {
    line-height: 1.2 !important;
}


/* v9.2: bandeiras como background CSS para evitar cortes provocados por estilos globais do template */
.ttt-registrants-app .ttt-reg-flag-bg {
    display: inline-block !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex: 0 0 24px !important;
    padding: 0 !important;
    margin: 0 8px 0 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    background-size: 24px 18px !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 1px rgba(17,24,32,.12) !important;
    overflow: hidden !important;
    line-height: 0 !important;
    vertical-align: middle !important;
}

/* v9.2: retirar a pastilha amarela do percurso; o percurso fica como texto limpo e profissional */
.ttt-registrants-app .ttt-reg-course {
    display: inline !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #374151 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    box-shadow: none !important;
}

.ttt-registrants-app .ttt-reg-summary .ttt-reg-pill.is-course {
    background: #f3f4f6 !important;
    color: #374151 !important;
}


/* v9.5: botões de filtro reais, mas com visual de pill/texto */
.ttt-registrants-app button.ttt-reg-pill {
    border: 1px solid transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
}

.ttt-registrants-app button.ttt-reg-course {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-align: left !important;
}

.ttt-registrants-app button.ttt-reg-course:hover,
.ttt-registrants-app button.ttt-reg-course:focus {
    text-decoration: underline !important;
    outline: none !important;
}
