/**
 * Frontend Styles for ItsFishing Tables Plugin
 * Inherits fonts and base styles from WordPress theme
 */

.itsfishing-container {
    margin: 30px 0;
    clear: both;
}

/* Season Header */
.itsfishing-season-header {
    background: #f7f7f7;
    border-left: 4px solid #0073aa;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 15px;
}

.itsfishing-season-label {
    color: #666;
    margin-right: 8px;
}

.itsfishing-season-year {
    color: #0073aa;
    font-size: 18px;
}

/* Tabs Navigation */
.itsfishing-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.itsfishing-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: inherit;
    font-family: inherit;
    position: relative;
    top: 2px;
}

.itsfishing-tab:hover {
    color: #0073aa;
    background: #f7f7f7;
}

.itsfishing-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: transparent;
}

/* Single table title (when no tabs) */
.itsfishing-single-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Tab Content */
.itsfishing-tab-content {
    display: none;
}

.itsfishing-tab-content.active {
    display: block;
}

/* Loading State */
.itsfishing-loading {
    text-align: center;
    padding: 60px 20px;
}

.itsfishing-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: itsfishing-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Error State */
.itsfishing-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.itsfishing-error-message {
    margin: 0;
    color: #856404;
}

/* Table Styles */
.itsfishing-table-wrapper {
    overflow-x: auto;
    margin: 0;
}

.itsfishing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: inherit;
}

.itsfishing-table thead {
    background: #f7f7f7;
}

.itsfishing-table th {
    text-align: left;
    padding: 15px 12px;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.itsfishing-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.itsfishing-table tbody tr:hover {
    background: #f9f9f9;
}

.itsfishing-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank column styling */
.itsfishing-table td:first-child {
    font-weight: 600;
}

/* Alignment helpers */
.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* Responsive */
@media (max-width: 768px) {
    .itsfishing-tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .itsfishing-tab {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
        top: 0;
    }

    .itsfishing-tab.active {
        border-bottom-color: #e0e0e0;
        border-left-color: #0073aa;
        background: #f7f7f7;
    }

    .itsfishing-table {
        font-size: 14px;
    }

    .itsfishing-table th,
    .itsfishing-table td {
        padding: 10px 8px;
    }

    /* Make tables scroll horizontally on small screens */
    .itsfishing-table-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

/* Print styles */
@media print {
    .itsfishing-tabs {
        display: none;
    }

    .itsfishing-tab-content {
        display: block !important;
        page-break-inside: avoid;
    }

    .itsfishing-loading,
    .itsfishing-error {
        display: none !important;
    }
}
