/* Estilos do Plugin de Compartilhamento de Conteúdo */
.csp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.csp-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.csp-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.csp-icon {
  /* Ajustado tamanho para ícones SVG */
  width: 32px;
  height: 32px;
  stroke-width: 2;
  flex-shrink: 0;
}

.csp-subtitle {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}

.csp-upload-section {
  margin-bottom: 40px;
}

.csp-upload-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid #f0f0f0;
  transition: all 0.3s ease;
}

.csp-upload-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-color: #ffa500;
}

.csp-upload-card h3 {
  color: #1b365d;
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.csp-form-group {
  margin-bottom: 20px;
}

.csp-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1b365d;
  font-size: 1rem;
}

.csp-form-group input[type="file"],
.csp-form-group textarea,
.csp-form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.csp-form-group input[type="file"]:focus,
.csp-form-group textarea:focus,
.csp-form-group select:focus {
  outline: none;
  border-color: #ffa500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.csp-form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.9rem;
}

.csp-form-group select[multiple] {
  height: 120px;
}

.csp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.csp-btn-primary {
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.csp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.csp-btn-download {
  background: #28a745;
  color: white;
  font-size: 0.9rem;
  padding: 8px 16px;
}

.csp-btn-download:hover {
  background: #218838;
  transform: translateY(-1px);
}

.csp-btn-delete {
  background: #dc3545;
  color: white;
  font-size: 0.9rem;
  padding: 8px 16px;
}

.csp-btn-delete:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.csp-btn-preview {
  background: #17a2b8;
  color: white;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.csp-btn-preview:hover {
  background: #138496;
  transform: translateY(-1px);
}

.csp-files-section {
  margin-top: 40px;
}

.csp-files-section h3 {
  color: #1b365d;
  font-size: 1.8rem;
  margin-bottom: 25px;
  font-weight: 600;
  text-align: center;
}

.csp-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.csp-file-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e1e5e9;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.csp-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-color: #ffa500;
}

.csp-file-icon {
  /* Ajustado para ícones SVG profissionais */
  text-align: center;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.csp-file-type-icon {
  /* Estilo para ícones SVG de tipo de arquivo */
  width: 32px;
  height: 32px;
  stroke: #1b365d;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.csp-file-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1b365d;
  margin: 0 0 8px 0;
  word-break: break-word;
  line-height: 1.3;
}

.csp-file-description {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.csp-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #888;
}

.csp-file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.csp-no-files {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #ddd;
}

.csp-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  text-align: center;
  font-weight: 500;
}

.csp-success {
  background: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  text-align: center;
  font-weight: 500;
  margin-bottom: 20px;
}

.csp-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ffa500;
  border-radius: 50%;
  animation: csp-spin 1s linear infinite;
}

.csp-preview-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.csp-preview-content {
  position: relative;
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.csp-preview-header {
  background: linear-gradient(135deg, #1b365d 0%, #2c5282 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.csp-preview-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.csp-preview-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.csp-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.csp-preview-body {
  padding: 20px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.csp-preview-iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 8px;
}

.csp-preview-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.csp-preview-info {
  text-align: center;
  padding: 40px 20px;
}

.csp-preview-info h3 {
  color: #1b365d;
  margin-bottom: 15px;
}

.csp-preview-info p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

.csp-btn-icon {
  /* Estilo para ícones SVG nos botões */
  width: 16px;
  height: 16px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Responsividade */
@media (max-width: 768px) {
  .csp-container {
    padding: 15px;
  }

  .csp-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 10px;
  }

  .csp-files-grid {
    grid-template-columns: 1fr;
  }

  .csp-file-actions {
    justify-content: center;
  }

  .csp-course-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .csp-course-title {
    font-size: 1.5rem;
  }

  .csp-preview-content {
    width: 95%;
    margin: 5% auto;
  }

  .csp-preview-iframe {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .csp-title {
    font-size: 1.8rem;
  }

  .csp-icon {
    /* Ajustado tamanho responsivo para ícones SVG */
    width: 28px;
    height: 28px;
  }

  .csp-file-icon {
    font-size: 1.8rem;
  }

  .csp-file-type-icon {
    width: 28px;
    height: 28px;
  }

  .csp-subtitle {
    font-size: 1rem;
  }

  .csp-file-actions {
    flex-direction: column;
  }

  .csp-btn-preview,
  .csp-btn-download,
  .csp-btn-delete {
    width: 100%;
    justify-content: center;
  }
}

/* Estilos específicos para diferentes categorias */
.csp-documentos .csp-header {
  background: linear-gradient(135deg, #1b365d 0%, #2c5282 100%);
}

.csp-material .csp-header {
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
}

.csp-courses-section {
  margin-top: 30px;
}

.csp-course-block {
  background: white;
  border-radius: 12px;
  margin-bottom: 30px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #ffa500;
  transition: all 0.3s ease;
}

.csp-course-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.csp-course-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.csp-course-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1b365d;
  margin: 0;
}

.csp-course-code {
  background: #ffa500;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.csp-course-description {
  color: #666;
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Animações suaves */
.csp-file-card,
.csp-course-block,
.csp-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Melhorias de acessibilidade */
.csp-btn:focus {
  outline: 2px solid #ffa500;
  outline-offset: 2px;
}

.csp-preview-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

@keyframes csp-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
