/**
 * Shortcodes module public styles.
 *
 * @since      1.0.0
 * @package    Club_Manager_Pro
 */

/* Team Players Shortcode Styles - Following Material UI/Tailwind principles */

/* Container for all player cards */
.cmp-team-players-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    margin: 2rem auto; /* Changed from 2rem 0 to 2rem auto to allow centering */
    width: var(--cmp-team-players-width, 100%); /* Uses CSS variable with fallback to 100% */
    max-width: 100%; /* Ensures it never exceeds viewport width */
}

.cmp-team-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cmp-team-header-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Badge container */
.cmp-team-badge-container {
    margin-bottom: 1.5rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Team header badge */
.cmp-team-badge {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cmp-team-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
}

/* Team info container */
.cmp-team-info-container {
    width: 100%;
    padding: 0 1rem;
}

.cmp-team-info {
    text-align: center;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .cmp-team-badge {
        width: 100px;
        height: 100px;
    }
    
    .cmp-team-name {
        font-size: 1.5rem;
    }
    
    .cmp-card-subtitle.cmp-team-season {
        font-size: 1rem;
    }
}

.cmp-team-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmp-card-subtitle.cmp-team-season {
    font-size: 1.125rem;
    color: #4b5563;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.cmp-season-label {
    font-weight: 600;
}

.cmp-team-season {
    font-size: 1rem;
    color: #6b7280;
}

/* Grid layout for player cards - responsive 3-column to 1-column */
.cmp-player-cards-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default 1 column for mobile */
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100% - 2rem);
}

/* Tablet - 2 columns */
@media screen and (min-width: 768px) {
    .cmp-player-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 768px;
    }
}

/* Desktop - exactly 3 columns */
@media screen and (min-width: 992px) {
    .cmp-player-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 1140px; /* Increased from 1080px to 1140px (20px more per card * 3 cards) */
        margin-left: auto;
        margin-right: auto;
        gap: 1.5rem;
    }
    
    .cmp-player-card {
        /* Make each card slightly wider on desktop */
        width: calc(100% + 20px);
        margin-left: -10px; /* Center the extra width */
    }
}

/* Player Card */
.cmp-player-card {
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a; /* Dark background from mockup */
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* Ensure all cards have equal height */
    margin-bottom: 1rem;
    position: relative;
    color: #ffffff; /* White text for dark background */
    width: 100%; /* Take full width of grid cell */
    justify-self: center; /* Center the card in its grid cell */
}

.cmp-player-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Player Header */
.cmp-player-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Removed black overlay gradient */
    background: transparent;
    z-index: 2;
    box-sizing: border-box;
    color: #fff;
    text-align: left;
}

/* Stats column on the right */
.cmp-player-stats-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding-top: 0;
    margin-top: -5px;
    box-sizing: border-box;
    color: #fff;
}

/* Player Identity Section - Left aligned */
.cmp-player-identity {
    flex-grow: 1;
    text-align: left;
}

.cmp-player-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
}

.cmp-player-firstname,
.cmp-player-lastname {
    display: block;
    line-height: 1.2;
    text-align: left;
}

.cmp-player-position {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
    text-align: left;
    line-height: 1.1;
}

/* Player Number - Now under position on left side */
.cmp-player-number-left {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    text-align: left;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Main Stats Section */
.cmp-player-main-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0;
    padding-top: 0;
    justify-content: flex-start;
    position: absolute;
    top: 10px; /* Position at the very top with minimal padding */
    right: 10px;
    text-align: right;
}

.cmp-player-main-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 0.25rem;
}

.cmp-player-main-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 0.8;
    margin-bottom: 0;
    text-align: right;
}

.cmp-player-main-stat-label {
    font-size: 0.7rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: right;
}

/* Player Stats */
.cmp-player-stats {
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    background-color: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Player Bottom Stats - in the yellow box area */
.cmp-player-bottom-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.15rem 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    margin-top: auto;
}

.cmp-player-bottom-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cmp-player-bottom-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0;
}

.cmp-player-bottom-stat-label {
    font-size: 0.65rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    opacity: 0.8;
    line-height: 1;
}

.cmp-player-stat {
    display: flex;
    flex-direction: column;
}

.cmp-player-stat-label {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
    color: #ccc;
}

.cmp-player-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* Player O&L Data */
.cmp-player-ol-data {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    justify-content: space-between;
    background-color: #222;
    border-bottom: 1px solid rgba(229, 231, 235, 0.1);
}

.cmp-player-ol-item {
    flex: 1;
    background-color: white;
    color: #1a1a1a;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cmp-player-ol-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #333;
}

.cmp-player-ol-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
    color: #111;
}

/* Player Header with Background Image */
.cmp-player-header-with-bg {
    position: relative;
    width: 100%;
    height: var(--cmp-player-image-height, 300px);
    overflow: hidden;
    background-color: #000;
}

/* Player Image Wrapper */
.cmp-player-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Player Image */
.cmp-player-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain for consistent display */
    object-position: center center; /* Center both horizontally and vertically */
    transition: transform 0.3s ease;
    display: block;
    max-height: 100%;
}

/* Player Sponsor Overlay */
.cmp-player-sponsor-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: transparent;
}

.cmp-player-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #333;
    color: #999;
    font-size: 3rem;
}

.cmp-player-card:hover .cmp-player-image {
    transform: scale(1.05);
}

.cmp-player-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.5rem;
    background-color: #333;
}

/* Sponsor overlay on Player Image */
.cmp-player-sponsor-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    color: white;
    padding: 0.75rem;
    z-index: 2;
    box-sizing: border-box;
    text-align: center;
}

.cmp-sponsor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cmp-sponsor-label {
    font-size: 0.7rem;
    opacity: 0.9;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.075rem;
    font-weight: 500;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.9);
    color: white;
}

.cmp-sponsor-image {
    max-width: 90%;
    height: auto;
    max-height: var(--cmp-sponsor-image-height, 40px);
    object-fit: contain;
    display: block;
    background-color: transparent;
    border-radius: 4px;
    padding: 0.25rem;
}

/* Player Info Section */
.cmp-player-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #222;
}

.cmp-player-position {
    font-size: 0.875rem;
    color: white;
    opacity: 0.8;
    display: block;
}

.cmp-player-info-header {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0.25rem;
    z-index: 10;
    max-width: 70%;
}

/* Next Hero Fixture (next_hero) */
.cmp-next-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0e0e0e;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  color: #fff;
  font-family: 'Oswald', Arial, sans-serif;
  margin: 10px 0 24px;
}
.cmp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: saturate(120%) contrast(105%);
}
.cmp-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(255,255,255,0.08), transparent 50%),
              linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.85));
  pointer-events: none;
}
.cmp-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 28px 22px;
}
@media (min-width: 768px) {
  .cmp-hero-inner { padding: 40px 32px; gap: 24px; }
}
.cmp-hero-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}
.cmp-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}
.cmp-hero-team-badge { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.65)); }
.cmp-hero-badge-ph {
  width: 92px; height: 92px; border-radius: 50%; background: #222; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: #fff;
  border: 2px solid rgba(255,255,255,0.08);
  text-transform: uppercase;
}
.cmp-hero-vs { font-size: 18px; letter-spacing: 1.5px; color: #eee; text-transform: uppercase; opacity: 0.85; }
.cmp-hero-teams { font-size: 28px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.cmp-hero-teams strong { color: var(--cmp-accent); }
.cmp-hero-meta { margin-top: 6px; font-size: 14px; color: #e2e2e2; opacity: 0.9; }
.cmp-hero-cta { margin-top: 14px; }
.cmp-hero-btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--cmp-accent); color: #fff !important; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 8px 20px var(--cmp-accent)40; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cmp-hero-btn:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 10px 26px var(--cmp-accent2)55; text-decoration: none; }

/* Countdown */
.cmp-countdown { display: grid; grid-template-columns: repeat(4, minmax(60px, 1fr)); gap: 10px; margin-top: 12px; }
.cmp-countdown .cmp-cd-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08);
  padding: 12px 8px; border-radius: 10px; text-align: center; min-width: 64px;
}
.cmp-cd-value { font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.55); }
.cmp-cd-label { margin-top: 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #ddd; opacity: 0.9; }

/* Header strip */
.cmp-hero-header { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.cmp-hero-badge-label { display: inline-block; padding: 6px 10px; border-radius: 9999px; background: var(--cmp-accent); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.cmp-hero-link { color: #fff; opacity: 0.85; font-weight: 600; font-size: 12px; text-decoration: underline; }
.cmp-hero-link:hover { opacity: 1; text-decoration: none; }

@media (max-width: 640px) {
  .cmp-hero-inner { grid-template-columns: 1fr; padding: 22px 16px; }
  .cmp-hero-col:first-child { order: 2; }
  .cmp-hero-center { order: 1; }
  .cmp-hero-col:last-child { order: 3; }
  .cmp-hero-team-badge, .cmp-hero-badge-ph { width: 76px; height: 76px; }
  .cmp-hero-teams { font-size: 22px; }
  .cmp-countdown { gap: 8px; }
}

/* Fixtures Shortcode Styles - Following Material UI/Tailwind principles */

/* Container for all fixtures */
.cmp-fixtures-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    margin: 2rem 0;
}

/* Month section */
.cmp-fixtures-month {
    margin-bottom: 2rem;
}

.cmp-fixtures-month-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Grid layout for fixture cards */
.cmp-fixtures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Fixture Card */
.cmp-fixture-card {
    display: flex;
    flex-direction: column;
    background-color: #2a2a2a;
    color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.2s ease;
    border: none;
}

.cmp-fixture-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Fixture Header */
.cmp-fixture-header {
    padding: 0.75rem 1rem;
    background-color: #222222;
    border-bottom: 1px solid #333333;
}

.cmp-fixture-date-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cmp-fixture-date {
    font-weight: 600;
    color: #1f2937;
}

.cmp-fixture-time {
    color: #4b5563;
    font-weight: 500;
}

/* Teams section */
.cmp-fixture-teams-container {
    padding: 0.25rem 1rem;
    background-color: #ffffff;
}

/* Team names row */
.cmp-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cmp-team-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmp-vs-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #4b5563;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

/* Score container and scores */
.cmp-score-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.75rem;
}

.cmp-score {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 2rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    color: #1f2937;
    padding: 0 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cmp-score.home-score {
    margin-right: 0.25rem;
}

.cmp-score.away-score {
    margin-left: 0.25rem;
}

/* Badge row */
.cmp-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0;
}

.cmp-badge-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    max-width: none;
    margin: 0 auto;
    overflow: visible;
    position: relative;
}

/* Fixture-specific team badge - using unique class name to avoid conflicts */
.cmp-fixture-team-badge {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 0; /* Ensure no circular cropping */
}

/* Fixture-specific badge placeholder */
.cmp-fixture-badge-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5e7eb;
    border-radius: 50%;
    font-weight: 700;
    color: #4b5563;
}

/* Fixtures container styles - centered with flex layout */
.cmp-fixtures-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Results-specific container */
.cmp-results-container {
    margin-top: 1.5rem;
}

/* Last 2 results container */
.cmp-last-results-container .cmp-fixture-card {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: 400px;
}

/* For the next_2 shortcode, limit to 2 cards side by side with responsive behavior */
.cmp-fixtures-container .cmp-fixture-card {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: 400px;
}

/* Responsive styles for mobile devices */
@media screen and (max-width: 767px) {
    .cmp-fixtures-container .cmp-fixture-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .cmp-badge-container img.cmp-fixture-team-badge {
        max-width: 60px;
        max-height: 60px;
    }
    
    .cmp-fixture-date-time {
        flex-direction: column;
        align-items: center;
    }
    
    .cmp-fixture-date {
        margin-bottom: 0.25rem;
    }
}

/* Original fixture card styles */
.cmp-fixture-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.cmp-vs-placeholder {
    width: 30px;
}

/* Fixture Details */
.cmp-fixture-details {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cmp-fixture-competition {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.cmp-fixture-actions {
    margin-left: auto;
}

.cmp-buy-tickets-btn {
    display: inline-block;
    background-color: #4f46e5; /* Indigo color from Tailwind */
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cmp-buy-tickets-btn:hover {
    background-color: #4338ca; /* Darker indigo */
    color: #ffffff;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cmp-fixtures-grid {
        grid-template-columns: 1fr;
    }
    
    .cmp-fixture-teams {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cmp-team-badge-container {
        height: 60px;
    }
    
    .cmp-team-badge {
        max-width: 60px;
        max-height: 60px;
    }
    
    .cmp-team-badge-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .cmp-team-name {
        font-size: 0.75rem;
    }
    
    .cmp-fixture-vs span {
        font-size: 0.875rem;
    }
}

.cmp-player-name strong {
    color: #4f46e5; /* Indigo color from Tailwind */
}

/* Sponsor Section - Enhanced for better visibility */
.cmp-player-sponsor {
    margin: 0.5rem 0;
    height: 3.5rem; /* Increased from 2.25rem to 3.5rem for more vertical space */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 0.75rem;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 0.25rem;
    transition: transform 0.2s ease;
}

.cmp-player-card:hover .cmp-player-sponsor {
    transform: scale(1.02);
}

.cmp-sponsor-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

/* Own & Loan Data Section */
.cmp-player-ol-data {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background-color: #ffffff;
    border: none;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
    box-shadow: none;
    margin: 0 0.25rem;
}

.cmp-player-ol-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.25rem;
    transition: background-color 0.2s ease;
}

.cmp-player-ol-item:hover {
    background-color: rgba(243, 244, 246, 0.7);
    border-radius: 0.375rem;
}

.cmp-player-ol-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.cmp-player-ol-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4f46e5; /* Indigo color from Tailwind */
}

/* Player Stats Section */
.cmp-player-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #ffffff;
    border: none;
    margin: 0;
    margin-top: auto; /* Push stats to bottom of card */
}

/* Main Stats - Goals/Assists display */
.cmp-player-main-stats {
    position: absolute;
    top: 3.5rem; /* Positioned below the player number */
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.65);
    border-radius: 0.25rem;
    z-index: 10;
    text-align: right;
}

.cmp-player-main-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 0.9;
}

.cmp-player-main-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Added shadow for readability */
}

.cmp-player-position {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Added shadow for readability */
}

/* Player Main Stat Label */
.cmp-player-main-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.125rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Added shadow for readability */
}

/* Sponsor Section */
.cmp-player-sponsor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;
}

.cmp-sponsor-label {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 1); /* Full white instead of 0.7 opacity */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem; /* Reduced from 0.25rem for less spacing */
    font-weight: 700; /* Increased from 500 to 700 for bolder text */
    display: block;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9); /* Enhanced shadow for better contrast */
}

.cmp-sponsor-image-container {
    background-color: rgba(255, 255, 255, 0.35);
    border-radius: 15px;
    padding: 0.5rem;
    margin: 0.125rem auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 80%;
    margin: 0 auto;
}

.cmp-sponsor-image {
    max-height: 40px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    filter: brightness(1.05);
}

/* Player Number - Top Right */
.cmp-player-number {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.75rem;
    font-weight: bold;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    z-index: 10;
}

/* Player Name & Position Styles */
.cmp-player-name {
    font-size: 1.15rem;
    margin: 0 0 0.25rem 0;
    color: #ffffff;
    line-height: 1.1;
}

.cmp-player-firstname {
    font-weight: bold;
    display: block;
}

.cmp-player-lastname {
    display: block;
    font-weight: normal;
    font-size: 0.95rem;
}

.cmp-player-position {
    display: block;
    font-size: 0.75rem;
    color: #e2e2e2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Stats Grid for Home/Away/Other */
.cmp-player-stats-grid {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    flex-wrap: wrap;
}

.cmp-player-home-away {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cmp-home-stats, 
.cmp-away-stats {
    flex: 0 0 48%;
}

.cmp-stats-label {
    font-size: 0.825rem;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #ffffff;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

.cmp-stat-box {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
    letter-spacing: 0.02em;
}

/* Bottom Stats Row */
.cmp-player-bottom-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    gap: 0.5rem;
}

.cmp-player-bottom-stat {
    text-align: center;
}

.cmp-player-bottom-stat-value {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.125rem;
}

.cmp-player-bottom-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #ffffff;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.cmp-player-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.125rem;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.2s ease;
    border: none;
}

.cmp-player-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #e5e7eb;
    background-color: #f8fafc;
}

.cmp-player-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4f46e5; /* Indigo color from Tailwind */
    line-height: 1;
    margin-bottom: 0.125rem;
}

.cmp-player-stat-label {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.125rem;
    text-align: center;
}

/* Error and Notice Messages */
.cmp-error, .cmp-notice {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.25rem;
}

/* Special styling for Deeside Dragons team */
/* White player names */
.cmp-team-deeside-dragons .cmp-player-name,
.cmp-team-deeside-dragons .cmp-player-firstname,
.cmp-team-deeside-dragons .cmp-player-lastname {
    color: #FFFFFF !important;
}

/* Modern black gradient background for each player card */
.cmp-team-deeside-dragons .cmp-player-card {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
    position: relative;
}

.cmp-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.cmp-notice {
    background-color: #e0f2fe;
    color: #0369a1;
    border-left: 4px solid #38bdf8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cmp-player-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cmp-team-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cmp-team-badge {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .cmp-player-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Flashing text animation for O&L data */
.cmp-flashing-text {
    animation: flash 1.5s infinite;
    color: #ef4444; /* Red color from Tailwind */
    font-weight: 700;
}

@keyframes flash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
