/* Hover do SVG do botão Gerar Ideias igual ao texto */
.btn-gradient .svg-ideias {
  color: white;
  transition: color 0.3s;
}
.btn-gradient:hover .svg-ideias {
  color: #1d1d1b;
}
/* Títulos menores para seções secundárias */
.small-section-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6c6c6c;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}
body {
  background-color: #f5f5f5;
  font-family: "Lato", Arial, Helvetica, sans-serif;
}

.btn-gradient {
  background: linear-gradient(90deg, #8a2be2, #46bfff);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.form-control,
.form-select,
.custom-file-upload {
  height: 42px;
  min-height: 42px;
}

.form-control,
.form-select {
  border-radius: 6px;
  border: 1px solid #ccc;
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.form-control:focus,
.form-select:focus {
  border-color: #8a2be2;
  box-shadow: 0 0 0 0.2rem rgba(138, 43, 226, 0.25) !important;
  outline: none;
}

.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  justify-content: center;
  font-size: 0.95rem;
  color: #212529;
}
.custom-file-upload:hover {
  background-color: #f8f9fa;
}

.text-area {
  min-height: 200px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
  resize: vertical;
}

.title-container {
  text-align: center;
  margin-bottom: 40px;
}
.title-container h1 {
  margin-bottom: 8px;
}
.title-container h1 span {
  color: #8a2be2;
}

.align-items-stretch {
  align-items: stretch !important;
}
/* Torna o card inteiro clicável e hover global no nome */
.agency-card-link {
  display: block;
  height: 100%;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.svg-color {
  color: #1d1d1b;
}
/* Transição suave para o logo */
#headerLogo {
  transition: opacity 0.3s ease;
  opacity: 1;
}
#sidebarLogo {
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* Sub-Barra Lateral - entra por trás da principal */
#subSidebar {
  position: fixed;
  top: 0;
  left: 50px;
  width: 0;
  height: 100vh;
  background: white;
  border-radius: 0 12px 12px 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: width 0.3s ease, left 0.3s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}
#subSidebar.active {
  width: 190px;
  left: 50px;
}
#subSidebar.expanded {
  left: 190px;
}
/* Cabeçalho da sub-barra */
#subSidebarHeader {
  position: relative;
  padding: 16px 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  height: 50px;
  justify-content: flex-start;
}
#subSidebarLogo {
  max-height: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* Itens da sub-barra com FLEX + GAP */
.sub-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px 10px 32px; /* top right bottom left */
  color: #555;
  text-decoration: none;
  border-radius: 0;
  margin: 5px 0;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}
.sub-menu-item:hover,
.sub-menu-item:focus {
  background-color: transparent !important;
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
.sub-menu-item.active {
  background-color: #f0f0f0 !important;
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
.sub-menu-item.active,
#subSidebar .sub-menu-item.active:focus {
  background-color: #f0f0f0 !important;
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
.sub-menu-item i {
  font-size: 0.95rem;
  min-width: 18px;
  text-align: center;
}
/* Itens do menu da sidebar */
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  color: #555;
  text-decoration: none;
  border-radius: 6px;
  padding: 0 15px;
  margin: 0;
  transition: background-color 0.2s;
  width: 100%;
}
/* Destaque do item ativo: ocupa 100% da largura */
.nav-link.active-topic {
  background-color: #f0f0f0;
  color: #333;
  font-weight: 500;
  border-radius: 0;
  margin: 0;
}
/* Estilo para os títulos dos cards */
.card-title {
  font-family: "Lato", sans-serif;
  font-size: 24px;
  font-weight: 200;
  color: #383838;
}
.card-p {
  font-family: "Lato", sans-serif;
  font-size: 14px;
  font-weight: 200;
  color: #383838;
}
/* Contêiner do card */
.card-container {
  position: relative;
  width: 100%;
  height: 100%;
}
/* Card de fundo */
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  z-index: 1;
  padding-bottom: 15px;
  background: none;
}
.card-back::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  z-index: -1;
  background: linear-gradient(45deg, #8a2be2 0%, #78ecff 100%);
  opacity: 0.1;
  pointer-events: none;
}
/* Ícones no topo do card de trás */
.icon-container {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #c6c6c8;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 10;
}
.icon-container svg {
  color: #1d1d1b;
  fill: currentColor;
  transition: color 0.3s, fill 0.3s;
}
.icon-container a:hover svg {
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
.icon-container a:last-child:hover svg {
  color: #db0087 !important;
  fill: #db0087 !important;
}
/* Card da frente */
.card-front {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  z-index: 2;
  transition: transform 0.3s ease;
  padding: 0;
}

.card-front-ideias {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  z-index: 2;
  transition: transform 0.3s ease;
  padding: 0;
  border: 1px solid #ebecee;
}

.card-container:hover .card-front {
  transform: translateY(30px);
}
.card-container:hover .icon-container {
  opacity: 1;
}
#sidebar svg,
#sidebar i {
  color: #1d1d1b !important;
  fill: currentColor !important;
}
#sidebar .nav-link {
  color: #1d1d1b !important;
}
#sidebar .nav-link svg,
#sidebar .nav-link i {
  color: #1d1d1b !important;
  fill: currentColor !important;
  transition: color 0.2s, fill 0.2s;
}
#sidebar .nav-link:hover,
#sidebar .nav-link:focus {
  color: #8a2be2 !important;
}
#sidebar .nav-link:hover svg,
#sidebar .nav-link:focus svg,
#sidebar .nav-link:hover i,
#sidebar .nav-link:focus i {
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
#toggleBtn:hover {
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
  transition: color 0.2s, fill 0.2s;
}
#subSidebar .sub-menu-item,
#subSidebar .sub-menu-item i {
  color: #1d1d1b !important;
  fill: currentColor !important;
  transition: color 0.2s, fill 0.2s;
}
#subSidebar .sub-menu-item:hover,
#subSidebar .sub-menu-item:focus,
#subSidebar .sub-menu-item:hover i,
#subSidebar .sub-menu-item:focus i {
  color: #8a2be2 !important;
  fill: #8a2be2 !important;
}
#subSidebarHeader img {
  padding-left: 12px;
}

.btn-add-agency {
  width: 72px;
  height: 72px;
  padding: 0;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 40px; /* Alinha com o início do primeiro card */
  color: #fff;
  border: none;
}
.btn-add-agency:hover {
  transform: scale(1.08);
}

#data-ideia .calendar {
  background-color: #ebecee;
  color: #8a2be2;
  font-size: 13px;
}

#data-ideia .data {
  background-color: #8a2be2;
  color: white;
  font-size: 13px;
}

/* Permite que o conteúdo encolha dentro de qualquer col do card */
#titulo-ideia h5 {
  font-size: 16px;
  font-weight: 400;
  color: #8a2be2;
  overflow-wrap: break-word;
}

#criativo .col, #texto .col, #prompt-ideia .col, #titulo-ideia .col {
  min-width: 0; /* crítico para flex quebrar conteúdo */
  overflow-wrap: break-word;
}

#prompt-ideia p {
  font-size: 13px;
  font-weight: 200;
  color: #1d1d1b;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Para navegadores modernos */
  line-clamp: 10;
  box-orient: vertical;
  /* Remove duplicidade e conflitos */
  overflow-wrap: break-word;
}

#criativo p {
  font-size: 13px;
  font-weight: 200;
  color: #1d1d1b;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Para navegadores modernos */
  line-clamp: 10;
  box-orient: vertical;
  /* Remove duplicidade e conflitos */
}

#texto p {
  font-size: 13px;
  font-weight: 200;
  color: #1d1d1b;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Para navegadores modernos */
  line-clamp: 10;
  box-orient: vertical;
  /* Remove duplicidade e conflitos */
}

.card-front svg {
  color: #8a2be2;
}

html,
body {
  overflow-x: hidden !important;
  height: 100%;
}

/* 
.main-cards-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 300px); 
    padding-bottom: 24px;
} 
 */

.label-conteudo {
  font-size: 12px;
  font-weight: 300;
  color: #8400f2;
}

/* --- Calendário e Filtros --- */
.filter-container {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  justify-content: center;
}

.filter-select {
  min-width: 120px;
  width: auto;
  flex: 0 1 auto;
}

.filter-container button {
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-purple {
  background-color: #8b00ff;
  color: white;
  border: none;
  padding: 0.375rem 1.2rem; /* igual ao .form-select vertical */
  height: 38px; /* igual ao .form-select padrão Bootstrap */
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.5;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.btn-purple:hover {
  background-color: #7000d0;
}

.calendar-container {
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(
    90deg,
    rgba(138, 43, 226, 0.18) 0%,
    rgba(70, 191, 255, 0.18) 100%
  );
  border-bottom: 1px solid #e0e0e0;
}

.calendar-header div {
  text-align: center;
  padding: 12px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1d1d1b;
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.calendar-day {
  padding: 4px 12px 12px 7px;
  min-height: 140px;
  border: 1px solid #eee;
  background-color: #fff;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
}

.calendar-day:hover {
  background-color: #f9f9f9;
}

.calendar-day .day-number {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
  padding-left: 0;
}

.calendar-day .event-tag {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin: 4px 0 0 0;
  padding: 3px 0 3px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: left;
  word-break: break-word;
  max-width: 100%;
}

.event-tag {
  background-color: #f3d7ff;
  color: #8b00ff;
}

.btn-add-agency {
  width: 72px;
  height: 72px;
  padding: 0;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 40px; /* Alinha com o início do primeiro card */
  color: #fff;
  border: none;
}
.btn-add-agency:hover {
  transform: scale(1.08);
}

/* ==============================
   STYLES ESCOPADOS: .workspace-page
   (não altera estilos globais)
   ============================== */

.workspace-page {
  background-color: #f5f5f5;
  font-family: "Lato", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 80vh;
  margin: 0;
  padding: 20px;
}

.workspace-page .container-main {
  width: 900px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0;
  overflow: hidden;
}

/* ===== AJUSTES QUANDO ESTÁ DENTRO DO MODAL ===== */
#genericModal .workspace-page {
  background: transparent !important;
  min-height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
}

#genericModal .container-main {
  width: 100% !important;
  max-width: 100% !important;
  height: 600px !important;       /* ⬅️ ALTURA FIXA */
  max-height: 600px !important;   /* ⬅️ garante limite */
  overflow-y: auto !important;    /* ⬅️ faz rolar se passar */
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.nav-tabs {
  display: flex;
  border-bottom: none;
  margin: 0;
  padding: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  height: 60px;
}

.nav-item {
  flex: 1;
  margin: 0;
  padding: 0;
}

.workspace-page .nav-link {
  background-color: #f8f8ff;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-left: none;
  color: #333;
  font-weight: 400;
  text-align: center;
  padding: 16px 8px;
  transition: all 0.2s ease;
  border-radius: 0 !important;
  font-size: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  font-family: "Lato", sans-serif;
}

.nav-item:first-child .nav-link {
  border-top-left-radius: 12px;
  border-left: 1px solid #e0e0e0;
}

.nav-item:last-child .nav-link {
  border-top-right-radius: 12px;
}

.nav-link.active {
  background-color: #7c2aed;
  color: white;
  border-color: #7c2aed;
  box-shadow: 0 2px 8px rgba(124, 42, 237, 0.2);
}

.nav-link:hover:not(.active) {
  background-color: #e8e8ff;
  border-color: #d0d0e0;
}

.tab-content {
  padding: 25px;
}

.tab-pane h2.section-title {
  position: relative;
  margin: 0 0 24px 0;
  text-align: left;
  font-weight: 700;
  color: #333;
  font-size: 1.3rem;
  font-family: "Lato", sans-serif;
}

.workspace-page .section-title .btn-add-workspace {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.workspace-page .form-label {
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.workspace-page .form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 12px;
  font-size: 1rem;
}

.workspace-page .form-control:focus {
  box-shadow: 0 0 0 3px rgba(124, 42, 237, 0.1);
  border-color: #7c2aed;
}

.workspace-page .btn-primary,
.workspace-page
  .btn-outline-primary:not(.btn-outline-secondary):not(.btn-outline-danger) {
  background-color: #7c2aed;
  border-color: #7c2aed;
}

.workspace-page .btn-primary:hover,
.workspace-page
  .btn-outline-primary:hover:not(.btn-outline-secondary):not(
    .btn-outline-danger
  ) {
  background-color: #6a22d4;
  border-color: #6a22d4;
}

button.btn.btn-warning i {
  color: inherit;
  transition: color 0.25s ease, transform 0.25s ease;
}

button.btn.btn-warning:hover i {
  color: #ffc107; /* amarelo Bootstrap */
  transform: translateY(-2px); /* sobe um pouco */
}

.avatar-container {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #f0f0f0;
  overflow: hidden;
  margin: 20px auto;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  color: white;
  font-size: 12px;
}

/* hover: mostra o overlay */
.avatar-container:hover .avatar-overlay {
  opacity: 1;
}

.check-item .avatar-sm {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.avatar-group img {
  width: 32px;
  height: 32px;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #eee;
  margin-left: -8px;
}

.avatar-group .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-left: 4px;
}

.action-buttons .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.form-switch .form-check-input {
  width: 36px;
  height: 20px;
  background-color: #dee2e6;
  border-color: #dee2e6;
}

.form-switch .form-check-input:checked {
  background-color: #7c2aed;
  border-color: #7c2aed;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(124, 42, 237, 0.25);
}

.workspace-page .btn-add-workspace {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  padding: 0;
  font-size: 1.5rem;
  background-color: #7c2aed;
  border-color: #7c2aed;
}

.workspace-page .btn-add-workspace:hover {
  background-color: #6a22d4;
  border-color: #6a22d4;
}

.workspace-page .pagination .page-link {
  color: #7c2aed;
}

.pagination .page-item.active .page-link {
  background-color: #7c2aed;
  border-color: #7c2aed;
  color: white !important;
}

.workspace-page .pagination .page-link:hover {
  color: #6a22d4;
}

.workspace-page .user-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  min-height: 60px;
}

.user-item.pending-invite {
  background-color: #fffacd;
}

.workspace-page .user-item .avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  flex-shrink: 0;
}

.workspace-page .user-item .user-info {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.workspace-page .user-item .user-name {
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-page .user-item .info-icon {
  margin-left: 8px;
  color: #6c757d;
  font-size: 0.9rem;
}

.workspace-page .user-item .toggle-wrapper {
  margin: 0 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.workspace-page .user-item .form-check {
  margin-bottom: 0;
}

.workspace-page .user-item .role-select-wrapper {
  min-width: 140px;
  width: auto;
  margin-right: 16px;
  flex-shrink: 0;
}

.workspace-page .user-item .form-select {
  font-size: 0.9rem;
}

.workspace-page .user-item .action-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.workspace-page .user-item .action-buttons .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.btn-outline-roxo {
  border-color: #7c2aed !important;
  color: #7c2aed !important;
  background-color: transparent !important;
}

.btn-outline-roxo:hover,
.btn-outline-roxo:focus {
  background-color: #f3eaff !important;
  color: #6a22d4 !important;
  border-color: #6a22d4 !important;
}

/* End User Panel */

/* Start Selector */
.selector-container {
  position: relative;
  display: inline-block;
  width: 180px;
}

.selector-display {
  width: 100%;
  height: 32px; /* altura fixa */
  min-height: 32px; /* garante altura mínima */
  max-height: 32px; /* garante altura máxima */
  padding: 4px 6px; /* padding ajustado */
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  box-sizing: border-box;
  overflow: hidden; /* evita que conteúdo ultrapasse */
}

.selector-display img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

#workspace-nome {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.agency-item {
  position: relative;
  padding: 6px 10px; /* altura menor */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px; /* fonte menor */
}

.agency-item:hover {
  background: #f5f5f5;
}

.agency-item img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.workspaces-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  width: 180px;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1001;
}

.agency-item:hover .workspaces-submenu {
  display: block;
}

.workspace-selector {
  padding: 6px 10px; /* altura menor */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px; /* fonte menor */
}

.workspace-selector:hover {
  background: #f0f0f0;
}

#resultado {
  margin-top: 20px;
  font-weight: bold;
  color: #2c7;
  font-size: 16px;
}

.img-sobreposta {
  margin-left: -8px;
  box-shadow: 0 0 0 2px #fff; /* opcional: borda branca para destacar */
  position: relative;
  z-index: 1;
}
/* end seletor de workspaces */

/* start prompt css */
.prompt {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-container {
  width: 1240px;
  height: 820px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 40px; /* Aumentado de 20px para 40px */
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: flex-end; /* Botão à direita */
  margin-bottom: 15px;
}

.save-btn {
  background: linear-gradient(45deg, #78ecff, #8b61f4);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-family: "Lato", sans-serif;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.save-btn:hover {
  transform: scale(1.05);
}

.prompt .section-title {
  color: #8400f2;
  font-weight: bold;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.prompt .section-title i {
  background: linear-gradient(45deg, #78ecff, #8b61f4);
  color: white;
  border-radius: 50%;
  padding: 8px;
  font-size: 1.2rem;
}

.col-container {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  flex: 1;
  align-items: flex-start; /* importante para alinhar pelo topo */
}

.prompt .card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  height: 160px;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: visible;
  z-index: 1;
}

.card-description {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-height: calc(1.4em * 3);
  white-space: normal;
}

.inactive {
  opacity: 0.3;
}

.prompt .card.selected {
  box-shadow: 0 0 0 2px #8400f2;
  position: relative;
  z-index: 2;
}

.prompt .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
  margin: 0 0 10px 0;
  background: none;
  border: none;
}

.prompt .card-toggle {
  position: relative;
  top: 0;
  left: 0;
}

.prompt .card-actions {
  position: relative;
  top: 0;
  right: 0;
  display: flex;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.prompt .card-actions .btn i {
  color: #495057;
  font-size: 1.25rem;
  transition: color 160ms ease, transform 120ms ease;
  line-height: 1;
  display: inline-block;
}

.prompt .card-actions .btn.edit-channel:hover i,
.prompt .card-actions .btn.edit-type:hover,
.prompt .card-actions .btn.edit-format:hover i,
.prompt .card-actions .btn.btn-outline-primary:hover i {
  color: #6f22d9 !important;
  transform: translateY(-1px);
}

.prompt .card-actions .btn.delete-channel:hover i,
.prompt .card-actions .btn.delete-type:hover i,
.prompt .card-actions .btn.delete-format:hover i,
.prompt .card-actions .btn.btn-outline-danger:hover i {
  color: #b71c28 !important;
  transform: translateY(-1px);
}

.prompt .card > .text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  text-align: center;
  transform: translateY(-8px);
}

.prompt .card-icon {
  font-size: 2.4rem;
  color: #6f22d9;
  transition: color 160ms ease, transform 160ms ease;
  line-height: 1;
  transform: translateY(-2px);
}

.prompt .card:hover .card-icon,
.prompt .card.selected .card-icon {
  color: #5a0fc0;
  transform: translateY(-6px);
}

.prompt .card-title {
  color: #8400f2;
  font-weight: 700;
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.prompt .add-btn {
  background: linear-gradient(45deg, #78ecff, #8b61f4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-left: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.prompt .add-btn:hover {
  transform: scale(1.1);
}

.col-container {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  flex: 1;
  align-items: flex-start; /* importante para alinhar pelo topo */
}

.col {
  flex: 1;
  min-width: 300px;
  padding-top: 10px; /* garante espaço para o ícone subir sem ser cortado */
  padding-bottom: 10px; /* espaço inferior para hover/box-shadow */
  padding-left: 8px; /* evita corte à esquerda dos cards */
  padding-right: 8px; /* evita corte à direita quando houver scrollbar */
  box-sizing: border-box;
  overflow: visible; /* permite que sombra/ícone fiquem visíveis */
}

.subtitle {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.subtitle span {
  color: #8400f2;
  font-weight: bold;
}

/* Custom Toggle Switch */
.form-switch .form-check-input {
  width: 36px;
  height: 20px;
  background-color: #ddd;
  border-color: #ddd;
}

.form-switch .form-check-input:checked {
  background-color: #8400f2;
  border-color: #8400f2;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(132, 0, 242, 0.25);
}

.form-switch .form-check-input:after {
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
}

.form-switch .form-check-input:checked:after {
  background-color: white;
  left: 18px;
}

/* Estilo para a grade de canais */
#channelsContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-height: 520px; /* limite dentro do box, ajusta conforme necessidade */
  overflow-y: auto; /* ativa scroll vertical apenas na primeira coluna */
  padding: 8px 6px; /* padding topo/lat/dir para evitar corte nas bordas */
  box-sizing: border-box;
}

/* barra de rolagem discreta para a coluna de canais */
#channelsContainer::-webkit-scrollbar {
  width: 8px;
}
#channelsContainer::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}
#channelsContainer::-webkit-scrollbar-track {
  background: transparent;
}

/* Garantir que tipos e formatos tenham scroll quando extrapolam o box (igual canais) */
#typesContainer,
#formatsContainer {
  display: flex;
  flex-direction: column;
  gap: 15px; /* espaçamento entre cards */
  max-height: 520px; /* limite igual ao channelsContainer */
  overflow-y: auto; /* ativa scroll vertical quando necessário */
  padding: 8px 6px; /* padding interno para evitar corte nas bordas */
  box-sizing: border-box;
}

/* barras de rolagem discretas (WebKit) para tipos e formatos */
#typesContainer::-webkit-scrollbar,
#formatsContainer::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
#typesContainer::-webkit-scrollbar-thumb,
#formatsContainer::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}
#typesContainer::-webkit-scrollbar-track,
#formatsContainer::-webkit-scrollbar-track {
  background: transparent;
}

.footer-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

/* Botão de salvar nos modais com cor roxa */
.modal .btn-primary {
  background-color: #8400f2;
  border-color: #8400f2;
}

.modal .btn-primary:hover {
  background-color: #7200d6;
  border-color: #7200d6;
}

/* Centralizar o modal verticalmente */
.modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 1rem); /* Ajuste para centralizar melhor */
  margin: 0 auto;
}

/* Remove contornos (quadrados) dos botões de editar/excluir dentro de .card-actions */
.card-actions .btn,
.card-actions .btn.btn-outline-primary,
.card-actions .btn.btn-outline-danger {
  border: none !important;
  background: transparent !important;
  padding: 2px;
  margin: 0;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #6c757d;
  box-shadow: none !important;
  transition: color 140ms ease, background-color 140ms ease;
}

/* mostra com fade ao passar o mouse ou ao focar dentro do card (acessibilidade) */
.card:hover .card-actions,
.card:focus-within .card-actions,
.card.selected .card-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* hover colors para os botões de editar/excluir */
.card-actions .btn {
  transition: color 140ms ease, background-color 140ms ease,
    transform 120ms ease;
}

/* hover específico para botão de editar: roxo suave (sem background, só cor) */
.card-actions .btn.edit-channel:hover,
.card-actions .btn.edit-type:hover,
.card-actions .btn.edit-format:hover,
.card-actions .btn.btn-outline-primary:hover {
  background-color: transparent !important;
  color: #8400f2 !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

/* hover específico para botão de excluir: vermelho suave (sem background, só cor) */
.card-actions .btn.delete-channel:hover,
.card-actions .btn.delete-type:hover,
.card-actions .btn.delete-format:hover,
.card-actions .btn.btn-outline-danger:hover {
  background-color: transparent !important;
  color: #dc3545 !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

/* espaço extra nas colunas para evitar corte ao hover (top/bottom) */
.col {
  flex: 1;
  min-width: 300px;
  padding-top: 10px; /* garante espaço para o ícone subir sem ser cortado */
  padding-bottom: 10px; /* espaço inferior para hover/box-shadow */
  padding-left: 8px; /* evita corte à esquerda dos cards */
  padding-right: 8px; /* evita corte à direita quando houver scrollbar */
  box-sizing: border-box;
  overflow: visible; /* permite que sombra/ícone fiquem visíveis */
}

/* containers com scroll mantêm padding interno para não cortar filhos ao mover */
#channelsContainer,
#typesContainer,
#formatsContainer {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 4px; /* pequena folga interna */
  padding-right: 4px;
  box-sizing: border-box;
}

/* evita corte causado por overflow do próprio card (se houver sombras internas) */
.card {
  overflow: visible;
  z-index: 1;
}

/* ao hover, traz o card para frente e reduz deslocamento para evitar ultrapassar limites */
.card:hover,
.card.selected {
  z-index: 8;
}

card:hover .card-icon,
.card.selected .card-icon {
  transform: translateY(-4px); /* menos que antes para reduzir risco de corte */
}

