/* =============================================================================
   ESTILOS DA ABA DE MEMBROS (ÁREA CLIENTE) - REACT COMPONENT STYLE
   Caminho: front/pages/club/css/membros.css
   ============================================================================= */

.club-members-container {
    padding: 2.25rem;
    background: #ffffff;
    border-radius: var(--radius-card, 16px);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
}

.members-header-text {
    flex-grow: 1;
    min-width: 250px;
}

.members-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-main, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    width: 280px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary, #2563eb);
    background-color: #ffffff;
}

.search-input-wrapper svg {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.search-input-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    color: var(--text-main, #0f172a);
    width: 100%;
    padding: 0;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted, #64748b);
}

.btn-search-members {
    background-color: var(--primary, #2563eb);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-search-members:hover {
    background-color: #1d4ed8;
}

.btn-clear-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    margin-left: 0.25rem;
    cursor: pointer;
}

.btn-clear-search:hover {
    color: var(--text-main, #0f172a);
}

.members-title {
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--text-main, #0f172a);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.members-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

/* Grelha de Cards */
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Estilo do Card Individual - React Style */
.member-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    min-height: 200px;
}

.member-card:hover {
    border-color: var(--primary, #2563eb);
    background-color: rgba(37, 99, 235, 0.005);
}

/* Badge de "Tu" na minha conta */
.member-me-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary, #2563eb);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Card Destacado da Minha Conta */
.member-card.is-me-card {
    border: 1px solid rgba(37, 99, 235, 0.3);
    background-color: rgba(37, 99, 235, 0.01);
}

.member-card.is-me-card:hover {
    border-color: var(--primary, #2563eb);
    background-color: rgba(37, 99, 235, 0.02);
}

/* Corpo do Card */
.member-card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Wrapper do Avatar */
.member-avatar-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.member-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.member-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-main, #f8fafc);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: var(--primary, #2563eb);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}



/* Meta dados do membro */
.member-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.member-card-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-level-pill-wrapper {
    display: flex;
    align-items: center;
}

/* Pills de Níveis Estilo SaaS */
.member-level-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.member-level-pill.level-male {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary, #2563eb);
}

.member-level-pill.level-female {
    background-color: rgba(236, 72, 153, 0.08);
    color: #ec4899;
}

.member-level-pill.level-none {
    background-color: var(--bg-main, #f8fafc);
    color: var(--text-muted, #64748b);
}

/* Rodapé do Card */
.member-card-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    width: 100%;
}

/* Controlo de Privacidade */
.privacy-control-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.privacy-status-text {
    font-size: 0.78rem;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.privacy-status-text.is-public {
    color: #22c55e;
}

.privacy-status-text.is-private {
    color: #ef4444;
}

.btn-change-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary, #2563eb);
    background: transparent;
    border: 1px solid var(--primary, #2563eb);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.btn-change-profile:hover {
    background-color: var(--primary, #2563eb);
    color: #ffffff;
    text-decoration: none;
}

.privacy-status-display {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

/* Switch Estilo iOS - Versão Pequena */
.ios-switch.ios-switch-sm {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.ios-switch.ios-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-switch.ios-switch-sm .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(120, 120, 128, 0.16);
    transition: 0.25s ease-in-out;
    border-radius: 34px;
}

.ios-switch.ios-switch-sm .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: 0.25s ease-in-out;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.ios-switch.ios-switch-sm input:checked + .slider {
    background-color: #22c55e;
}

.ios-switch.ios-switch-sm input:checked + .slider:before {
    transform: translateX(16px);
}

/* Fallback de Não Encontrado */
.no-members-fallback {
    grid-column: span 3;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted, #64748b);
}

.no-members-fallback p {
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Responsividade */
@media (max-width: 992px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .club-members-container {
        padding: 1.5rem;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .members-search-form {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .btn-search-members {
        width: 100%;
    }
}
