/**
 * 📚 GameResources Component Styles
 * Mobile-first accordion para recursos de juego
 */

/* Container */
.game-resources-section {
  margin: 2rem 0;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.game-resources-title {
  font-size: 1.25rem;
  color: #1F2548;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Loading */
.game-resources-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: #6c757d;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top-color: #3B5BA1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Accordion */
.game-resources-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-accordion-panel {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.resource-accordion-panel:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Accordion Header */
.resource-accordion-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.resource-accordion-header:hover {
  background: #f0f2f5;
}

.resource-accordion-panel.is-open .resource-accordion-header {
  background: linear-gradient(135deg, #1F2548 0%, #3B5BA1 100%);
  color: white;
}

.resource-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.resource-accordion-panel.is-open .resource-type-icon {
  background: rgba(255, 255, 255, 0.2) !important;
}

.resource-type-label {
  flex: 1;
  font-weight: 600;
}

.resource-count {
  background: #e0e0e0;
  color: #666;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.resource-accordion-panel.is-open .resource-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.accordion-arrow {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.resource-accordion-panel.is-open .accordion-arrow {
  transform: rotate(180deg);
}

/* Accordion Body */
.resource-accordion-body {
  display: none;
  padding: 0;
  background: white;
}

.resource-accordion-panel.is-open .resource-accordion-body {
  display: block;
}

.resource-items {
  padding: 0.5rem;
}

/* Resource Item */
.resource-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: background 0.2s ease;
}

.resource-item:last-child {
  margin-bottom: 0;
}

.resource-item:hover {
  background: #f0f2f5;
}

.resource-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  width: 2rem;
  flex-shrink: 0;
  color: #6c757d;
}

.resource-item-content {
  flex: 1;
  min-width: 0;
}

.resource-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1F2548;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.resource-item-desc {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.resource-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-tag {
  font-size: 0.75rem;
  color: #999;
  background: #e8e8e8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.resource-item-action {
  flex-shrink: 0;
}

/* Buttons */
.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.download-btn {
  background: #CE466C;
  color: white;
}

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

.video-btn {
  background: #1F2548;
  color: white;
}

.video-btn:hover {
  background: #3B5BA1;
  transform: translateY(-1px);
}

/* Video Modal */
.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.video-modal {
  width: 100%;
  max-width: 900px;
  background: #1F2548;
  border-radius: 12px;
  overflow: hidden;
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #1F2548;
  color: white;
}

.video-modal-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-modal-body {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
}

.video-modal-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Responsive - Tablet and up */
@media (min-width: 768px) {
  .game-resources-section {
    padding: 2rem;
  }
  
  .resource-accordion-header {
    padding: 1rem 1.25rem;
  }
  
  .resource-item {
    padding: 1rem 1.25rem;
  }
  
  .resource-item-title {
    font-size: 1rem;
  }
  
  .resource-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Responsive - Mobile specific */
@media (max-width: 480px) {
  .game-resources-section {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
  }
  
  .game-resources-title {
    font-size: 1.1rem;
  }
  
  .resource-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .resource-item-icon {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
  }
  
  .resource-item {
    position: relative;
    padding-right: 3rem;
  }
  
  .resource-item-action {
    margin-top: 0.75rem;
  }
  
  .resource-btn {
    width: 100%;
  }
  
  .video-modal {
    border-radius: 8px;
  }
  
  .video-modal-header h4 {
    font-size: 0.9rem;
  }
}
