/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

/* Modal Content */
.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Modal Header */
.modal-header {
  padding: 10px 24px;
  display: flex;
  justify-content: flex-end;
}

.header-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
/* Close Button */
.modal-close-button {
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #000000;
  background: transparent;
  border-radius: 50%;
}

.modal-close-button:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.modal-close-button mat-icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teams {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
}

.team {
  font-weight: 800;
}

.vs {
  font-size: 18px;
  opacity: 0.8;
  font-weight: 500;
}

.match-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.9;
}

.separator {
  opacity: 0.6;
}

.close-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Modal Body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
}

/* Report Container Styles */
.report-container {
  flex: 1 !important;
  overflow-y: auto !important;
  width: 100% !important;
  margin: 0 auto !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 16px !important;
  -ms-overflow-style: none !important;
  scrollbar-width: unset !important;
}

/* Report Sections Container */
.report-sections-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
}

/* Report Section */
.report-section {
  overflow: hidden !important;
}

/* override default wordpress and drupal margins on all p tags*/
.report-section p:not(.team-name) {
  margin: 0 !important;
}

/* Report Heading */
.report-heading {
  font-weight: 700 !important;
  font-size: 28px !important;
  color: #000000 !important;
}

/* Report Text */
.report-text {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: #000000 !important;
  white-space: pre-wrap !important;
}

.report-text-with-margin {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: #000000 !important;
  white-space: pre-wrap !important;
  margin-bottom: 16px !important;
}

/* Team Lineups Container */
.team-lineups-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
  margin-top: 1.5rem !important;
}

/* Team Container */
.team-container {
  display: flex !important;
  flex-direction: column !important;
  font-family: 'Poppins', sans-serif !important;
}

/* Team Name */
.team-name {
  font-size: 18px !important;
  color: #000000 !important;
  font-weight: 700 !important;
}

/* Report Tabs */
.report-tabs {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  border-bottom: 1px solid #e5e7eb !important;
  margin-bottom: 20px !important;
}

/* Report Tab */
.report-tab {
  cursor: pointer !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding-bottom: 16px !important;
  border-bottom: 4px solid !important;
  color: #000000 !important;
  background: transparent !important;
  border: none !important;
}

.report-tab:focus {
  outline: none !important;
}

.report-tab:focus-visible {
  outline: none !important;
}

.report-tab.active {
  border-bottom: 4px solid #e31b22 !important;
  color: #000000 !important;
  font-weight: 700 !important;
}

.report-tab:not(.active) {
  border-bottom: transparent !important;
  color: #666666 !important;
  font-weight: 400 !important;
}

/* Report Table */
.report-table {
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  width: 99%;
}

/* Report Table Header */
.report-table-header {
  display: flex !important;
  align-items: center !important;
  background-color: #e31b22 !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 8px 8px 0 0 !important;
}

.report-table-header-with-gap {
  display: flex !important;
  align-items: center !important;
  background-color: #e31b22 !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 8px 8px 0 0 !important;
}

/* Table Header Text */
.table-header-text-25 {
  font-weight: 700 !important;
  font-size: 14px !important;
  width: 25% !important;
  margin: 0 !important;
}

.table-header-text-75 {
  font-weight: 700 !important;
  font-size: 14px !important;
  width: 75% !important;
  margin: 0 !important;
}

.table-header-text-33 {
  font-weight: 700 !important;
  font-size: 14px !important;
  width: 33.33% !important;
  margin: 0 !important;
}

.table-header-text-67 {
  font-weight: 700 !important;
  font-size: 14px !important;
  width: 66.67% !important;
  margin: 0 !important;
}

/* Report Table Row */
.report-table-row {
  display: flex !important;
  align-items: center !important;
  background-color: white !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.report-table-row-with-gap {
  display: flex !important;
  align-items: center !important;
  background-color: white !important;
  padding: 12px 16px !important;
}

.report-table-row-last {
  border-bottom: none !important;
  border-radius: 0 0 8px 8px !important;
}

/* Table Cell Text */
.table-cell-text-25 {
  color: #333333 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  width: 25% !important;
  text-transform: capitalize !important;
  margin: 0 !important;
}

.table-cell-text-75 {
  color: #333333 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  width: 75% !important;
  margin: 0 !important;
}

.table-cell-text-33 {
  color: #333333 !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  width: 33.33% !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.table-cell-text-67 {
  color: #333333 !important;
  font-size: 14px !important;
  width: 66.67% !important;
  text-transform: capitalize !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

/* No Data Message */
.no-data-message {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  color: #666666 !important;
  padding: 12px !important;
}

/* Team Form Table */
.team-form-table {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  margin-top: 2rem !important;
}

.team-form-table p {
    margin: 0 !important;
}

/* Team Form Grid */
.team-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  gap: 3.5rem !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 8px 0 !important;
}

/* Team Form Cell */
.team-form-cell-left {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

.team-form-cell-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: flex-start !important;
}

/* Team Logo */
.team-logo {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover !important;
}

.team-logo-small {
  width: 32px !important;
  height: 32px !important;
  object-fit: cover !important;
}

/* Team Name Large */
.team-name-large {
  font-weight: 700 !important;
  font-size: 18px !important;
}

/* Team Form Row */
.team-form-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 3.5rem !important;
  width: 100% !important;
  padding: 8px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Team Form Cell Content */
.team-form-cell-content-left {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

.team-form-cell-content-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

/* Team Form Text */
.team-form-text-left {
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: right !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.team-form-text-right {
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.team-form-text-center {
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Location Text */
.location-text {
  text-transform: uppercase !important;
  font-size: 10px !important;
}

/* Opponent Text */
.opponent-text {
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

/* Result Badge */
.result-badge {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: white !important;
  background-color: #cccccc !important;
}

.result-badge-text {
  color: white !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

/* Single Team Layout */
.single-team-layout {
  width: 100% !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 8px 0 !important;
}

.single-team-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

.single-team-row {
  width: 100% !important;
  padding: 8px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.single-team-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

/* Head to Head Container */
.head-to-head-container {
  margin-top: 2rem !important;
}

/* Head to Head Grid */
.head-to-head-grid {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(6, 1fr) !important;
  align-items: center !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.head-to-head-grid p {
    margin: 0 !important;
}

/* Head to Head Date */
.head-to-head-date {
  border-right: 1px solid #e5e7eb !important;
  padding-right: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: rgba(0, 0, 0, 0.5) !important;
}

/* Head to Head Team */
.head-to-head-team {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  grid-column: span 2 !important;
}

/* Head to Head Result */
.head-to-head-result {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Head to Head Score */
.head-to-head-score {
  padding: 2px 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 9999px !important;
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 18px !important;
}

/* Head to Head Team Text */
.head-to-head-team-text {
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
}

/* Main Image Container */
.main-image-container {
  display: flex !important;
  justify-content: center !important;
  min-height: 0 !important;
  width: 100% !important;
}

/* Report Image */
.report-image {
  width: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Report Image Grid */
.report-image-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 16px !important;
}

/* Report Image Item */
.report-image-item {
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Report Image Item Image */
.report-image-item img {
  width: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Modal Footer Container */
.modal-footer-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 70% !important;
  margin: 0 auto !important;
  background: linear-gradient(180deg,rgba(255,255,255,0) -16.8%,#FFFFFF 39.84%) !important;
}

/* No Content */
.no-content {
  text-align: center !important;
  padding: 60px 20px !important;
  color: #666 !important;
}

.no-content-icon {
  margin-bottom: 24px !important;
}

.no-content-icon mat-icon {
  font-size: 64px !important;
  width: 64px !important;
  height: 64px !important;
  color: #ccc !important;
}

.no-content h3 {
  font-size: 24px !important;
  font-weight: 600 !important;
  margin: 0 0 12px 0 !important;
  color: #333 !important;
}

.no-content p {
  font-size: 16px !important;
  margin: 0 !important;
  color: #666 !important;
}

/* Report Content */
.report-content {
  max-width: 70%;
  margin: 0 auto;
}

.report-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: #666;
}

.total-sections,
.total-words {
  background: #f8f9fa;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
}

/* Report Sections */
.report-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section {
  overflow: hidden;
}

.section-header {
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #666;
}

.word-count {
  background: #e9ecef;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.section-number {
  background: #e31b22;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.text-content {
  font-size: 16px;
  line-height: 1.7;
  color: #000000;
}

.text-content p:last-child {
  margin-bottom: 0;
}

.main-image-container {
  display: flex;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.main-image {
  width: 100%;
  max-width: 100%;
  object-fit: contain;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.media-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media-image {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Modal Footer */
.modal-footer {
  background: linear-gradient(180deg,rgba(255,255,255,0) -16.8%,#FFFFFF 0%);
  padding: 12px 48px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

.btn-secondary,
.btn-primary {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.btn-secondary {
  background: white;
  border: 1px solid #e31b22;
  color: #e31b22;
}

.btn-secondary:hover {
  border: 1px solid #7a0002;
  color: #7a0002;
}

.btn-primary {
  background: #e31b22;
  color: white;
}

.btn-primary:hover {
  background: #7a0002;
  color: white;
}

/* Head-to-head Results Styles */
.head-to-head-results {
  margin-top: 1rem;
  overflow: hidden;
}

.head-to-head-results .grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 2fr;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.head-to-head-results .grid-cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.head-to-head-results .col-span-2 {
  grid-column: span 2;
}

.head-to-head-results .grid:last-child {
  border-bottom: none;
}

.head-to-head-results .last\:border-0:last-child {
  border-bottom: none;
}

.head-to-head-results .border-r {
  border-right: 1px solid #e5e7eb;
  padding-right: 0.5rem;
}

.head-to-head-results .text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.head-to-head-results .font-medium {
  font-weight: 500;
}

.head-to-head-results .text-black\/50 {
  color: rgba(0, 0, 0, 0.5);
}

.head-to-head-results .flex {
  display: flex;
}

.head-to-head-results .items-center {
  align-items: center;
}

.head-to-head-results .justify-center {
  justify-content: center;
}

.head-to-head-results .space-x-4 > * + * {
  margin-left: 1rem;
}

.head-to-head-results .font-bold {
  font-weight: 700;
}

.head-to-head-results .uppercase {
  text-transform: uppercase;
}

.head-to-head-results .w-10 {
  width: 2.5rem;
}

.head-to-head-results .h-10 {
  height: 2.5rem;
}

.head-to-head-results .object-cover {
  object-fit: cover;
}

.head-to-head-results .px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.head-to-head-results .py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.head-to-head-results .border {
  border-width: 1px;
}

.head-to-head-results .border-separator {
  border-color: #e5e7eb;
}

.head-to-head-results .rounded-full {
  border-radius: 9999px;
}

.head-to-head-results .text-black {
  color: #000000;
}

.head-to-head-results .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* Team Lineups Section Styles */
.team-lineups-section {
  margin-top: 1rem;
}

.teams-lineups-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

/* Tab Content Visibility for API Export */
[data-tab-content] {
  display: block !important;
  margin-bottom: 20px !important;
}

[data-tab-content]:not(:last-child) {
  padding-bottom: 20px !important;
}

/* Team Form Section Styles */
.team-form-section {
  margin-top: 1rem;
}

.team-form-section .border-separator {
  border-color: #e5e7eb;
}

.team-form-section .grid {
  display: grid;
}

.team-form-section .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-form-section .gap-14 {
  gap: 3.5rem;
}

.team-form-section .space-x-3 > * + * {
  margin-left: 0.75rem;
}

.team-form-section .text-ellipsis {
  text-overflow: ellipsis;
}

.team-form-section .overflow-hidden {
  overflow: hidden;
}

.team-form-section .whitespace-nowrap {
  white-space: nowrap;
}

.team-form-section .text-\[10px\] {
  font-size: 0.625rem;
  line-height: 0.75rem;
}

.team-form-section .text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.team-form-section .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.team-form-section .font-bold {
  font-weight: 700;
}

.team-form-section .font-medium {
  font-weight: 500;
}

.team-form-section .font-semibold {
  font-weight: 600;
}

.team-form-section .text-black {
  color: #000000;
}

.team-form-section .text-white {
  color: #ffffff;
}

.team-form-section .uppercase {
  text-transform: uppercase;
}

.team-form-section .w-8 {
  width: 2rem;
}

.team-form-section .h-8 {
  height: 2rem;
}

.team-form-section .w-10 {
  width: 2.5rem;
}

.team-form-section .h-10 {
  height: 2.5rem;
}

.team-form-section .object-cover {
  object-fit: cover;
}

.team-form-section .rounded-full {
  border-radius: 9999px;
}

.team-form-section .bg-\[\#13cf70\] {
  background-color: #13cf70;
}

.team-form-section .bg-\[\#d81920\] {
  background-color: #d81920;
}

.team-form-section .bg-\[\#cccccc\] {
  background-color: #cccccc;
}

.team-form-section .text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.team-form-section .p-2 {
  padding: 0.5rem;
}

.team-form-section .py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.team-form-section .border-b {
  border-bottom-width: 1px;
}

.team-form-section .last\:border-0:last-child {
  border-bottom-width: 0;
}

.team-form-section .rounded-lg {
  border-radius: 0.5rem;
}

.team-form-section .mt-2 {
  margin-top: 0.5rem;
}

.team-form-section .flex {
  display: flex;
}

.team-form-section .flex-col {
  flex-direction: column;
}

.team-form-section .items-center {
  align-items: center;
}

.team-form-section .justify-center {
  justify-content: center;
}

.team-form-section .justify-end {
  justify-content: flex-end;
}

.team-form-section .justify-start {
  justify-content: flex-start;
}

.team-form-section .text-right {
  text-align: right;
}

.team-form-section .text-left {
  text-align: left;
}

/* Result Badge Styles */
.result-badge {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background-color: #cccccc;
}

.result-win {
  background-color: #13cf70 !important;
}

.result-loss {
  background-color: #d81920 !important;
}

.result-draw {
  background-color: #cccccc !important;
}

/* Responsive adjustments for head-to-head grid */
@media (max-width: 768px) {
  .head-to-head-results .grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  
  .head-to-head-results .border-r {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-right: 0;
    padding-bottom: 0.5rem;
  }
  
  .head-to-head-results .col-span-2 {
    grid-column: span 1;
  }
  
  .teams-lineups-container {
    gap: 1.5rem;
  }
  
  .team-form-section .gap-14 {
    gap: 1rem;
  }
  
  .team-form-section .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .team-form-section .text-lg {
    font-size: 1rem;
  }
  
  .team-form-section .w-10 {
    width: 2rem;
  }
  
  .team-form-section .h-10 {
    height: 2rem;
  }
}