/**
 * PrepSports Central API Plugin Styles
 */

/* Base styles */
.psc-wrapper {
    margin: 20px 0;
}

/* Grid layouts */
.psc-grid-1 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 20px; 
}

.psc-grid-2 { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
}

.psc-grid-3 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}

.psc-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}

/* Responsive grids */
@media (max-width: 768px) {
    .psc-grid-2, .psc-grid-3, .psc-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .psc-grid-3, .psc-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Filters */
.psc-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.psc-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.psc-filter-select,
.psc-filter-date,
.psc-search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.psc-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.psc-search-input {
    flex: 1;
}

.psc-search-btn {
    padding: 8px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.psc-search-btn:hover {
    background: #005a87;
}

/* Cards */
.psc-school-card,
.psc-team-card,
.psc-player-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.psc-school-card:hover,
.psc-team-card:hover,
.psc-player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* School styles */
.psc-school-header {
    margin-bottom: 15px;
}

.psc-school-name {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 20px;
}

.psc-school-mascot {
    color: #666;
    font-style: italic;
}

.psc-school-details {
    margin-bottom: 15px;
}

.psc-school-location,
.psc-school-class,
.psc-school-enrollment {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.psc-label {
    font-weight: bold;
    margin-right: 5px;
}

/* Team styles */
.psc-team-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.psc-team-name {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.psc-team-sport {
    display: inline-block;
    padding: 3px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
}

.psc-team-details {
    margin-bottom: 15px;
    font-size: 14px;
}

.psc-team-info,
.psc-team-gender,
.psc-team-coach,
.psc-team-conference {
    margin-bottom: 5px;
}

/* Game styles */
.psc-games-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.psc-date-header {
    background: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 2px solid #e0e0e0;
}

.psc-date-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.psc-game-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.psc-game-item:hover {
    background: #f9f9f9;
}

.psc-game-time {
    flex: 0 0 80px;
    font-weight: bold;
    color: #666;
}

.psc-game-teams {
    flex: 1;
    padding: 0 20px;
}

.psc-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.psc-team-name {
    font-weight: 500;
}

.psc-team-score {
    font-size: 18px;
    font-weight: bold;
    color: #666;
}

.psc-team-score.psc-winner {
    color: #4caf50;
}

.psc-game-at {
    text-align: center;
    color: #999;
    font-size: 12px;
}

.psc-game-info {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.psc-game-sport {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
}

.psc-game-venue {
    font-size: 13px;
    color: #666;
}

.psc-game-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.psc-status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.psc-status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.psc-status-completed {
    background: #d4edda;
    color: #155724;
}

.psc-status-postponed,
.psc-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.psc-game-actions {
    flex: 0 0 120px;
    text-align: right;
}

/* Roster styles */
.psc-roster-header {
    margin-bottom: 30px;
    text-align: center;
}

.psc-roster-title {
    margin: 0 0 10px 0;
    color: #333;
}

.psc-roster-meta {
    color: #666;
}

.psc-roster-meta span {
    margin: 0 10px;
}

/* Roster table */
.psc-roster-table-wrapper {
    overflow-x: auto;
}

.psc-roster-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.psc-roster-table th,
.psc-roster-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.psc-roster-table th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.psc-roster-table tr:hover {
    background: #f9f9f9;
}

.psc-roster-table tr.psc-injured {
    opacity: 0.7;
}

.psc-jersey {
    font-weight: bold;
    color: #0073aa;
}

.psc-player-name {
    font-weight: 500;
}

.psc-injury-indicator {
    margin-left: 5px;
    cursor: help;
}

/* Roster grid */
.psc-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.psc-player-card {
    text-align: center;
}

.psc-player-photo img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.psc-player-jersey-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.psc-player-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.psc-player-position {
    color: #666;
    font-weight: 500;
    margin-bottom: 10px;
}

.psc-player-details {
    font-size: 14px;
    color: #666;
}

.psc-player-details span {
    display: block;
    margin-bottom: 3px;
}

.psc-injury-status {
    margin-top: 10px;
}

.psc-injury-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #f44336;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
}

.psc-injury-desc {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Game details */
.psc-game-header {
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 30px;
}

.psc-game-date-time {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.psc-game-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.psc-team {
    text-align: center;
}

.psc-team h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.psc-team .psc-team-score {
    font-size: 36px;
    font-weight: bold;
}

.psc-vs {
    font-size: 20px;
    color: #999;
}

.psc-game-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.psc-game-result {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 20px;
}

/* Stats section */
.psc-game-stats {
    margin-top: 40px;
}

.psc-section-title {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.psc-team-stats {
    margin-bottom: 30px;
}

.psc-team-stats-header {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.psc-stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.psc-stats-table th,
.psc-stats-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.psc-stats-table th {
    background: #f5f5f5;
    font-weight: bold;
    font-size: 13px;
}

/* Buttons */
.psc-btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.psc-btn-primary {
    background: #0073aa;
    color: white;
}

.psc-btn-primary:hover {
    background: #005a87;
    color: white;
}

.psc-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.psc-btn-secondary:hover {
    background: #d0d0d0;
    color: #333;
}

.psc-btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

/* Load more */
.psc-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.psc-load-more-btn {
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.psc-load-more-btn:hover {
    background: #005a87;
}

.psc-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Utilities */
.psc-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.psc-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.psc-photo-indicator {
    display: inline-block;
    padding: 5px;
    color: #4caf50;
}

/* Loading states */
.psc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.psc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: psc-spin 1s linear infinite;
}

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