/* audiosphere/css/single-post-style.css */

/* --- Cabeçalho do Post --- */
.single-post-header {
    position: relative; padding: 6rem 1.5rem; margin-bottom: 4rem;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    text-align: center; background-size: cover; background-position: center center;
}
.single-post-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(13, 14, 28, 0.9) 0%, rgba(28, 30, 50, 0.8) 100%);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 1;
}
.header-content { position: relative; z-index: 2; max-width: 800px; }
.post-category-badge {
    display: inline-block; background-color: rgba(77, 91, 238, 0.2); color: #8c9eff;
    padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem;
}
.post-main-title { font-size: 3rem; font-weight: 800; line-height: 1.2; color: #fff; margin-bottom: 0.5rem; }
.post-publish-date { color: #9CA3AF; font-size: 1rem; }

/* --- Layout Principal --- */
.single-post-main-area { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: flex-start; }
@media (min-width: 1024px) { .single-post-main-area { grid-template-columns: 2fr 1fr; } }

/* --- Conteúdo da Descrição --- */
.post-description-content { background-color: #1C1E32; padding: 2rem; border-radius: 16px; border: 1px solid #292B45; }
.post-description-content pre, .post-description-content h3, .post-description-content .download-section { display: none; }
.post-description-content p { font-family: 'Inter', sans-serif; margin-bottom: 1.5rem; line-height: 1.8; color: #E0E0E0; }
.post-description-content h4 { color: #fff !important; font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; border-bottom: 2px solid #4D5BEE; padding-bottom: 0.5rem; }

/* --- Barra Lateral de Informações --- */
.post-sidebar { position: -webkit-sticky; position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; }
.info-widget {
    background: linear-gradient(135deg, rgba(28, 30, 50, 0.95) 0%, rgba(37, 39, 66, 0.95) 100%);
    border: 1px solid rgba(77, 91, 238, 0.2); border-radius: 16px; padding: 2rem; backdrop-filter: blur(20px);
}
.sidebar-post-image { width: 100% !important; height: 350px !important; padding: 2em !important; border-radius: 12px !important; margin-bottom: 1.5rem !important; object-fit: contain !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important; background: #2d304b !important; }
.download-button {
    display: block; width: 100%; text-align: center; padding: 1rem; font-size: 1.125rem; font-weight: 700; color: white;
    background: linear-gradient(135deg, #4D5BEE 0%, #8E67E5 100%); border-radius: 12px; text-decoration: none;
    transition: all 0.3s ease; box-shadow: 0 10px 30px rgba(77, 91, 238, 0.4);
}
.download-button:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(77, 91, 238, 0.6); }
.download-button i { margin-right: 0.5rem; }
.info-list { list-style: none; padding: 0; margin-top: 2rem; border-top: 1px solid #292B45; }
.info-list li { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #292B45; font-size: 0.9rem; }
.info-list .info-label { color: #9CA3AF; display: flex; align-items: center; gap: 0.5rem; }
.info-list .info-value { color: #E0E0E0; font-weight: 500; }

/* --- Seção de Comentários --- */
#audiosphere-comments-section { background-color: #1C1E32; padding: 2.5rem; border-radius: 16px; border: 1px solid #292B45; margin-top: 4rem; }
#audiosphere-comments-section .gradient-text { margin-bottom: 2.5rem; }
.comment-form-container .comment-reply-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; color: #fff; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #9CA3AF; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"] {
    width: 100%; padding: 0.75rem 1rem; border-radius: 8px; border: 1px solid #292B45; background-color: #0D0E1C;
    color: #E0E0E0; font-size: 1rem; outline: none; transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.comment-form textarea:focus, .comment-form input[type="text"]:focus, .comment-form input[type="email"]:focus { border-color: #4D5BEE; box-shadow: 0 0 0 3px rgba(77, 91, 238, 0.3); }
.comment-form .form-submit .submit {
    display: inline-block; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 700; color: white;
    background: linear-gradient(135deg, #4D5BEE 0%, #8E67E5 100%); border-radius: 8px; border: none;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(77, 91, 238, 0.4);
}
.comment-form .form-submit .submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(77, 91, 238, 0.6); }
#comments-list { margin-top: 3rem; border-top: 1px solid #292B45; padding-top: 1rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { padding: 1.5rem 0; border-bottom: 1px solid #292B45; }
.comment:last-child { border-bottom: none; padding-bottom: 0; }
.comment-body { display: flex; gap: 1rem; align-items: flex-start; }
.comment-author-avatar img { border-radius: 50%; }
.comment-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.comment-author-name { font-weight: 700; color: #fff; font-size: 1rem; display: inline-flex; align-items: center; }
.comment-date { font-size: 0.8rem; color: #9CA3AF; }
.comment-text p { line-height: 1.7; color: #E0E0E0; margin: 0; }
.comment-actions { display: flex; gap: 1rem; margin-top: 1rem; align-items: center; }
.comment-actions button, .comment-actions a {
    background: rgba(77, 91, 238, 0.1); border: 1px solid rgba(77, 91, 238, 0.2); color: #9CA3AF;
    padding: 0.25rem 0.75rem; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; font-size: 0.8rem;
}
.comment-actions button:hover, .comment-actions a:hover { background: rgba(77, 91, 238, 0.2); border-color: #4D5BEE; color: #fff; }
.comment-actions button .fas { margin-right: 0.35rem; }
.no-comments, .loading-comments, .error-loading { text-align: center; color: #9CA3AF; font-style: italic; padding: 2rem 0; }
.comment-list .children { list-style: none; padding-left: 2rem; margin-top: 1.5rem; border-left: 2px solid #292B45; }
@media (min-width: 768px) { .comment-list .children { padding-left: 3.5rem; } }
.comment-reply-link, .cancel-reply-btn { background: none; border: none; color: #9CA3AF; cursor: pointer; font-size: 0.8rem; font-weight: bold; transition: color 0.3s ease; text-decoration: none; }
.comment-reply-link:hover, .cancel-reply-btn:hover { color: #fff; }
.comment-reply-form { margin-top: 1.5rem; padding: 1.5rem; background-color: #0D0E1C; border-radius: 8px; border: 1px solid #292B45; }
.cancel-reply-btn {
    background-color: transparent; border: 1px solid #292B45; color: #9CA3AF; padding: 0.75rem 1.5rem;
    border-radius: 8px; margin-left: 0.5rem; font-size: 1rem; font-weight: 700;
}
.cancel-reply-btn:hover { border-color: #EF4444; color: #EF4444; }
.admin-badge { display: inline-flex; align-items: center; justify-content: center; margin-left: 0.35rem; color: #4D5BEE; vertical-align: middle; }
.comment-actions button.active { color: #4D5BEE; border-color: #4D5BEE; background-color: rgba(77, 91, 238, 0.2); }
.logged-in-as {
    background-color: #0D0E1C; border: 1px solid #292B45; padding: 1rem; border-radius: 8px;
    margin-bottom: 1.5rem; font-size: 0.9rem; color: #9CA3AF;
}
.logged-in-as a, .comment-notes a { color: #4D5BEE; text-decoration: none; font-weight: bold; transition: color .2s ease; }
.logged-in-as a:hover, .comment-notes a:hover { color: #8E67E5; }
.comment-notes a { cursor: pointer; }
.guest-fields { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .guest-fields { grid-template-columns: 1fr 1fr; } }
.comment-form-avatar { margin-bottom: 1.5rem; }
.comment-form-avatar > label { display: block; margin-bottom: 0.75rem; font-weight: 500; color: #9CA3AF; }
.avatar-selector-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 10px;
    max-height: 180px; overflow-y: auto; padding: 10px; background-color: #0D0E1C;
    border-radius: 8px; border: 1px solid #292B45;
}
.avatar-selector-list::-webkit-scrollbar { width: 6px; }
.avatar-selector-list::-webkit-scrollbar-track { background: #1C1E32; border-radius: 10px; }
.avatar-selector-list::-webkit-scrollbar-thumb { background-color: #4D5BEE; border-radius: 10px; }
.avatar-option { position: relative; }
.avatar-option input[type="radio"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.avatar-option img {
    width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 50%; background-color: #292B45;
    border: 2px solid transparent; transition: all 0.2s ease-in-out;
}
.avatar-option label { margin: 0; }
.avatar-option input[type="radio"]:hover + label img, .avatar-option input[type="radio"]:focus + label img { transform: scale(1.1); border-color: #9CA3AF; }
.avatar-option input[type="radio"]:checked + label img { transform: scale(1.1); border-color: #4D5BEE; box-shadow: 0 0 10px rgba(77, 91, 238, 0.5); }

/* Modal de Edição de Perfil */
.profile-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 14, 28, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.profile-modal-overlay.visible { opacity: 1; visibility: visible; }
.profile-modal-container {
    background: #1C1E32; border: 1px solid #292B45; border-radius: 16px; padding: 2rem;
    width: 90%; max-width: 500px; position: relative; transform: scale(0.95); transition: transform 0.3s ease;
}
.profile-modal-overlay.visible .profile-modal-container { transform: scale(1); }
.profile-modal-container h3 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 1.5rem; }
.modal-close-btn { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #9CA3AF; font-size: 1.5rem; cursor: pointer; line-height: 1; }
#edit-profile-form input[type="text"] { width: 100%; padding: 0.75rem 1rem; border-radius: 8px; border: 1px solid #292B45; background-color: #0D0E1C; color: #E0E0E0; }
#edit-profile-form .form-submit { text-align: right; }
.edit-profile-btn { background: none; border: none; color: #9CA3AF; cursor: pointer; margin-left: 0.5rem; font-size: 0.8rem; transition: color 0.3s ease; }
.edit-profile-btn:hover { color: #4D5BEE; }

/* Modal de Autenticação */
.auth-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 14, 28, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
    z-index: 1010; opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out;
}
.auth-modal-overlay.visible { opacity: 1; visibility: visible; }
.auth-modal-container {
    background: linear-gradient(145deg, #1f223a, #1a1c30); 
    border: 1px solid #292B45;
    border-radius: 16px; 
    padding: 2.5rem;
    width: 90%; max-width: 420px; 
    position: relative; 
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.auth-modal-overlay.visible .auth-modal-container { transform: translateY(0) scale(1); opacity: 1; }
.auth-modal-tabs { display: flex; background-color: #161827; border-radius: 12px; margin-bottom: 2rem; padding: 4px; }
.auth-tab-link {
    flex: 1; padding: 0.75rem; background: none; border: none; color: #9CA3AF;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease;
    border-radius: 9px;
}
.auth-tab-link.active { 
    background: linear-gradient(135deg, #4D5BEE 0%, #8E67E5 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(77, 91, 238, 0.4);
}
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.auth-form .form-row { margin-bottom: 1.25rem; }
.auth-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #9CA3AF; font-size: 0.875rem; }
.auth-form input {
    width: 100%; padding: 0.85rem 1rem; border-radius: 8px; border: 1px solid #292B45;
    background-color: #0D0E1C; color: #E0E0E0; font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.auth-form input:focus {
    outline: none;
    border-color: #4D5BEE;
    box-shadow: 0 0 0 3px rgba(77, 91, 238, 0.3);
}
.auth-form .submit-row { margin-top: 2rem; }
.auth-form .submit {
    display: inline-block; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 700; color: white;
    background: linear-gradient(135deg, #4D5BEE 0%, #8E67E5 100%); border-radius: 8px; border: none;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(77, 91, 238, 0.4);
    width: 100%;
}
.auth-form .submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(77, 91, 238, 0.6); }
.auth-modal-feedback {
    display: none; padding: 1rem; margin-bottom: 1.5rem; border-radius: 8px; font-weight: 500;
    font-size: 0.9rem; text-align: center;
}
.auth-modal-feedback.success { display: block; background-color: rgba(16, 185, 129, 0.1); border: 1px solid #10B981; color: #10B981; }
.auth-modal-feedback.error { display: block; background-color: rgba(239, 68, 68, 0.1); border: 1px solid #EF4444; color: #EF4444; }

/* Popup de aviso de login */
.login-prompt-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: linear-gradient(135deg, #1C1E32 0%, #252742 100%);
    color: #E0E0E0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #292B45;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    font-size: 0.95rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.login-prompt-popup.visible {
    transform: translateX(-50%) translateY(0);
}
.login-prompt-popup a {
    color: #4D5BEE;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.login-prompt-popup a:hover {
    text-decoration: underline;
    color: #8E67E5;
}
.login-prompt-popup .close-prompt-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Estilos para Edição e Exclusão de Comentários */
.comment-actions {
    position: relative;
}

.comment-actions .comment-edit-btn,
.comment-actions .comment-delete-own-btn {
    margin-left: 0.5rem;
}

.comment-actions .comment-delete-own-btn {
    color: #EF4444;
}
.comment-actions .comment-delete-own-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    color: #fff;
}

.comment-actions .comment-delete-btn { /* Estilo para o botão de admin */
    margin-left: auto; /* Alinha à direita */
    background: rgba(239, 68, 68, 0.1) !important; 
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #EF4444 !important;
}

.comment-edit-form {
    margin: 1rem 0;
}

.comment-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #292B45;
    background-color: #0D0E1C;
    color: #E0E0E0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}
.comment-edit-textarea:focus {
    border-color: #4D5BEE;
    box-shadow: 0 0 0 3px rgba(77, 91, 238, 0.3);
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.comment-edit-actions .save-edit-btn,
.comment-edit-actions .cancel-edit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.comment-edit-actions .save-edit-btn {
    background: linear-gradient(135deg, #4D5BEE 0%, #8E67E5 100%);
    color: white;
}
.comment-edit-actions .cancel-edit-btn {
    background-color: #292B45;
    color: #E0E0E0;
}
.comment-edit-actions .cancel-edit-btn:hover {
    background-color: #252742;
}

.sidebar-image-container {
    position: relative;
    /* A .sidebar-post-image tinha margin-bottom, passamos para o container */
    margin-bottom: 1.5rem; 
}

/* 2. Ajuste na imagem original (remover margin-bottom) */
.info-widget .sidebar-post-image {
    margin-bottom: 0 !important; /* A margem agora está no container */
}

/* 3. Botão Play/Pause na Imagem do Post */
.single-post-play-button {
    position: absolute;
    top: 1rem; /* 16px */
    right: 1rem; /* 16px */
    z-index: 10;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.25rem; /* 20px */
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.single-post-play-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 4. Gerenciamento dos ícones Play/Pause */
.single-post-play-button i.fa-pause {
    display: none; /* Esconde o ícone de pause por padrão */
}

.single-post-play-button.is-playing i.fa-play {
    display: none; /* Esconde o play quando está tocando */
}

.single-post-play-button.is-playing i.fa-pause {
    display: inline-block; /* Mostra o pause quando está tocando */
}