/* Gymnastics Meet Results Plugin Styles */

.gmr-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Loading Spinner */
.gmr-loading {
  text-align: center;
  padding: 60px 20px;
}

.gmr-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: gmr-spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Error Message */
.gmr-error {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  color: #c33;
}

/* Divisions List */
.gmr-divisions-list h2 {
  margin-bottom: 20px;
  color: #333;
}

.gmr-divisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.gmr-division-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 25px 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.gmr-division-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gmr-division-name {
  display: block;
}

/* Division Results */
.gmr-division-results {
  animation: gmr-fade-in 0.3s ease-in;
}

@keyframes gmr-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gmr-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.gmr-header h2 {
  margin: 15px 0 10px;
  color: #333;
}

.gmr-back-button {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.gmr-back-button:hover {
  background: #7f8c8d;
}

.gmr-stats {
  color: #666;
  font-size: 14px;
  margin-top: 5px;
}

/* Age Group Tabs */
.gmr-age-group-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gmr-tab {
  background: #ecf0f1;
  border: 2px solid transparent;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.gmr-tab:hover {
  background: #d5dbdb;
}

.gmr-tab.active {
  background: #3498db;
  color: white;
  border-color: #2980b9;
}

.gmr-tab-count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 5px;
}

/* Results Table */
.gmr-results-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.gmr-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.gmr-results-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.gmr-results-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.gmr-subheader th {
  font-size: 11px;
  padding: 6px 8px;
  font-weight: 500;
  opacity: 0.9;
}

.gmr-results-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.gmr-results-table tbody tr:hover {
  background: #f8f9fa;
}

.gmr-results-table td {
  padding: 12px 8px;
}

.gmr-rank {
  font-weight: 700;
  color: #3498db;
  text-align: center;
  font-size: 16px;
}

.gmr-name {
  font-weight: 600;
  color: #2c3e50;
}

.gmr-score {
  text-align: center;
  font-weight: 600;
}

.gmr-d-score {
  font-size: 11px;
  color: #7f8c8d;
  font-weight: 400;
}

.gmr-event-rank {
  text-align: center;
  color: #95a5a6;
  font-size: 13px;
}

.gmr-aa-score {
  font-weight: 700;
  color: #27ae60;
  text-align: center;
  font-size: 15px;
}

.gmr-event-col {
  background: rgba(255,255,255,0.05);
}

.gmr-aa-col {
  background: rgba(255,255,255,0.1);
}

/* No results */
.gmr-no-results {
  text-align: center;
  padding: 40px 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .gmr-container {
    padding: 10px;
  }

  .gmr-divisions-grid {
    grid-template-columns: 1fr;
  }

  .gmr-results-table {
    font-size: 12px;
  }

  .gmr-results-table th,
  .gmr-results-table td {
    padding: 8px 4px;
  }

  .gmr-age-group-tabs {
    flex-direction: column;
  }

  .gmr-tab {
    width: 100%;
  }
}
