/**
 * Estilos para a visualização de análises de poker
 * Implementa cards, modal, paginação e busca
 */

/* Sistema de busca */
.search-container {
    margin-bottom: 1.5rem;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Estilo para botão desabilitado */
.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: #666 !important;
}

/* Animação de loading */
.btn-disabled:after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.5em;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-form .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form .form-group {
    flex: 1;
    min-width: 200px;
}

.search-form input,
.search-form select {
    width: 100%;
    padding: 0.8rem;
    background: #2a2a2a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
}

.search-form button {
    align-self: flex-start;
    padding: 0.8rem 1.5rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #444;
}

/* Sistema de paginação */
.pagination-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #444;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    background: #222;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: #aaa;
}

#pageInfo {
    color: #aaa;
}

.no-results-message {
    text-align: center;
    padding: 2rem;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 1rem 0;
    color: #aaa;
}

/* Grid de análises */
.analises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Card de análise */
.analise-card {
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #333;
}

.analise-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border-color: #4caf50;
}

.analise-card-header {
    background: #1a1a1a;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.analise-card-mao {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4caf50;
}

.analise-card-posicao {
    background: #333;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.analise-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.analise-card-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #aaa;
}

.analise-card-estagio {
    background: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #fff;
}

.analise-card-situacao {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ddd;
    flex-grow: 1;
}

.analise-card-footer {
    padding: 1rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.analise-card-date {
    font-style: italic;
}

.analise-card-author {
    font-weight: bold;
    color: #aaa;
}

.analise-card-details-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.analise-card-details-btn:hover {
    background: #45a049;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #1c1c1c;
    margin: 20px auto;
    padding: 25px;
    border-radius: 10px;
    width: 95%;
    max-width: 1200px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: modalopen 0.4s;
    position: relative;
}

.analise-modal-content {
    width: 100%;
    max-width: none;
}

/* Ajustes para o modal de doações */
#donationModal .modal-content {
    max-width: 500px;
    background: #1c1c1c;
    color: #fff;
    padding: 2rem;
}

#donationModal h3 {
    color: #4caf50;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

#donationModal h4 {
    color: #4caf50;
    margin: 1rem 0;
}

.pix-container {
    background: #222;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    margin-top: 1.5rem;
}

.pix-qrcode {
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
}

.pix-key {
    background: #222;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #333;
    font-family: monospace;
    color: #4caf50;
    text-align: center;
    margin-top: 1rem;
}

/* Botão de comentários */
.comment-button {
    background: #333;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-button:hover {
    background: #444;
}

.comment-button .comment-count {
    background: #4caf50;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* Estilos para comentários no modal */
.analise-comments {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.comment-form {
    margin-top: 1rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    resize: vertical;
}

.analise-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.analise-modal-header h3 {
    margin: 0;
    color: #4caf50;
}

.analise-date {
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}

.analise-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analise-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.info-value {
    font-size: 1.1rem;
    color: #fff;
}

.analise-situacao {
    margin-bottom: 1.5rem;
}

.analise-resposta {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #4caf50;
}

.analise-resposta h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4caf50;
}

/* Estilos para resposta da IA no formulário */
#response .analise-resposta {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border-left: 4px solid #4caf50;
}

#response .analise-resposta h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4caf50;
    font-size: 1.2rem;
}

#response .analise-resposta h3 {
    color: #4caf50;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #333;
}

#response .analise-resposta h3:first-child {
    margin-top: 0;
}

#response .analise-resposta strong {
    color: #4caf50;
    font-weight: bold;
}

#response .analise-resposta-content {
    color: #e0e0e0;
    line-height: 1.6;
}

#analiseModalResposta {
    line-height: 1.5;
    color: #e0e0e0;
}

#analiseModalResposta h3 {
    color: #4caf50;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
    margin-top: 20px;
    font-size: 1.2rem;
}

#analiseModalResposta ul {
    padding-left: 20px;
    margin-bottom: 15px;
    list-style-type: disc;
}

#analiseModalResposta li {
    margin-bottom: 8px;
}

#analiseModalResposta strong {
    color: #4caf50;
    font-weight: bold;
}

#analiseModalResposta p {
    margin-bottom: 10px;
}

.analise-modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analise-autor-info {
    color: #888;
    font-style: italic;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary {
    background: #4caf50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #555;
    color: white;
}

.btn-secondary:hover {
    background: #666;
}

/* Estilos para comentários */
.analise-comentarios {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.analise-comentarios h4 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.comentarios-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comentario {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comentario-autor {
    color: #4caf50;
    font-weight: bold;
}

.comentario-data {
    color: #888;
}

.comentario-texto {
    color: #ddd;
    line-height: 1.4;
}

.form-comentario {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
}

.form-comentario textarea {
    width: 100%;
    min-height: 100px;
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.8rem;
    color: #fff;
    resize: vertical;
    margin-bottom: 1rem;
}

.form-comentario button {
    background: #4caf50;
    color: white;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-comentario button:hover {
    background: #45a049;
}

.loading-comments {
    text-align: center;
    color: #888;
    padding: 1rem;
}

/* Ajustes para os comentários */
.comentarios-list {
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.comentario-item {
    background: #222;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #333;
}

.form-comentario {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #222;
    border-radius: 8px;
    border: 1px solid #333;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.modal-title {
    color: #4caf50;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

/* Comentários */
.comentarios-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.login-prompt {
    text-align: center;
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
    margin-top: 1rem;
}

.login-prompt a {
    color: #4caf50;
    text-decoration: none;
    font-weight: bold;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.comentarios-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
}

.comentario-item {
    background: #222;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comentario-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comentario-autor {
    color: #4caf50;
    font-weight: bold;
}

.comentario-data {
    color: #666;
}

.comentario-texto {
    color: #ddd;
    line-height: 1.4;
}

.form-comentario {
    margin-top: 1rem;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
}

.form-comentario textarea {
    width: 100%;
    min-height: 100px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    resize: vertical;
}

.form-comentario button {
    background: #4caf50;
    color: white;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-comentario button:hover {
    background: #45a049;
}

/* Estilos para botões de compartilhamento e ações de comentários */
.share-button {
    background: #555;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.share-button.shared {
    background: #4caf50;
}

.share-button:hover {
    background: #666;
}

.share-button.shared:hover {
    background: #45a049;
}

.comentario-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comentario-actions button {
    background: #333;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.comentario-actions button:hover {
    background: #444;
}

.edit-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.edit-comment-form textarea {
    width: 100%;
    min-height: 80px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 1000;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: 0.4s;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    padding: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .analises-grid {
        grid-template-columns: 1fr;
    }
    
    .analise-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .analise-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #1c1c1c;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 999;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #333;
    }
    
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    .analise-card {
        margin: 0.5rem 0;
    }
    
    .analise-card-footer {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .analise-card-footer button {
        width: 100%;
    }
    
    .pix-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        flex-direction: column;
    }
    
    .pagination-btn {
        width: 100%;
        text-align: center;
    }
}