/* ==========================================================================
   PLUGIN: EDITOR REDE BRASIL
   VERSION: 17.5 (ESTILO DOPAMINA VIBRANTE + MOBILE FIX)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&display=swap');

/* --- 1. ANIMAÇÕES GERAIS --- */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes floatUp {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}
@keyframes iconPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 5px rgba(255,215,0,0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
}
@keyframes iconSwing {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 2. ESTRUTURA E WRAPPER --- */
.editor-rb-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
}

.editor-rb-wrapper *,
.editor-rb-wrapper *::before,
.editor-rb-wrapper *::after {
    box-sizing: border-box;
}

/* --- 3. CONTAINER DO FORMULÁRIO (VISUAL MÁGICO) --- */
#editor-rb-form-container {
    background: linear-gradient(-45deg, #FF00CC, #FF4500, #FFD700, #00FFFF, #39FF14);
    background-size: 400% 400%;
    animation: gradientBG 8s ease infinite;
    border-radius: 30px;
    padding: 45px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    color: #fff;
}

#editor-rb-form-container::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.2), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#editor-rb-form {
    position: relative;
    z-index: 2;
}

/* --- NOVA ESTILIZAÇÃO: TÍTULO COM FUNDO ESCURO PARA LEITURA --- */
.form-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    color: #fff !important;
    margin: 0 auto 35px auto;
    text-transform: uppercase;
    display: flex; 
    flex-wrap: wrap; /* Permite quebrar linha se o texto for grande */
    align-items: center; 
    justify-content: center;
    background: rgba(17, 24, 39, 0.85); /* Fundo escuro translúcido */
    padding: 15px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    width: fit-content;
}

.animated-icon {
    display: inline-block;
    animation: iconPulse 2s infinite ease-in-out;
    margin-right: 8px;
    color: #FFD700;
}

.animated-icon-title {
    display: inline-block;
    animation: iconSwing 4s infinite ease-in-out;
    margin-right: 12px;
    font-size: 1.1em;
    color: #FFD700;
}

.animated-icon-slow {
    display: inline-block;
    animation: floatUp 3s infinite ease-in-out;
    color: #fff;
}

/* --- 4. CAMPOS E INPUTS --- */
.erb-grid { display: flex; flex-wrap: wrap; gap: 25px; width: 100%; }
.erb-col-full { width: 100%; flex: 0 0 100%; }
.erb-col { width: calc(50% - 12.5px); flex: 0 0 calc(50% - 12.5px); }

/* --- NOVA ESTILIZAÇÃO: LABELS (TÍTULOS DOS CAMPOS) EM FORMA DE BADGE --- */
label {
    font-weight: 800;
    color: #fff !important;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(17, 24, 39, 0.85) !important; /* Fundo escuro */
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 18px 22px;
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    color: #111827;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

input:focus, textarea:focus {
    background: #fff;
    border-color: #FFD700;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.4);
    outline: none;
}

textarea { resize: vertical; min-height: 140px; }
.video-input-wrapper { position: relative; width: 100%; }
.video-url-input { padding-left: 20px !important; }

/* --- 5. DROPZONES (UPLOAD) --- */
.erb-dropzone {
    border: 4px dashed rgba(255,255,255,0.8);
    border-radius: 25px;
    padding: 35px 20px;
    background: rgba(255, 255, 255, 0.25);
    text-align: center;
    width: 100%;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}
.erb-dropzone:hover, .erb-dropzone.dragover {
    background: rgba(255, 255, 255, 0.4); border-color: #fff;
    transform: scale(1.02); box-shadow: 0 10px 40px rgba(255,255,255,0.25);
}
.dz-message i { font-size: 3.5rem; margin-bottom: 15px; display: block; color: #111827; }
.dz-message span { 
    font-weight: 900; color: #fff; font-size: 1rem; 
    background: rgba(17, 24, 39, 0.85); padding: 5px 12px; border-radius: 8px; 
}
.dz-buttons { display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn-select, .btn-paste {
    padding: 12px 28px; border-radius: 50px; font-weight: 800; cursor: pointer; border: none;
    font-size: 0.9rem; text-transform: uppercase; transition: 0.2s; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-select { background: #fff; color: #E91E63; }
.btn-select:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); background: #fdfdfd; }
.btn-paste { background: #FFD700; color: #333; }
.btn-paste:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5); background: #ffe033; }

/* --- 6. GRAVADORES MULTIMÍDIA --- */
.media-box {
    background: rgba(0, 0, 0, 0.35); border-radius: 25px; padding: 30px; text-align: center;
    border: 2px solid rgba(255,255,255,0.2); display: flex; flex-direction: column; align-items: center;
    backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: transform 0.3s;
}
.media-box:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.4); }
.media-box h3 { 
    margin-top: 0; color: #fff; font-size: 1rem; margin-bottom: 15px; 
    background: rgba(17, 24, 39, 0.85); padding: 8px 16px; border-radius: 10px; font-weight: 800;
}
.media-controls { margin-top: 15px; display: flex; justify-content: center; align-items: center; }
.media-controls button {
    width: 65px; height: 65px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.4);
    font-size: 1.6rem; cursor: pointer; color: #fff; margin: 0 10px; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255,255,255,0.1); box-shadow: 0 5px 15px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center;
}
.record-btn:hover { background: #FF0033; border-color: #FF0033; transform: scale(1.15); }
.stop-btn:hover { background: #FFD700; border-color: #FFD700; transform: scale(1.15); color: #000; }
.play-btn:hover { background: #39FF14; border-color: #39FF14; transform: scale(1.15); color: #000; }
.delete-btn:hover { background: #fff; border-color: #fff; transform: scale(1.15); color: #000; }
.switch-btn:hover { background: #00FFFF; border-color: #00FFFF; transform: scale(1.15) rotate(180deg); color: #000; }

/* --- 7. BOTÃO SUBMIT --- */
#erb-submit-btn {
    width: 100%; padding: 22px; background: linear-gradient(90deg, #FFD700, #FF4500);
    color: #fff; border: 3px solid rgba(255,255,255,0.8); border-radius: 60px; font-size: 1.4rem;
    font-weight: 900; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; margin-top: 40px;
    transition: all 0.3s ease; box-shadow: 0 15px 40px rgba(255, 69, 0, 0.5); position: relative; overflow: hidden;
}
#erb-submit-btn:hover {
    transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 60px rgba(255, 215, 0, 0.7);
    background: linear-gradient(90deg, #39FF14, #00FFFF); color: #000; border-color: #fff;
}
#erb-submit-btn.erb-btn-sending { background: #333; color: #ccc; cursor: not-allowed; border-color: #555; }
.spinner {
    display: inline-block; width: 24px; height: 24px; border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; vertical-align: middle; margin-left: 10px;
}

/* --- 8. PREVIEWS E AVATAR --- */
.erb-profile-wrapper img { border: 3px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.preview-area { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; justify-content: center; }
.preview-area img { border-radius: 15px; border: 3px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.3); transition: 0.3s; }
.preview-area img:hover { transform: scale(1.1) rotate(3deg); z-index: 10; }

/* --- 9. ESTILO DO FEED --- */
.erb-feed-card { background: #ffffff; border-radius: 25px; padding: 30px; margin: 0 auto 50px auto; box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.08); font-family: 'Plus Jakarta Sans', sans-serif; max-width: 850px; border: 1px solid #f1f1f1; transition: transform 0.3s; }
.erb-feed-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px -5px rgba(0, 0, 0, 0.12); }
.erb-feed-header { display: flex; align-items: center; gap: 18px; margin-bottom: 25px; }
.erb-feed-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid #FF00CC; padding: 2px; background: #fff; }
.erb-author-name { color: #111; font-size: 1.15rem; font-weight: 800; }
.erb-post-time { color: #888; font-size: 0.9rem; display: block; margin-top: 3px; }
.erb-feed-body { color: #444; font-size: 1.1rem; line-height: 1.7; margin-bottom: 25px; }
.erb-feed-image img { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px; }
.erb-feed-gallery { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; }
.erb-lightbox-item img { height: 200px; width: auto; border-radius: 12px; object-fit: cover; border: 1px solid #eee; }
.erb-action-btn { background: transparent; border: none; cursor: pointer; font-size: 0.95rem; font-weight: 700; color: #555; display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 30px; transition: 0.3s; }
.erb-action-btn:hover { background: #f5f5f5; color: #FF00CC; }
.erb-like-btn.liked { color: #FF0033; }
.erb-like-btn.liked i { animation: iconPulse 0.5s ease-in-out; }

/* =================================================================
   10. RESPONSIVIDADE FORÇADA (MOBILE LARGURA TOTAL E ALINHAMENTOS)
================================================================= */
@media (max-width: 768px) {
    /* Força quebrar qualquer trava de largura do tema */
    .editor-rb-wrapper { 
        margin: 0 !important; 
        padding: 0 !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        overflow-x: hidden;
    }
    
    /* Remove as bordas arredondadas e cola nas beiradas */
    #editor-rb-form-container {
        padding: 30px 15px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        width: 100% !important;
    }
    
    /* Ajusta o Título principal (Editando Post) */
    .form-title { 
        font-size: 1.3rem !important; 
        flex-direction: column; 
        gap: 8px;
        padding: 12px 20px;
    }
    .form-title i { margin-right: 0 !important; }
    
    /* Organiza a linha do Avatar e Input de Título (Desembola) */
    .erb-col-full[style*="display:flex"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 10px !important;
    }
    
    /* Centraliza a Label do Input Título quando empilhado */
    .erb-col-full[style*="display:flex"] > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .erb-profile-wrapper { margin-bottom: 5px; }

    /* Força as colunas a pegarem toda a largura */
    .erb-col, .erb-col-full { width: 100%; flex: 0 0 100%; }
    
    .media-controls button { width: 55px; height: 55px; font-size: 1.3rem; }
    
    .dz-buttons { flex-direction: column; width: 100%; }
    .btn-select, .btn-paste { width: 100%; }
    
    #erb-submit-btn { font-size: 1.1rem; padding: 18px; }
}