/* Floating Button Styles */
.score-floating-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #153749;
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  user-select: none;
}

.score-floating-btn:hover {
  background: #0e2a38;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.score-floating-btn svg {
  width: 20px;
  height: 20px;
}

/* Modal Styles */
.score-popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.score-popup-modal.active {
  opacity: 1;
  visibility: visible;
}

.score-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.score-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.score-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #153749;
  color: white;
  border-radius: 8px 8px 0 0;
}

.score-popup-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.score-popup-close {
  background: none;
  border: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.score-popup-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.score-popup-body {
  padding: 20px;
}

/* Score Table Styles */
.score-table-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  font-size: 16px;
}

.score-table-header {
  display: contents;
}

.score-header-cell {
  background-color: #153749;
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.score-header-cell:last-child {
  border-right: none;
}

.team-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.team-flag img {
  width: 24px;
  height: auto;
}

.score-table-row {
  display: contents;
}

.format-label {
  background-color: #f8f9fa;
  padding: 15px;
  line-height: 1.2em;
  font-weight: bold;
  color: #153749;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.format-subtitle {
  font-size: 12px;
  font-weight: normal;
  color: #666;
  margin-top: 2px;
}

.score-cell {
  padding: 15px;
  text-align: center;
  background-color: #fff;
  color: #333;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-cell:last-child {
  border-right: none;
}

/* Total row styling */
.total-row .format-label {
  background-color: #e9ecef;
  font-weight: bold;
}

.total-row .score-cell {
  background-color: #f1f3f4;
  font-weight: bold;
  font-size: 20px;
}

/* Team-specific colors for score cells - removed colored borders */
.irish-score {
  /* border-left: 4px solid #089247; */
}

.world-score {
  /* border-left: 4px solid #153749; */
}

.italian-score {
  /* border-left: 4px solid #cf2b37; */
}

/* Body class to prevent scrolling when popup is open */
body.popup-open {
  overflow: hidden;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .score-floating-btn {
    bottom: 15px;
    left: 15px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .score-floating-btn svg {
    width: 18px;
    height: 18px;
  }

  .score-popup-content {
    width: 95%;
    max-height: 95vh;
  }

  .score-popup-header {
    padding: 15px;
  }

  .score-popup-header h3 {
    font-size: 20px;
  }

  .score-popup-body {
    padding: 15px;
  }

  .score-table-container {
    font-size: 14px;
  }

  .score-header-cell,
  .format-label,
  .score-cell {
    padding: 12px 8px;
  }

  .team-flag {
    flex-direction: column;
    gap: 4px;
  }

  .team-flag span {
    font-size: 12px;
  }

  .team-flag img {
    width: 20px;
  }

  .score-cell {
    font-size: 16px;
  }

  .total-row .score-cell {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .score-floating-btn span {
    display: none;
  }

  .score-floating-btn {
    padding: 15px;
    border-radius: 50%;
  }

  .score-table-container {
    font-size: 12px;
  }

  .score-header-cell,
  .format-label,
  .score-cell {
    padding: 10px 4px;
  }

  .format-label {
    font-size: 11px;
  }

  .team-flag span {
    font-size: 10px;
  }

  .score-cell {
    font-size: 14px;
  }

  .total-row .score-cell {
    font-size: 16px;
  }
}
