/**
 * Filter Page Styles
 * Extracted from inline styles across filter views
 */

/* ==========================================================================
   Card Components
   ========================================================================== */

.filter-card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    margin-bottom: 2rem;
    background-color: white;
}

.filter-card-header {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
    padding: 1rem 1.5rem;
}

.filter-card-body {
    padding: 1.5rem;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */

.filter-table {
    width: 100%;
    color: #333;
}

.filter-table thead th {
    border-bottom: 2px solid #007bff;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.filter-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.filter-table tbody tr:hover {
    background-color: #f8f9fa;
}

.filter-table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
}

/* ==========================================================================
   Odds Display
   ========================================================================== */

.odds-value {
    display: block;
    font-size: 0.9rem;
}

.odds-winning,
.winning-odds {
    color: #41a825;
    font-weight: 600;
    font-size: 1.1rem;
}

.odds-correct-score {
    font-weight: 600;
}

.odds-correct-score.highlighted {
    color: #41a825;
}

.winning-type {
    font-weight: bold;
    color: #007bff;
    font-size: 0.9rem;
}

/* ==========================================================================
   Team Display
   ========================================================================== */

.team-logo {
    width: 20px;
    height: auto;
    margin-left: 5px;
    vertical-align: middle;
}

.team-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Status Icons
   ========================================================================== */

.status-check {
    color: #28a745;
}

.status-times {
    color: #dc3545;
}

.status-icon {
    margin-right: 0.25rem;
}

/* ==========================================================================
   Streak Info
   ========================================================================== */

.streak-info {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.streak-info h5,
.streak-info h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-back {
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    padding: 10px 20px;
    text-decoration: none;
    transition: background-color 0.3s;
    display: inline-block;
}

.btn-back:hover {
    background-color: #0056b3;
    color: white;
}

/* ==========================================================================
   Mobile Styles
   ========================================================================== */

.mobile-sort-buttons {
    display: none;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.mobile-sort-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-sort-button:hover {
    background-color: #0069d9;
}

.mobile-sort-button.active {
    background-color: #0056b3;
}

.mobile-date-streak {
    display: none;
    font-size: 0.8rem;
    color: #6c757d;
}

.mobile-icons {
    display: none;
    flex-direction: column;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.filter-type {
    font-weight: 600;
    min-width: 2rem;
    display: inline-block;
}

/* Mobile visibility classes (non-Bootstrap) */
.desktop-only {
    display: table-cell;
}

.mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .mobile-sort-buttons {
        display: flex;
        justify-content: space-between;
    }

    .mobile-date-streak {
        display: block;
    }

    .mobile-icons {
        display: flex;
    }

    .team-logo {
        width: 15px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: table-cell;
    }

    .filter-table thead th,
    .filter-table tbody td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Bet Calculation Forms
   ========================================================================== */

.bet-form-card {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.bet-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 1rem;
}

.bet-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.bet-form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #d1d5db !important;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: #f9fafb !important;
    color: #333 !important;
}

.bet-form-input:focus {
    outline: none;
    border-color: #3b82f6 !important;
    background-color: white !important;
}

.bet-form-submit {
    width: 100%;
    background-color: #2563eb !important;
    color: white !important;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bet-form-submit:hover {
    background-color: #1d4ed8 !important;
}

/* ==========================================================================
   DataTables Override - Filter Pages
   ========================================================================== */

/* Pagination visible */
.filter-card .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #333 !important;
    background-color: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    padding: 5px 12px !important;
    margin: 2px !important;
    border-radius: 4px !important;
}

.filter-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #e5e7eb !important;
    color: #111 !important;
}

.filter-card .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
}

.filter-card .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #9ca3af !important;
    background-color: #f9fafb !important;
}

/* Info text visible */
.filter-card .dataTables_wrapper .dataTables_info {
    color: #374151 !important;
    padding-top: 10px !important;
}

/* Search and length visible */
.filter-card .dataTables_wrapper .dataTables_filter label,
.filter-card .dataTables_wrapper .dataTables_length label {
    color: #374151 !important;
}

.filter-card .dataTables_wrapper .dataTables_filter input,
.filter-card .dataTables_wrapper .dataTables_length select {
    color: #333 !important;
    background-color: white !important;
    border: 1px solid #d1d5db !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
}

/* Disable responsive collapsing on desktop */
.filter-table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
.filter-table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    padding-left: 30px;
}

@media (min-width: 768px) {
    /* On desktop, don't collapse columns */
    .filter-table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
    .filter-table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
        display: none !important;
    }

    .filter-table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
    .filter-table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
        padding-left: 10px !important;
    }

    /* Force all columns visible on desktop */
    .filter-table th,
    .filter-table td {
        display: table-cell !important;
    }

    .filter-table th.desktop-only,
    .filter-table td.desktop-only {
        display: table-cell !important;
    }
}

/* ==========================================================================
   Bootstrap-compatible Classes (for bets views)
   ========================================================================== */

/* Card component (Bootstrap-style) */
.card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 1rem;
    margin-bottom: 2rem;
    background-color: white;
}

.card-header {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Table (Bootstrap-style) */
.table {
    width: 100%;
    color: #333;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table thead th {
    border-bottom: 2px solid #007bff;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    vertical-align: bottom;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    display: block;
    width: 100%;
}

/* Grid system (Bootstrap-style) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.justify-content-center {
    justify-content: center;
}

.col-12,
.col-lg-10 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 992px) {
    .col-lg-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }
}

/* Display utilities (Bootstrap-style) */
.d-none {
    display: none !important;
}

.d-md-none {
    display: block;
}

.d-md-table-cell {
    display: none;
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-table-cell {
        display: table-cell !important;
    }
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Spacing utilities */
.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Mobile hide utility */
.mobil-none {
    display: inline;
}

@media (max-width: 767px) {
    .mobil-none {
        display: none !important;
    }
}
