/* Penn Social Sports League Manager - Public Styles */

/* Base styles compatible with Avada theme */
.pssl-wrapper,
.pssl-schedule-wrapper,
.pssl-standings-wrapper,
.pssl-results-wrapper,
.pssl-registration-wrapper,
.pssl-my-teams-wrapper,
.pssl-league-list-wrapper {
    margin: 2rem 0;
    font-family: inherit;
}

/* Tables */
.pssl-schedule-table,
.pssl-standings-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.pssl-schedule-table thead,
.pssl-standings-table thead {
    background: #2c3e50;
    color: #fff;
}

.pssl-schedule-table th,
.pssl-schedule-table td,
.pssl-standings-table th,
.pssl-standings-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.pssl-schedule-table tbody tr:hover,
.pssl-standings-table tbody tr:hover {
    background: #f5f5f5;
}

.pssl-schedule-table tbody tr:nth-child(even),
.pssl-standings-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Team Filter */
.pssl-schedule-filters {
    margin-bottom: 1.5rem;
}

.pssl-team-filter {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    min-width: 200px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.pssl-team-filter:focus {
    outline: none;
    border-color: #3498db;
}

/* Status badges */
.pssl-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pssl-status-scheduled {
    background: #e0e0e0;
    color: #666;
}

.pssl-status-in_progress {
    background: #f39c12;
    color: #fff;
}

.pssl-status-completed {
    background: #27ae60;
    color: #fff;
}

.pssl-status-postponed {
    background: #e74c3c;
    color: #fff;
}

.pssl-status-cancelled {
    background: #95a5a6;
    color: #fff;
}

/* Playoff badge */
.pssl-playoff-match {
    background: #fff3cd !important;
}

.pssl-playoff-badge,
.pssl-week-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.pssl-playoff-badge {
    background: #ffc107;
    color: #000;
}

.pssl-week-badge {
    background: #6c757d;
    color: #fff;
}

/* Standings specific */
.pssl-standings-table .pssl-rank {
    font-weight: bold;
    text-align: center;
}

.pssl-standings-table .pssl-team-name {
    font-weight: 600;
}

.pssl-playoff-seed {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: #ffc107;
    color: #000;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.pssl-diff.positive {
    color: #27ae60;
    font-weight: 600;
}

.pssl-diff.negative {
    color: #e74c3c;
    font-weight: 600;
}

/* Match Results */
.pssl-match-result {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pssl-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.pssl-match-date {
    font-weight: 600;
    color: #666;
}

.pssl-match-teams {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 15px 0;
}

.pssl-match-teams .pssl-team {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    border-radius: 4px;
    background: #f8f9fa;
    min-width: 200px;
}

.pssl-match-teams .pssl-team.winner {
    background: #d4edda;
    border: 2px solid #27ae60;
}

.pssl-team-name {
    font-size: 18px;
    font-weight: 600;
}

.pssl-team-score {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.pssl-vs {
    font-size: 14px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.pssl-forfeit-notice {
    text-align: center;
    color: #e74c3c;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Registration Form */
.pssl-registration-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pssl-form-section {
    margin-bottom: 30px;
}

.pssl-form-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

.pssl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.pssl-form-group {
    margin-bottom: 20px;
}

.pssl-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.pssl-form-group input[type="text"],
.pssl-form-group input[type="email"],
.pssl-form-group input[type="tel"],
.pssl-form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.pssl-form-group input:focus,
.pssl-form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.required {
    color: #e74c3c;
}

.pssl-helper-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.pssl-player-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.pssl-player-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.pssl-remove-player {
    float: right;
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

/* Buttons */
.pssl-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.pssl-btn-primary {
    background: #3498db;
    color: #fff;
}

.pssl-btn-primary:hover {
    background: #2980b9;
}

.pssl-btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.pssl-btn-secondary:hover {
    background: #7f8c8d;
}

.pssl-btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Registration Summary */
#pssl-registration-summary {
    background: #d4edda;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #27ae60;
}

#pssl-registration-summary p {
    margin: 10px 0;
    font-size: 18px;
    font-weight: 600;
}

/* My Teams */
.pssl-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pssl-team-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pssl-team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pssl-team-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.pssl-league-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.pssl-team-record {
    font-weight: 600;
    margin-bottom: 15px;
}

.pssl-team-actions {
    display: flex;
    gap: 10px;
}

/* League List */
.pssl-leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.pssl-league-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.pssl-league-card:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.pssl-league-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.pssl-league-details p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px dotted #e0e0e0;
}

.pssl-league-details p:last-child {
    border-bottom: none;
}

.pssl-league-actions {
    margin-top: 20px;
    text-align: center;
}

.pssl-league-full {
    text-align: center;
    color: #e74c3c;
    font-weight: 600;
    font-size: 18px;
    margin-top: 20px;
    padding: 10px;
    background: #ffe0e0;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pssl-form-row {
        grid-template-columns: 1fr;
    }
    
    .pssl-match-teams {
        flex-direction: column;
        gap: 15px;
    }
    
    .pssl-teams-grid,
    .pssl-leagues-grid {
        grid-template-columns: 1fr;
    }
    
    .pssl-schedule-table,
    .pssl-standings-table {
        font-size: 14px;
    }
    
    .pssl-schedule-table th,
    .pssl-schedule-table td,
    .pssl-standings-table th,
    .pssl-standings-table td {
        padding: 8px 10px;
    }
}

/* Loading states */
.pssl-loading {
    text-align: center;
    padding: 40px;
}

.pssl-loading:after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: pssl-spin 1s linear infinite;
}

@keyframes pssl-spin {
    to { transform: rotate(360deg); }
}

/* Error messages */
.pssl-error {
    background: #ffe0e0;
    color: #e74c3c;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e74c3c;
    margin: 20px 0;
}

/* Success messages */
.pssl-success {
    background: #d4edda;
    color: #27ae60;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #27ae60;
    margin: 20px 0;
}