/* ==================== ESTILOS PARA AUTENTICACIÓN ==================== */

#user-auth-container {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1001;
}

/* En PC: Alineado a la derecha en la navbar top panel */
@media (min-width: 769px) {
  #user-auth-container {
    margin-left: 15px;
    order: 3;
  }

  .rd-navbar-top-panel-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .left-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .center-side {
    flex: 1;
    text-align: center;
    order: 2;
  }

  .right-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    order: 3;
  }

  .contact-info {
    display: flex;
    align-items: center;
  }
}

/* En móviles: Debajo del contacto en la sección derecha */
@media (max-width: 768px) {
  #user-auth-container {
    margin-top: 12px;
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
  }

  .right-side {
    width: 100%;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
  }

  .contact-info {
    width: 100%;
  }

  .contact-info .unit {
    justify-content: flex-end;
  }
}

/* ==================== USUARIO LOGUEADO ==================== */
.user-logged-in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  backdrop-filter: blur(10px);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.user-name {
  color: white;
  font-size: 14px;
  font-weight: 600;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 15px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-logout:hover {
  background: #c0392b;
}

/* ==================== BOTÓN LOGIN ==================== */
.btn-login {
  background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.5);
}

.btn-login i {
  font-size: 16px;
}

/* ==================== MENSAJE NO LOGUEADO ==================== */
#notLoggedMessage {
  display: none;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  color: #856404;
  text-align: center;
}

.dark-mode #notLoggedMessage {
  background: #333333;
  border: 1px solid #666;
  color: #ffc107;
}

/* ==================== FORMULARIO DE COMENTARIOS DESHABILITADO ==================== */
#commentForm {
  opacity: 1;
  transition: opacity 0.3s ease;
}

#commentForm:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ==================== COMENTARIO CON DATOS DE USUARIO ==================== */
.comment-item {
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 5px;
}

.dark-mode .comment-item {
  background: #282828;
  border-left: 4px solid #0ad930;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3498db;
}

.dark-mode .comment-user-avatar {
  border: 2px solid #0ad930;
}

.comment-author-details {
  display: flex;
  flex-direction: column;
}

.comment-author {
  font-weight: 700;
  color: var(--light-text-color);
  font-size: 14px;
}

.dark-mode .comment-author {
  color: var(--dark-text-color);
}

.comment-date {
  font-size: 12px;
  color: #999;
}

.dark-mode .comment-date {
  color: #666;
}

.comment-rating {
  color: #ffc107;
  font-size: 14px;
  margin-bottom: 8px;
}

.comment-text {
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.dark-mode .comment-text {
  color: #ddd;
}

/* ==================== PRODUCTO REFERENCIADO EN COMENTARIO ==================== */
.comment-product-ref {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 5px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--light-text-color);
  transition: all 0.3s ease;
}

.dark-mode .comment-product-ref {
  background: rgba(10, 217, 48, 0.1);
  color: var(--dark-text-color);
}

.comment-product-ref:hover {
  background: rgba(52, 152, 219, 0.2);
  transform: translateX(5px);
}

.dark-mode .comment-product-ref:hover {
  background: rgba(10, 217, 48, 0.2);
}

.comment-product-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.comment-product-info {
  flex: 1;
}

.comment-product-name {
  font-weight: 600;
  font-size: 13px;
  display: block;
}

.comment-product-category {
  font-size: 11px;
  opacity: 0.7;
  display: block;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .user-logged-in {
    gap: 8px;
    padding: 6px 10px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
  }

  .user-name {
    max-width: 100px;
    font-size: 13px;
  }

  .btn-logout {
    padding: 5px 10px;
    font-size: 11px;
  }

  .btn-login {
    padding: 8px 15px;
    font-size: 13px;
  }

  .comment-product-ref {
    flex-direction: column;
    gap: 8px;
  }

  .comment-product-img {
    width: 100%;
    height: auto;
  }
}
