/* Test Result Cards - Apple-like Design */
/* Following the same design principles as badges.scss */

:root {
  --card-radius: 16px;
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.test-result-card {
  width: 100%;
  height: 240px;
  border-radius: var(--card-radius);
  overflow: hidden;
  font-family: var(--font-family);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  position: relative;
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

/* Subtle inner border for premium feel */
.test-result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}

/* Hover effect */
.test-result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

/* Winner styling */
.test-result-card.winner {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
}

.test-result-card.winner .card-header,
.test-result-card.winner .test-details,
.test-result-card.winner .results-section {
  color: #333;
}

.test-result-card.winner .year-badge {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.test-result-card.winner .trophy-icon {
  color: #ff6b35;
}

/* Header section */
.test-result-card .card-header {
  flex: 2 1 0;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.org-logo {
  max-width: 100px;
  max-height: 32px;
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.org-name-fallback {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.year-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

/* Test details strip */
.test-result-card .test-details {
  flex: 1 1 0;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.test-details .dimension {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.test-details .participants {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Results section */
.test-result-card .results-section {
  flex: 3 1 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.15) 100%);
}

.position-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.trophy-icon {
  font-size: 1.2rem;
  color: #ffd700;
  margin-bottom: 4px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.position-number {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.position-number sup {
  font-size: 0.5em;
  font-weight: 600;
}

.position-number .ordinal-text-suffix {
  font-size: 0.45em;
  font-weight: 500;
  text-transform: lowercase;
  position: relative;
  top: -0.1em;
}

.rating-display {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  letter-spacing: 0.02em;
  opacity: 0.95;
  line-height: 1.2;
  max-width: 100%;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.special-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.special-badge i {
  margin-right: 4px;
  font-size: 0.7rem;
}

/* Organization-specific colors (matching badges.scss brands) */
.test-result-card[data-organization="autobild"] {
  background: linear-gradient(135deg, #d71920 0%, #b91419 100%);
}

.test-result-card[data-organization="adac"] {
  background: linear-gradient(135deg, #ffd400 0%, #e6bf00 100%);
}

.test-result-card[data-organization="adac"] .card-header,
.test-result-card[data-organization="adac"] .test-details,
.test-result-card[data-organization="adac"] .results-section {
  color: #333;
}

.test-result-card[data-organization="adac"] .year-badge {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.test-result-card[data-organization="automotorsport"] {
  background: linear-gradient(135deg, #e30613 0%, #c8050f 100%);
}

.test-result-card[data-organization="autozeitung"] {
  background: linear-gradient(135deg, #e60012 0%, #cc000f 100%);
}

.test-result-card[data-organization="tyrereviews"] {
  background: linear-gradient(135deg, #212529 0%, #1a1d20 100%);
}

.test-result-card[data-organization="tyrereviews"] .card-header,
.test-result-card[data-organization="tyrereviews"] .test-details,
.test-result-card[data-organization="tyrereviews"] .results-section {
  color: #fff;
}

.test-result-card[data-organization="tyrereviews"] .year-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.test-result-card[data-organization="ace"] {
  background: linear-gradient(135deg, #c8c300 0%, #b3af00 100%);
}

.test-result-card[data-organization="ace"] .card-header,
.test-result-card[data-organization="ace"] .test-details,
.test-result-card[data-organization="ace"] .results-section {
  color: #333;
}

.test-result-card[data-organization="ace"] .year-badge {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.test-result-card[data-organization="autoklubcr"] {
  background: linear-gradient(135deg, #c00000 0%, #a60000 100%);
}

.test-result-card[data-organization="sportauto"] {
  background: linear-gradient(135deg, #e41f26 0%, #c91b21 100%);
}

.test-result-card[data-organization="autoexpress"] {
  background: linear-gradient(135deg, #cc0000 0%, #b30000 100%);
}

.test-result-card[data-organization="gtu"] {
  background: linear-gradient(135deg, #c93644 0%, #b12f3c 100%);
}

.test-result-card[data-organization="sportscars"] {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.test-result-card[data-organization="gute-fahrt"] {
  background: linear-gradient(135deg, #ff0000 0%, #e60000 100%);
}

.test-result-card[data-organization="offroad"] {
  background: linear-gradient(135deg, #a00000 0%, #8a0000 100%);
}

.test-result-card[data-organization="vibilagare"] {
  background: linear-gradient(135deg, #af1d1e 0%, #9a1a1b 100%);
}

.test-result-card[data-organization="promobil"] {
  background: linear-gradient(135deg, #00529b 0%, #004785 100%);
}

.test-result-card[data-organization="promobil"] .card-header,
.test-result-card[data-organization="promobil"] .test-details,
.test-result-card[data-organization="promobil"] .results-section {
  color: #fff;
}

.test-result-card[data-organization="promobil"] .year-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.test-result-card[data-organization="firmenauto"] {
  background: linear-gradient(135deg, #ff6600 0%, #e65a00 100%);
}

.test-result-card[data-organization="driveout"] {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.test-result-card[data-organization="reifentester"] {
  background: linear-gradient(135deg, #f0f0f0 0%, #d9d9d9 100%);
}

.test-result-card[data-organization="reifentester"] .card-header,
.test-result-card[data-organization="reifentester"] .test-details,
.test-result-card[data-organization="reifentester"] .results-section {
  color: #333;
}

.test-result-card[data-organization="reifentester"] .year-badge {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.test-result-card[data-organization="hasznaltauto"] {
  background: linear-gradient(135deg, #ff6400 0%, #e65a00 100%);
}

.test-result-card[data-organization="aftonbladet"] {
  background: linear-gradient(135deg, #ffdf00 0%, #e6c900 100%);
}

.test-result-card[data-organization="aftonbladet"] .card-header,
.test-result-card[data-organization="aftonbladet"] .test-details,
.test-result-card[data-organization="aftonbladet"] .results-section {
  color: #333;
}

.test-result-card[data-organization="aftonbladet"] .year-badge {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.test-result-card[data-organization="teknikens"] {
  background: linear-gradient(135deg, #e4002b 0%, #cc0026 100%);
}

.test-result-card[data-organization="teknikens"] .card-header,
.test-result-card[data-organization="teknikens"] .test-details,
.test-result-card[data-organization="teknikens"] .results-section {
  color: #fff;
}

.test-result-card[data-organization="teknikens"] .year-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.test-result-card[data-organization="arbo"] {
  background: linear-gradient(135deg, #b40000 0%, #9e0000 100%);
}

.test-result-card[data-organization="strassenverkehr"] {
  background: linear-gradient(135deg, #ff0000 0%, #e60000 100%);
}

.test-result-card[data-organization="evo"] {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.test-result-card[data-organization="motor"] {
  background: linear-gradient(135deg, #003366 0%, #002952 100%);
}

.test-result-card[data-organization="alvolante"] {
  background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
}

.test-result-card[data-organization="tuv"] {
  background: linear-gradient(135deg, #0050a0 0%, #004590 100%);
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .test-result-card {
    height: 220px;
  }
  
  .test-result-card .card-header {
    padding: 12px;
  }
  
  .org-logo {
    max-width: 80px;
    max-height: 28px;
  }
  
  .position-number {
    font-size: 1.6rem;
  }
  
  .test-result-card .results-section {
    padding: 12px;
  }
} 