/**
 * Frontend Styles for Glory Deck Builder Shortcodes
 */

/* Access Denied Message */
.tcg-access-denied {
  padding: 20px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  margin: 20px 0;
}

.tcg-access-denied p {
  margin: 0;
  color: #856404;
}

/* Error Messages */
.tcg-error {
  padding: 15px;
  background: #f8d7da;
  border-left: 4px solid #dc3545;
  border-radius: 4px;
  color: #721c24;
  margin: 20px 0;
}

/* Single Card */
.tcg-card {
  max-width: 600px;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.tcg-card-inner {
  display: flex;
  flex-direction: column;
}

.tcg-card-image {
  width: 100%;
  background: #f5f5f5;
}

.tcg-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tcg-card-content {
  padding: 20px;
}

.tcg-card-title {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.tcg-card-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.tcg-card-collection,
.tcg-card-type {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
}

.tcg-card-type {
  background: #e3f2fd;
  color: #1976d2;
}

.tcg-card-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tcg-card-field {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.tcg-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tcg-field-value {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* Collection Grid */
.tcg-collection {
  margin: 30px 0;
}

.tcg-collection-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #333;
}

.tcg-no-entries {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.tcg-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tcg-collection-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
}

.tcg-collection-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tcg-item-image {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f5f5f5;
  overflow: hidden;
}

.tcg-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcg-item-info {
  padding: 12px;
}

.tcg-item-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.tcg-item-type {
  display: inline-block;
  padding: 3px 8px;
  background: #e3f2fd;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #1976d2;
}

/* Version Info */
.tcg-version-info {
  padding: 25px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tcg-version-title {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.tcg-version-description {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.tcg-version-description p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

.tcg-version-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tcg-stat {
  display: flex;
  flex-direction: column;
}

.tcg-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tcg-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.tcg-version-collections h4 {
  margin: 20px 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.tcg-version-collections ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tcg-version-collections li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.tcg-version-collections li:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .tcg-collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .tcg-card {
    margin: 10px;
  }

  .tcg-version-stats {
    gap: 15px;
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

/* Hero pages: no scroll, fixed full-screen background */
body:has(.tcg-hero) {
  overflow: hidden;
}

.tcg-hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a2e;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Header on top of hero */
body:has(.tcg-hero) .wp-site-blocks > header {
  position: relative;
  z-index: 10;
}

.tcg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.2) 20%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

.tcg-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.tcg-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem 0;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tcg-hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem 0;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tcg-hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tcg-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  will-change: transform;
  backface-visibility: hidden;
}

.tcg-hero-btn-primary {
  background: #b40c0c;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tcg-hero-btn-arrow {
  width: 1em;
  height: 1em;
  margin-left: 0.5rem;
  vertical-align: -0.1em;
}

.tcg-hero-btn-primary:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  color: #ffffff;
  text-decoration: none;
}

.tcg-hero-btn-primary:visited {
  color: #ffffff;
}

.tcg-hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.tcg-hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  color: #ffffff;
  text-decoration: none;
}

/* Hero responsive */
@media (max-width: 768px) {
  .tcg-hero-content {
    padding: 1.5rem;
  }

  .tcg-hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .tcg-hero-btn {
    width: 100%;
    max-width: 280px;
  }
}
