/* Shared Scorecard Styles */

/* Team display styles */
.team-info {
  margin-bottom: 10px;
}

.flag-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flag-avatar {
  display: flex;
  align-items: center;
}

.flag-avatar figure {
  margin: 0;
}

.team-name {
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* Scorecard table layout styles */
.scorecard-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.scorecard-header {
  font-weight: bold;
  background-color: #f8f9fa;
}

.extras {
  font-style: italic;
}

.total {
  font-weight: bold;
}

.mobile-hide {
  display: none;
}

@media (min-width: 768px) {
  .mobile-hide {
    display: block;
  }
}

/* Accordion styles */
.card-header {
  background-color: #000;
  border-bottom: 1px solid #000;
  padding: 1rem;
}

.card-header .btn-link {
  text-decoration: none;
  color: #fff;
  width: 100%;
  text-align: left;
  padding: 0;
}

.card-header .btn-link:hover,
.card-header .btn-link:focus {
  text-decoration: none;
  color: #fff;
  opacity: 0.8;
}

.card-header .btn-link:not(.collapsed) {
  color: #fff;
}

.collapse {
  transition: all 0.3s ease;
}

.collapse.show {
  border-bottom: 1px solid #000;
}

.card {
  border: 1px solid #000;
  margin-bottom: 1rem;
}

.card-body {
  background-color: var(--bg-color);
}

/* Scorecard header styles */
.score-card-header {
  margin-bottom: 15px;
}

.score-card-body {
  display: flex;
  flex-direction: column;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .score-card-body {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Scorecard Theme Variables */
:root {
  --primary-color: #2255A4;
  --secondary-color: #D6B268;
  --accent-color: #D6B268;
  --bg-color: #ffffff;
  --text-color: #3e6b98;
  --font-family: 'Inter', Arial, sans-serif;
}

/* Primary elements */
.app-primary, 
.btn-primary, 
.nav-tabs .nav-link.active,
.bg-primary,
.card-header.app-primary {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
}

/* Secondary/Accent elements */
.btn-success, 
.cricnotch-btn.btn-filled,
.bg-success,
.vs-circle {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: #fff !important;
}

/* Background elements */
body, .main-container {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
}

/* Text elements */
body, 
.event-details, 
.card, 
.tab-content,
h1, h2, h3, h4, h5, h6,
p, span, div,
.table td, .table th,
.list-group-item {
  font-family: var(--font-family);
  color: #000;
}

/* Links and interactive elements */
a {
  color: #0066cc !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #004c99 !important;
  text-decoration: underline;
}

/* Borders and dividers */
.card,
.table,
.list-group-item,
.nav-tabs .nav-link {
  border-color: var(--primary-color) !important;
}

/* Form elements */
.form-control,
.custom-select {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  border-color: var(--primary-color) !important;
}

.form-control:focus,
.custom-select:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25) !important;
}

/* Navigation elements */
.nav-tabs .nav-link {
  color: var(--text-color) !important;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Table styling */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(37, 99, 235, 0.05) !important;
}

.table th {
  background-color: var(--accent-color) !important;
  color: #fff !important;
}

.table td {
  color: #000 !important;
}

/* Button variants */
.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Highlighted rows */
.row-highlighted {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Custom cricket-specific elements */
.cricnotch-btn.btn-filled {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  transition: all 0.2s ease;
}

.cricnotch-btn.btn-filled.active,
.cricnotch-btn.btn-filled:hover {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Filter and search elements */
.filters .form-control,
.filters .custom-select {
  border-color: var(--accent-color) !important;
}

/* Card shadows and effects */
.card-shadow {
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1) !important;
  transition: box-shadow 0.2s ease;
}

.card-shadow:hover {
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15) !important;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive text sizing */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1, h2, h3 {
    font-size: 1.2em;
  }
  
  .table {
    font-size: 0.9em;
  }
  .widget-table,
  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .widget-table th,
  .widget-table td,
  .table th,
  .table td {
    width: auto !important;
    min-width: 40px;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .widget-table th:first-child,
  .widget-table td:first-child,
  .table th:first-child,
  .table td:first-child {
    min-width: 160px !important;
    width: 50vw !important;
    max-width: 70vw !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .widget-table th,
  .table th {
    min-width: 80px;
  }
  .scorecard-summary-mobile {
    background: #f8faff;
    font-size: 1.1em;
    margin-bottom: 1em;
    border-radius: 6px;
  }
  .scorecard-summary-mobile div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }
  .scorecard-summary-mobile strong {
    min-width: 60px;
  }
}

@media (max-width: 767px) {
  /* Reduce left padding/margin for batsman names in the batting table */
  .batting-scorecard .table td:first-child, .batting-scorecard .widget-table td:first-child {
    padding-left: 0.4rem !important;
    margin-left: 0 !important;
  }
  .batting-scorecard .batsman-name, .batting-scorecard .player-name {
    margin-left: 0 !important;
    padding-left: 0.1rem !important;
  }
}

/* Print styles */
@media print {
  body {
    background: #fff;
  }
  
  .no-print {
    display: none !important;
  }
  
  .card {
    border: none !important;
    box-shadow: none !important;
  }
  
  .table {
    border-collapse: collapse !important;
  }
  
  .table td,
  .table th {
    border: 1px solid #ddd !important;
  }
} 