/*
 * ===================================================================
 * SISTEMA DE FEEDBACKS DISCORD - CAROUSEL INTERATIVO
 * ===================================================================
 * @author Rzul275
 * @version 1.0.0
 * @date 2025-10-18
 * @category Otimização / Outros
 * ===================================================================
 */

/* ===== FORÇA EXIBIÇÃO DAS IMAGENS ===== */
#discord-feedbacks-section .feedback-image,
.feedback-container .feedback-image,
.feedback-card .feedback-image {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
}

/* ===== RESET SCOPED ===== */
.feedback-container *,
.feedback-container *::before,
.feedback-container *::after {
  box-sizing: border-box;
}

/* ===== CONTAINER PRINCIPAL ===== */
.feedback-container {
  background: linear-gradient(135deg, #2c2f33 0%, #23272a 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 1px rgba(255, 255, 255, 0.1) inset;
  max-width: 100%;
  width: 100%;
  transition: box-shadow 0.3s ease;
  margin: 0 auto;
}

.feedback-container:hover {
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* ===== HEADER STYLING ===== */
.feedback-header {
  background: linear-gradient(90deg, #7289da 0%, #5b73c3 100%);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
  min-height: 56px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.discord-icon {
  width: 32px;
  height: 32px;
  color: #fff;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  color: #fff;
}

.header-right {
  font-size: 14px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-count {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.member-count:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== CAROUSEL STYLING ===== */
#discord-feedbacks-section .feedback-carousel {
  padding: 20px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

#discord-feedbacks-section .carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #2c2f33;
  flex: 1;
  min-height: 280px;
  max-height: 450px;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

#discord-feedbacks-section .feedback-pages {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  width: 100%;
  scrollbar-width: none;
}

.feedback-pages::-webkit-scrollbar {
  display: none;
}

.feedback-page {
  min-width: 100%;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-shrink: 0;
  overflow: hidden;
}

/* ===== CARD DE FEEDBACK ===== */
.feedback-card {
  background: #36393f;
  border-radius: 8px;
  overflow: hidden;
  border-left: 4px solid #7289da;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feedback-card:hover {
  background: #40444b;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-left-color: #5b73c3;
}

.feedback-card:focus-within {
  outline: 2px solid #7289da;
  outline-offset: 2px;
}

.feedback-image {
  width: 100%;
  max-height: 380px;
  min-height: 200px;
  height: auto;
  object-fit: contain;
  background: linear-gradient(135deg, #2c2f33 0%, #36393f 100%);
  display: block;
  animation: fadeIn 0.4s ease;
  border-bottom: 1px solid rgba(114, 137, 218, 0.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.feedback-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-message {
  font-size: 14px;
  color: #c7c9d1;
  line-height: 1.6;
}

.feedback-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.feedback-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7289da, #5b73c3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(114, 137, 218, 0.3);
}

.feedback-user-info {
  flex: 1;
  min-width: 0;
}

.feedback-username {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  word-break: break-word;
}

.feedback-date {
  font-size: 12px;
  color: #a8a9ad;
  margin-top: 2px;
}

/* ===== CONTROLES DE NAVEGAÇÃO ===== */
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 50px;
}

.nav-btn {
  background: linear-gradient(135deg, #7289da, #5b73c3);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(114, 137, 218, 0.3);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.nav-btn:hover:not(:disabled)::before {
  width: 100px;
  height: 100px;
}

.nav-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5b73c3, #4a5fa0);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(114, 137, 218, 0.4);
}

.nav-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.nav-btn:disabled {
  background: #4a4d51;
  cursor: not-allowed;
  opacity: 0.4;
  box-shadow: none;
}

.nav-btn:focus-visible {
  outline: 2px solid #7289da;
  outline-offset: 2px;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.page-indicators {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72767d;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.indicator:hover {
  background: #99aab5;
  transform: scale(1.2);
}

.indicator.active {
  background: #7289da;
  width: 24px;
  border-radius: 4px;
  transform: scaleX(1);
}

.indicator:focus-visible {
  outline: 2px solid #7289da;
  outline-offset: 2px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #2c2f33 0%, #23272a 100%);
  padding: 24px;
  border-top: 1px solid #202225;
  text-align: center;
  position: relative;
  z-index: 5;
}

.cta-text {
  font-size: 14px;
  color: #b9bbbe;
  margin-bottom: 16px;
  line-height: 1.6;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #7289da, #5b73c3);
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(114, 137, 218, 0.3);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: 0;
}

.cta-button:hover {
  background: linear-gradient(135deg, #5b73c3, #4a5fa0);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(114, 137, 218, 0.4);
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button:focus-visible {
  outline: 2px solid #7289da;
  outline-offset: 2px;
}

.cta-button svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.cta-button span {
  position: relative;
  z-index: 1;
}

/* ===== UTILITÁRIOS ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.loading {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    90deg,
    #2c2f33 25%,
    #36393f 50%,
    #2c2f33 75%
  );
  background-size: 1000px 100%;
}

/* ===== RESPONSIVIDADE ===== */

/* Wrapper extra para controle de largura */
#discord-feedbacks-section .feedback-container {
  max-width: 1200px !important;
}

/* TABLET (768px - 1023px) */
@media (max-width: 1023px) {
  .feedback-carousel {
    padding: 16px;
    min-height: 380px;
    gap: 16px;
  }

  .carousel-wrapper {
    min-height: 280px;
  }

  .feedback-image {
    max-height: 200px;
  }

  .feedback-header {
    padding: 14px 16px;
    min-height: 52px;
  }

  .header-title {
    font-size: 18px;
  }

  .member-count {
    font-size: 12px;
    padding: 3px 10px;
  }

  .nav-btn {
    width: 36px;
    height: 36px;
  }

  .nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .cta-section {
    padding: 16px;
  }

  .cta-text {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .cta-button {
    padding: 8px 20px;
    font-size: 13px;
    gap: 6px;
  }

  .cta-button svg {
    width: 16px;
    height: 16px;
  }
}

/* MOBILE (< 768px) */
@media (max-width: 767px) {
  .feedback-carousel {
    padding: 12px;
    min-height: 300px;
    gap: 12px;
  }

  .carousel-wrapper {
    min-height: 240px;
    border-radius: 6px;
  }

  .feedback-page {
    padding: 12px;
  }

  .feedback-card {
    border-left-width: 3px;
  }

  .feedback-image {
    max-height: 160px;
  }

  .feedback-card-body {
    padding: 12px;
    gap: 10px;
  }

  .feedback-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .feedback-username {
    font-size: 13px;
  }

  .feedback-date {
    font-size: 11px;
  }

  .feedback-header {
    padding: 12px 14px;
    min-height: 48px;
    gap: 8px;
  }

  .header-left {
    gap: 8px;
  }

  .discord-icon {
    width: 28px;
    height: 28px;
  }

  .header-title {
    font-size: 16px;
  }

  .header-right {
    font-size: 12px;
  }

  .member-count {
    font-size: 11px;
    padding: 2px 8px;
  }

  .carousel-controls {
    gap: 12px;
    min-height: 46px;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    min-width: 44px;
    min-height: 44px;
  }

  .nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .page-indicators {
    gap: 6px;
  }

  .indicator {
    width: 6px;
    height: 6px;
  }

  .indicator.active {
    width: 20px;
  }

  .cta-section {
    padding: 12px;
  }

  .cta-text {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .cta-button {
    padding: 8px 18px;
    font-size: 12px;
    gap: 6px;
  }

  .cta-button svg {
    width: 14px;
    height: 14px;
  }
}

/* MUITO PEQUENO (< 480px) */
@media (max-width: 479px) {
  .feedback-carousel {
    padding: 8px;
    min-height: 260px;
  }

  .carousel-wrapper {
    min-height: 200px;
  }

  .feedback-page {
    padding: 8px;
  }

  .feedback-image {
    max-height: 140px;
  }

  .feedback-card-body {
    padding: 10px;
  }

  .feedback-header {
    flex-direction: row;
    gap: 6px;
  }

  .header-title {
    font-size: 14px;
  }

  .discord-icon {
    width: 24px;
    height: 24px;
  }

  .member-count {
    font-size: 10px;
    padding: 2px 6px;
  }

  .cta-button {
    width: 100%;
    padding: 10px 12px;
  }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  .feedback-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  }
}

/* PRINT */
@media print {
  .carousel-controls,
  .cta-section {
    display: none;
  }

  .feedback-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* MOTION PREFERENCES */
@media (prefers-reduced-motion: reduce) {
  .feedback-container,
  .feedback-container *,
  .feedback-container *::before,
  .feedback-container *::after {
    animation: none !important;
    transition: none !important;
  }
}