/* Estilos personalizados para o Repluggar */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

/* Layout principal */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar {
  background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-link span {
  display: none;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem 0.5rem;
}

/* Seção de perfil no menu */
.sidebar-profile {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.profile-picture-container {
  text-align: center;
  margin-bottom: 0.75rem;
}

.profile-picture {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.profile-picture:hover {
  transform: scale(1.05);
}

.profile-info {
  text-align: center;
  color: white;
}

.profile-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-email {
  font-size: 0.75rem;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quando o menu está colapsado */
.sidebar.collapsed .sidebar-profile {
  padding: 0.5rem;
}

.sidebar.collapsed .profile-info {
  display: none;
}

.sidebar.collapsed .profile-picture {
  width: 40px;
  height: 40px;
}

main {
  flex: 1;
  margin-left: 250px;
  padding: 1rem;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed+main {
  margin-left: 60px;
}

.top-row {
  background-color: #f7f7f7;
  border-bottom: 1px solid #d6d5d5;
  justify-content: flex-end;
  height: 3.5rem;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.sidebar-brand {
  flex: 1;
}

.brand-link {
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.brand-link:hover {
  color: #ffc107;
  text-decoration: none;
}

.brand-text {
  margin-left: 0.5rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
  transform: scale(1.1);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Logo */
.hero-logo {
  max-width: 500px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.hero-logo:hover {
  transform: scale(1.05);
}

/* Sidebar Content */
.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.sidebar-content.collapsed {
  display: none;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nav-section {
  margin-bottom: 1rem;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin: 0.25rem 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-link.active {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Avatar */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, #5aa9ff 0%, #6b60ff 100%);
  color: white;
  padding: 4rem 0;
  margin: -1rem -1rem 2rem -1rem;
}

.hero-section h1 {
  font-weight: 700;
  margin-bottom: 1rem;
  border: none !important;
  text-shadow: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Garantir que não há bordas em títulos */
.hero-section h1,
.hero-section .display-4 {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.hero-section .lead {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Features section */
.features-section {
  background-color: #f8f9fa;
}

.features-section .card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.features-section .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Botões */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Formulários */
.form-control {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Alertas */
.alert {
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

/* Loading */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Error page */
.error-page {
  padding: 2rem 0;
}

.error-page .display-1 {
  font-size: 6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1050;
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  main {
    margin-left: 0;
    padding: 0.5rem;
  }

  .sidebar-toggle {
    display: block !important;
  }

  .hero-section {
    padding: 2rem 0;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .sidebar-content.collapsed {
    display: none;
  }

  /* Overlay para fechar o menu no mobile */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

@media (min-width: 769px) {
  .sidebar-toggle {
    display: none !important;
  }

  .sidebar-content.collapsed {
    display: flex !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ====================================
   IMAGENS DE PERFIL E COMUNIDADE
   ==================================== */

/* Remover border-radius das imagens de perfil para torná-las quadradas */
.profile-picture,
.avatar img,
.profile-image,
.community-image {
  border-radius: 0 !important; /* Quadrado ao invés de circular */
  object-fit: cover;
}

/* Tamanhos padrão para imagens de perfil */
.profile-pic-small {
  width: 350px;
  height: 500px;
  object-fit: cover;
  border-radius: 0;
}

.profile-pic-medium {
  width: 350px;
  height: 650px;
  object-fit: cover;
  border-radius: 0;
}

.profile-pic-large {
  width: 350px;
  height: 770px;
  object-fit: cover;
  border-radius: 0;
}

/* Para manter responsividade em telas menores */
@media (max-width: 768px) {
  .profile-pic-small,
  .profile-pic-medium,
  .profile-pic-large {
    width: 100%;
    max-width: 350px;
    height: auto;
    aspect-ratio: 7/10; /* Manter proporção aproximada */
  }
}

/* Avatar containers também devem ser quadrados */
.avatar-circle {
  border-radius: 0 !important; /* Transformar em quadrado */
}

/* Avatares pequenos (ex: lista de usuários) */
.avatar {
  border-radius: 0 !important;
}

.avatar img {
  border-radius: 0 !important;
}

/* Imagens de perfil no menu lateral */
.sidebar-profile .profile-picture {
  border-radius: 0 !important;
  width: 60px;
  height: 85px; /* Proporção 350x500 reduzida */
  object-fit: cover;
}

.sidebar.collapsed .sidebar-profile .profile-picture {
  width: 40px;
  height: 57px;
}

/* Blazor error UI */
#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* ===== ESTILOS PARA SCRAPS (INTERFACE MODERNA) ===== */

/* Card de criação de scrap */
.scrap-creator {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.scrap-creator textarea {
  width: 100%;
  min-height: 120px; /* 🔄 AUMENTADO: era provavelmente 80px */
  max-height: 400px; /* 🆕 ADICIONADO: altura máxima */
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.scrap-creator textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: 0;
}

/* Cards de scraps */
.scrap-card {
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.scrap-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Container de scraps com melhor centralização */
.scraps-container {
  max-width: 100%;
  margin: 0 auto;
}

/* Textarea para comentários também maior */
.scrap-card textarea,
.scrap-card input[type="text"].form-control {
  min-height: 60px; /* 🆕 ADICIONADO: campo de comentário maior */
  resize: vertical;
}

/* Avatar circular */
.scrap-card .avatar,
.scrap-creator .avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
}

/* Responsividade */
@media (max-width: 768px) {
  .scrap-creator textarea {
    min-height: 100px;
  }
  
  .scrap-card textarea {
    min-height: 50px;
  }
}

/* Logo na página de login e registro */
.login-logo,
.register-logo {
  max-width: 150px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.login-logo:hover,
.register-logo:hover {
  transform: scale(1.05);
}

.logo-container {
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
  margin: 0.5rem 0 0.25rem 0;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0 0 0.5rem 0;
}

/* Login/Register page adjustments */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  width: 100%;
  max-width: 450px;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
}

.login-header {
  text-align: center;
  margin-bottom: 1rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0.5rem 0;
}

.login-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0;
}

/* Ajustar espaçamentos no form de login */
.login-form .form-group,
.register-form .form-group {
  margin-bottom: 0.75rem;
}

.login-form .form-label,
.register-form .form-label {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.login-form .form-control,
.register-form .form-control {
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
}

.forgot-password,
.register-links {
  text-align: center;
  margin-top: 1rem;
}

.forgot-password p,
.register-links p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

/* Logo no menu lateral (já existente, mantendo) */
.brand-logo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
  transform: scale(1.1);
}

/* Garantir que imagens não estourem em mobile */
@media (max-width: 576px) {
  .login-logo,
  .register-logo {
    max-width: 100px;
    max-height: 60px;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
  
  .logo-subtitle {
    font-size: 0.8125rem;
  }
  
  .login-page {
    padding: 0.5rem;
  }
  
  .login-card {
    max-width: 100%;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .login-title {
    font-size: 1.25rem;
  }
  
  .login-form .form-group,
  .register-form .form-group {
    margin-bottom: 0.5rem;
  }
}

/* Para telas pequenas em altura */
@media (max-height: 700px) {
.login-page {
    align-items: flex-start;
    padding-top: 2rem;
  }
  
  .login-logo,
  .register-logo {
    max-height: 60px;
  }
  
  .logo-text {
    font-size: 1.25rem;
    margin: 0.25rem 0;
  }
  
  .logo-subtitle {
font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }
  
  .login-title {
  font-size: 1.25rem;
    margin: 0.25rem 0;
  }
  
  .login-subtitle {
    font-size: 0.8125rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
}