/* CAMPO DE POSTAGEM (estilo visual do botão de abrir modal) 
.post-input-container {
  display: flex;
 margin: 0.5rem 0;
  align-items: center;
  border-radius: var(--borda-forms-radius);
  border: var(--borda-forms) solid var(--cor-borda-forms);
  background: var(--bg-forms);
  padding: 0.3rem 0.3rem;
  gap: 0.5rem;
  cursor: pointer;
}


.post-avatar-modal {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}
*/


/* Correções aplicadas:
   - Garantido 100vw/100vh reais nos modais
   - textarea com box-sizing e padding correto
   - modal-content-scroll ajustado
   - removido width duplicado e conflitos
*/

.modal-overlay-geral textarea[name="texto"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 70px;
  max-height: 200px;
  overflow-y: auto;
  resize: none;
  /* background: #121212; */
  caret-color: var(--cor-primaria);
  border: none;
  color: var(--cor-texto);
  border-radius: var(--borda-media);
  font-family: var(--fonte-principal);
  font-size: var(--fonte-md);
  line-height: 1.5;
  background: rgb(31 31 31 / 0%);
}



.modal-overlay-geral textarea[name="texto"]:focus {
  /* border-bottom: 1px solid #00ff91; */ /* cor da borda ao focar */
  outline: none; /* remove o contorno azul padrão */
}


/* =========================================================
   MODAL — BASE
========================================================= */
.modal-geral {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
  background: var(--cor-fundo);
}


/* =========================================================
   OVERLAY — CONTROLE DE ENTRADA / SAÍDA
========================================================= */
.modal-overlay-geral {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  background: var(--cor-fundo);

  /* Estado inicial (fechado) */
  opacity: 0;
  transform: translate3d(0, 12%, 0);

  pointer-events: none;

  /* 🔥 Transição rápida e natural */
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================================
   MODAL ABERTO
========================================================= */
.modal-overlay-geral.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}


/* =========================================================
   MODAL FECHANDO
========================================================= */
.modal-overlay-geral.exit {
  opacity: 0;
  transform: translate3d(0, 12%, 0);
  pointer-events: none;
}


/* =========================================================
   ÁREA DE SCROLL DO CONTEÚDO
========================================================= */
.modal-content-scroll-profile {
  width: 100%;
  height: 100%;
  overflow-y: auto;

  padding: 1rem;
  box-sizing: border-box;

  /* 🔒 scroll suave no mobile */
  -webkit-overflow-scrolling: touch;
}



/*#################INICIO GEADER MODAL GERAL#################################*/
/* ===================================================== */
/* 🧭 HEADER FIXO (FLEX)                                 */
/* ===================================================== */

.modal-header-geral {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  background-color: var(--cor-fundo);

  z-index: 100;
}



.btn-voltar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  /* justify-content: center; */
  background: none;
  border: 0;
  padding: 0;
  color: #fff;
  cursor: pointer;
  flex: 0 0 44px; /* 🔥 fixa largura */
}




/* Botão Postar */
.btn-postar-top {
  margin-left: auto; /* 🔥 ESSENCIAL */

      background: var(--bg-button-primary);
    color: var(--cor-text-button-primary);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;

  font-weight: 600;
  font-size: 0.9rem;

  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.btn-postar-top:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}



/* Botão SAVE */
.btn-postar-save-top {
  margin-left: auto; /* 🔥 ESSENCIAL */

  background: var(--bg-button-primary);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;

  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cor-text-button-primary);

  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}




/* Título centralizado absoluto */
.modal-title-geral {
  flex: 1;                     /* 🔥 ocupa o espaço central */
  text-align: center;

  font-size: 1rem;
  font-weight: 600;
  color: var(--cor-title-header);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  pointer-events: none;
}



/*#################FIM MODAL HEADER HERAL#################################*/









/* CONTEUDO DO MODAL POSTS */


.modal-content-scroll-feed {
  margin-top: 53px;
  max-height: calc(100vh - 53px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1rem;
}

.user-textarea-wrapper-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0; /* garantir que não force overflow no textarea */
}




.spotify-input-container input {
  width: 100%;
  padding: 1rem 1rem;
  color: #f1f1f1;
  background-color: transparent;
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
  /* background: #121212; */
  caret-color: #FFF;
  border: none;
  color: var(--cor-texto);
  border-radius: var(--borda-media);
  font-family: var(--fonte-principal);
  font-size: var(--fonte-md);
  line-height: 1.5;
  background: var(--bg-input);
  border-bottom: 2px solid #fdfdfd70
}



.spotify-input-container input::placeholder {
  font-size: var(--fonte-md);
  color: var(--cor-placeholder-input);
  
}

.spotify-input-container input:focus {
  border-bottom: 2px solid #2226DF;
}


/* Botão "Alterar música" */
.btn-change-link {
  flex: 1;
  padding: 0.63rem 1rem;
  background-color: transparent;
  border: 2px solid #ffffff6b;
  border-radius: 12px;
  color: var(--cor-texto);
  font-weight: 600;
  font-size: var(--fonte-md);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  width: 100%;
}

.btn-change-link:hover {
  background-color: #151922;
  color: white;
}

/* Responsivo: empilha tudo em telas pequenas */
@media (max-width: 600px) {
  .spotify-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-submit-post,
  .btn-change-link {
    width: 100%;
  }
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeSlideIn 0.3s ease forwards;
}

/*#########################################*/


.spotify-loader {
  width: 40px;
  height: 40px;
  margin: auto;
  display: block;
  padding: 1rem 0;
}

.full-name-modal-post  {
  font-size: var(--fonte-md);
  color: var(--cor-texto);
}


#spotifyLinkInput::placeholder {
  color: #999; /* ou qualquer tom desejado */
  opacity: 1;  /* para garantir visibilidade */
}


/* ========================================= */
/* 🎧 PREVIEW SPOTIFY — WRAPPER */
/* ========================================= */
.spotify-preview-wrapper {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
}

/* ========================================= */
/* 🎧 LOADER OVERLAY DO SPOTIFY */
/* ========================================= */
.loader-overlay-modal-post {
  position: absolute;
  inset: 0; /* 🔥 cobre exatamente o preview */
  background: rgba(11, 14, 20, 0.65);

  display: none; /* 🔥 invisível por padrão */
  align-items: center;
  justify-content: center;

  z-index: 10;
  pointer-events: none;

  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 🔥 aparece quando NÃO tem [hidden] */
.loader-overlay-modal-post:not([hidden]) {
  display: flex;
}

/* 🔥 fade-out suave (usado pelo JS) */
.loader-overlay-modal-post.fade-out {
  opacity: 0;
}

/* ========================================= */
/* 🌀 SPINNER MODERNO (SEM GIF) */
/* ========================================= */
.spotify-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #EA646C; /* verde Spotify */
  animation: spotify-spin 0.8s linear infinite;
}

/* ========================================= */
/* 🎞️ ANIMAÇÃO */
/* ========================================= */
@keyframes spotify-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================= */
/* 🎧 IFRAME SPOTIFY */
/* ========================================= */
.spotify-preview iframe {
  width: 100%;
  border-radius: 12px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.spotify-preview iframe.invisible {
  opacity: 0;
}

/* ========================================= */
/* ❌ ERRO SPOTIFY */
/* ========================================= */
.spotify-error {
  color: #f55;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}




/*
.close-btn-modal-feed-post {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--cor-texto);
  cursor: pointer;
  display: inline-block;
  line-height: 1;
  
}

*/


/* ############# FIM DO CONTEUDO DO MODAL POSTS #################*/







/*############# INICIO DO CONTEUDO DO MODAL DO PERFIL ################*/

.btn-save {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  background: var(--gradiente-borda-buttons);
  border: none;
  border-radius: 12px;
  color: var(--cor-texto);
  font-weight: 600;
  font-size: var(--fonte-md);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

/* Input e textarea com borda inferior */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.5rem;
  background-color: var(--bg-input);
  color: #B5B5B5;
  border: none;
  font-size: var(--fonte-md);
  border: 2px solid var(--cor-borda-forms);
  border-radius: 10px;

  outline: none;
  transition: border-color 0.3s ease;
  font-family: var(--fonte-principal);
}



.form-group input:focus,
.form-group textarea:focus {
    border: 2px solid #2226df99; /* Cor ao focar */
  outline: none;
}



/* =====================================================
   🖼️ AVATAR — PERFIL / EDITAR FOTO
   ===================================================== */

/* Wrapper geral */
.avatar-wrapper {
  margin-top: 80px;
  display: flex;
  justify-content: center;
  margin-bottom: 1.8rem;
}

/* Container do avatar + botão */
.avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

/* Avatar */
.avatar-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 3px; /* espessura da borda */
  background: linear-gradient(
    180deg,
    #EA646C 5.2%,
    #2226DF 100%
  );
  object-fit: cover;
}

/* =====================================================
   🎯 BOTÃO — EDITAR FOTO
   ===================================================== */

.change-photo-label {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--cor-texto);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 999px;

  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Feedback toque (mobile) */
.change-photo-label:active {
  background: rgba(77, 163, 255, 0.15);
}

/* Hover apenas em desktop */
@media (hover: hover) {
  .change-photo-label:hover {
    background: rgba(77, 163, 255, 0.1);
  }
}

/* =====================================================
   🔒 INPUT REAL ESCONDIDO
   ===================================================== */

#id_avatar {
  display: none;
}





/* Grupos do form */
.form-group {
  margin-bottom: 1.2rem;
}

/* Spotify Preview */
#spotifyPreview iframe {
  border-radius: 12px;
}

/* Botão de fechar */
.close-btn {
  font-size: 1.6rem;
  cursor: pointer;
  color: white;
}

.btn-change-link-top {
  margin: 1.0rem 0;
}


/* Animação de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/*#############  FIM DO CONTEUDO DO MODAL DO PERFIL ################*/


/* ===================================================== */
/* 📝 EDITOR DE POSTAGEM (CONTENTEDITABLE PROFISSIONAL) */
/* ===================================================== */

.post-editor-wrapper {
  position: relative;
}

/* Editor real */
.post-editor {
  width: 100%;

  /* 🔹 Altura controlada */
  min-height: 116px;   /* altura inicial */
  max-height: 220px;   /* limite antes do scroll */

  padding: 14px;

  background: #151922;
  border-radius: 7px;

  color: #ffffff;
  font-size: 15px;
  line-height: 1.5;

  outline: none;
  border: none;

  overflow-y: auto;    /* 🔥 scroll interno */
  word-break: break-word;

  caret-color: #ffffff;

  /* Scrollbar Firefox */
  scrollbar-width: thin;
  scrollbar-color: #2a2f3a transparent;
  
}

/* Foco */
.post-editor:focus {
  background: #171c26;
}

/* ===================================================== */
/* 🧾 PLACEHOLDER REAL (ELEMENTO SEPARADO)               */
/* ===================================================== */

.post-editor-placeholder {
  position: absolute;
  top: 14px;
  left: 14px;

  color: var(--cor-placeholder-input);
  font-size: 15px;
  line-height: 1.5;

  pointer-events: none;
  user-select: none;
}

/* ===================================================== */
/* 🎚️ SCROLLBAR — WEBKIT                                */
/* ===================================================== */

.post-editor::-webkit-scrollbar {
  width: 6px;
}

.post-editor::-webkit-scrollbar-track {
  background: transparent;
}

.post-editor::-webkit-scrollbar-thumb {
  background-color: #2a2f3a;
  border-radius: 6px;
}



/* =========================================
   📝 BIO EDITOR — PERFIL
========================================= */
.bio-editor {
  position: relative;
  min-height: 60px;
  max-height: 140px;
  line-height: 1.5;
  border: none;
  outline: none;
  word-break: break-word;
  overflow-y: auto;
  /* Scroll invisível */
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  padding: 0.6rem 0.5rem;
  background-color: var(--bg-input);
  color: #B5B5B5;
  border: none;
  font-size: var(--fonte-md);
  border: 2px solid var(--cor-borda-forms);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: var(--fonte-principal);
  padding: 10px;
}

.bio-editor::-webkit-scrollbar {
  display: none;
}

/* Placeholder fake */
.bio-editor::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 10px;
  font-size: var(--fonte-md);
  color: var(--cor-placeholder-input);
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Foco */
.bio-editor:focus {
  background: #171c26;
  border: 2px solid #2226df99
}

/* 👇 ÚNICA REGRA QUE CONTROLA O PLACEHOLDER */
.bio-editor[data-has-text="false"]::before {
  opacity: 1;
}



.bio-editor-hashtag {
  color: #3b82f6;
  font-weight: 500;
  text-transform: lowercase;
}


/* =========================================
  *
  *
  * VALIDAÇÕES DOS INPUTS
  *
  *
========================================= */




/* =========================================
   ❌ ERRO INLINE DE FORMULÁRIO
========================================= */
.field-error {
  margin-top: 4px;
  font-size: 12px;
  color: #ea646c;
  display: none;
}

.input-error {
  border-color: #ea646c !important;
}

/* =========================================================
   📝 BIO — ERRO + CONTADOR (LAYOUT FIXO)
========================================================= */
.bio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 6px;
  font-size: 12px;
}

/* esquerda: reserva espaço SEMPRE */
.bio-footer .field-error {
  min-height: 16px;        /* reserva altura */
  min-width: 1px;         /* impede colapso */
  color: #ea646c;
  font-size: 12px;
  visibility: hidden;     /* 🔑 mantém espaço */
}

/* quando erro existir */
.bio-footer .field-error:not(:empty) {
  visibility: visible;
}

/* direita: contador */
.bio-counter {
  margin-left: auto;      /* 🔑 ancora à direita */
  color: #8b8fbb;
  font-size: 12px;
  white-space: nowrap;
}


.bio-counter.warning {
  color: #ea646c;
}


/* 🔥 Menção válida no editor de post */
.mention-preview {
  color: #ff8a00; /* laranja Ghostune */
  font-weight: 600;
}




.post-char-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
}

.post-char-count {
  color: #7d7d7d;
}

.post-char-count.exceeded {
  color: #ff4d4f;
}

.post-error-message {
  color: #ff4d4f;
  font-size: 12px;
}

.post-editor.exceeded {
  border: 1px solid #ff4d4f;
}
#postModal.spotify-preview-active .spotify-input-container {
  display: none !important;
}









