/* Match Manager Frontend Styles */

/* Main container for both shortcode and page content */
.mmr-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
}

/* Page headers */
.mmr-page-header h1 {
    margin: 0 0 20px 0;
    color: inherit;
    font-size: 2em;
    font-weight: 600;
}

.mmr-last-updated {
    color: #666;
    font-style: italic;
    margin: 10px 0 20px 0;
    font-size: 14px;
}

/* Main content area */
.mmr-main-content {
    margin-top: 20px;
}

/* Shortcode Overview Styles - Simple List */
.matchmanager-results-overview {
    margin: 20px 0;
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
}

.mmr-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.mmr-header h2 {
    margin: 0;
    color: inherit;
    font-size: 1.5em;
    font-weight: 600;
}

/* Competition Lists - Both shortcode and page */
.mmr-competitions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mmr-competition-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.mmr-competition-item:last-child {
    border-bottom: none;
}

.mmr-competition-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    display: inline-block;
    transition: color 0.2s ease;
}

.mmr-competition-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.mmr-competition-title {
    color: #666;
    font-weight: 500;
    font-size: 16px;
}

.mmr-unavailable {
    color: #999;
    font-style: italic;
    margin-left: 8px;
    font-size: 14px;
}

/* No competitions message */
.mmr-no-competitions {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mmr-no-competitions p {
    color: #666;
    margin: 0;
    font-size: 1.1em;
}

/* Individual Competition Display (shortcode version) */
.matchmanager-single-competition {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mmr-single-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mmr-single-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 600;
}

.mmr-competition-date {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Competition results content */
.mmr-competition-results,
.mmr-results-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Navigation */
.mmr-competition-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.mmr-back-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.mmr-back-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Error States */
.mmr-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.mmr-error p {
    margin: 0;
}

.mmr-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mmr-no-results h2 {
    color: #999;
    margin-bottom: 15px;
}

/* Embedded HTML Content Styling */
.mmr-results-content table {
    border: 1px solid #B0B0B0 !important;
    width: auto;
    border-collapse: collapse;
    min-width: 400px;
    /* Prevent squishing */
    border-collapse: collapse;
    margin: 20px 0;
}

.mmr-results-content td {
    padding: 12px 15px;
    text-align: left;
}

.mmr-results-content tbody tr:nth-child(even) {
    /* background: #fafbfc; */
    background: #F2F2F2;
}

.mmr-results-content tbody td:first-child {
    text-align: right;
    width: 20px;
    font-weight: bold;
}

.mmr-results-content tbody td:last-child {
    width: 35px !important;
    font-weight: bold !important;
    text-align: center !important;
}

/* Table responsive wrapper */
.mmr-results-content {
    overflow-x: auto;
}

/* Style for any embedded content */
.mmr-results-content div {
    margin: 10px 0;
}

.mmr-results-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.mmr-results-content h1 {
    font-size: 30px;
}

.mmr-results-content h3 {
    font-size: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mmr-page-container {
        padding: 0 15px;
    }

    .mmr-page-header h1 {
        font-size: 1.8em;
    }

    .mmr-header h2 {
        font-size: 1.4em;
    }

    .mmr-single-header {
        padding: 15px 20px;
    }

    .mmr-results-content,
    .mmr-competition-results {
        padding: 20px;
    }

    .mmr-results-content th,
    .mmr-results-content td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mmr-page-header h1 {
        font-size: 1.6em;
    }

    .mmr-header h2 {
        font-size: 1.3em;
    }

    .mmr-single-header h3 {
        font-size: 1.3em;
    }

    .mmr-results-content,
    .mmr-competition-results {
        padding: 15px;
    }

    .mmr-results-content th,
    .mmr-results-content td {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .mmr-competition-navigation {
        display: none;
    }

    .matchmanager-single-competition {
        box-shadow: none;
    }

    .mmr-single-header {
        background: #f0f0f0 !important;
        color: #333 !important;
    }

    .mmr-results-content table {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Focus states for accessibility */
.mmr-competition-link:focus,
.mmr-back-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mmr-competition-link {
        color: #0000ff;
    }

    .mmr-single-header {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .mmr-competition-link,
    .mmr-back-link {
        transition: none;
    }
}
