/**
 * Fishing Regulations CSS
 * 
 * Premium state overview table with elegant styling
 * Blue/Teal theme for fishing activity
 * 
 * @package StateParksCPT
 * @since 2.4.0
 */

/* ==========================================================================
   Table Container - Centered & Compact
   ========================================================================== */

.sp-fishing-table-container {
    margin: 2rem auto;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 1100px;
    overflow: visible;
    /* Allow tooltip to overflow */
    background: #fff;
}

/* Full width on larger screens */
@media (min-width: 1400px) {
    .sp-fishing-table-container {
        max-width: 1200px;
    }
}

.sp-fishing-state-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    table-layout: fixed;
}

/* ==========================================================================
   Table Header - Elegant Blue Gradient
   ========================================================================== */

.sp-fishing-state-table thead {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
    color: #fff;
}

.sp-fishing-state-table th {
    padding: 0.75rem 0.875rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid #0c4a6e;
}

.sp-fishing-state-table th:first-child {
    border-radius: 16px 0 0 0;
}

.sp-fishing-state-table th:last-child {
    border-radius: 0 16px 0 0;
    text-align: center;
}

/* Specific column widths */
.sp-th-notes {
    width: 180px;
}

.sp-th-official {
    width: 85px;
    text-align: center;
    font-size: 0.65rem;
}

/* ==========================================================================
   Table Body - Clean Rows
   ========================================================================== */

.sp-fishing-state-table tbody tr {
    transition: all 0.15s ease;
}

.sp-fishing-state-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.sp-fishing-state-table tbody tr:hover {
    background-color: #e0f2fe !important;
    transform: scale(1.002);
}

.sp-fishing-state-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

/* ==========================================================================
   State Name Cell
   ========================================================================== */

.sp-fishing-state-cell {
    font-weight: 600;
    white-space: nowrap;
}

.sp-fishing-state-cell a {
    color: #0369a1;
    text-decoration: none;
    transition: color 0.15s;
}

.sp-fishing-state-cell a:hover {
    color: #0ea5e9;
}

/* ==========================================================================
   Cost Cells - With Tier Indicators
   ========================================================================== */

.sp-fishing-cost-cell {
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sp-cost-tier {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.sp-cost-amount {
    color: #1e293b;
}

.sp-fishing-cost-cell--secondary {
    font-weight: 500;
    color: #64748b;
}

/* Cost tier row backgrounds */
.sp-fishing-row--free {
    background: linear-gradient(90deg, #ecfdf5 0%, transparent 50%) !important;
}

.sp-fishing-row--affordable {
    background: linear-gradient(90deg, #f0fdf4 0%, transparent 50%) !important;
}

.sp-fishing-row--moderate {
    background: linear-gradient(90deg, #fffbeb 0%, transparent 50%) !important;
}

.sp-fishing-row--premium {
    background: linear-gradient(90deg, #fff7ed 0%, transparent 50%) !important;
}

.sp-fishing-row--expensive {
    background: linear-gradient(90deg, #fef2f2 0%, transparent 50%) !important;
}

/* ==========================================================================
   Exemption Cells
   ========================================================================== */

.sp-fishing-exempt-cell {
    font-size: 0.75rem;
    color: #0f766e;
    white-space: normal;
    /* Allow line breaks */
    line-height: 1.4;
}

/* ==========================================================================
   Free Days Cell
   ========================================================================== */

.sp-fishing-free-days-cell {
    font-size: 0.75rem;
    color: #0369a1;
    line-height: 1.5;
}

.sp-fishing-free-days-cell br {
    display: block;
    content: "";
    margin-top: 0.15rem;
}

/* ==========================================================================
   Notes Cell with Tooltip
   ========================================================================== */

.sp-fishing-notes-cell {
    position: relative;
    min-width: 160px;
    max-width: 200px;
    overflow: visible;
    /* Allow tooltip to show beyond cell */
}

.sp-fishing-notes-wrapper {
    cursor: help;
    position: relative;
}

.sp-fishing-notes-preview {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sp-fishing-notes-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.6;
    width: 300px;
    max-width: 85vw;
    z-index: 1000;
    box-shadow:
        0 10px 25px -5px rgba(14, 165, 233, 0.2),
        0 8px 10px -6px rgba(14, 165, 233, 0.1);
}

.sp-fishing-notes-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #bae6fd;
}

.sp-fishing-notes-wrapper:hover .sp-fishing-notes-tooltip {
    display: block;
    animation: tooltipFade 0.2s ease;
}

@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================================================
   Official Link Cell
   ========================================================================== */

.sp-fishing-official-cell {
    text-align: center;
    padding: 0.5rem !important;
}

.sp-fishing-official-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(14, 165, 233, 0.3);
}

.sp-fishing-official-cell a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

/* No data placeholder */
.sp-no-data {
    color: #cbd5e1;
    font-weight: 300;
}

/* ==========================================================================
   Keyword Highlighting
   ========================================================================== */

.sp-fishing-keyword {
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.78rem;
}

.sp-fishing-keyword--positive {
    background: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.sp-fishing-keyword--info {
    background: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

.sp-fishing-keyword--warning {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.sp-fishing-keyword--highlight {
    background: rgba(14, 165, 233, 0.2);
    color: #0369a1;
}

/* ==========================================================================
   Legend - Compact and Elegant
   ========================================================================== */

.sp-fishing-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: center;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #475569;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.sp-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sp-legend-color {
    font-size: 0.85rem;
}

/* ==========================================================================
   Quick Facts Box
   ========================================================================== */

.sp-fishing-quick-facts {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.sp-fishing-quick-facts h3 {
    margin: 0 0 1rem;
    color: #0369a1;
    font-size: 1.15rem;
}

.sp-fishing-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.sp-fishing-fact {
    background: #fff;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sp-fishing-fact--highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.sp-fact-label {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.sp-fact-value {
    font-size: 0.925rem;
    font-weight: 600;
    color: #1e293b;
}

.sp-fact-value--primary {
    color: #0369a1;
    font-size: 1rem;
}

.sp-fact-value--success {
    color: #15803d;
}

.sp-fishing-notes-box {
    margin-top: 0.875rem;
    padding: 0.875rem;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
}

.sp-fishing-notes-box p {
    margin: 0;
    line-height: 1.5;
    color: #475569;
    font-size: 0.85rem;
}

.sp-fishing-official-button {
    display: inline-block;
    margin-top: 0.875rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.sp-fishing-official-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* ==========================================================================
   Section Header
   ========================================================================== */

.sp-fishing-overview-section {
    margin: 2rem 0;
}

.sp-fishing-overview-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sp-fishing-overview-header h2 {
    font-size: 1.5rem;
    color: #0c4a6e;
    margin: 0 0 0.5rem;
}

.sp-fishing-overview-header p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

/* Inline Disclaimer */
.sp-fishing-disclaimer-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #0369a1;
    max-width: 600px;
    margin: 0 auto;
}

.sp-fishing-disclaimer-inline .sp-disclaimer-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .sp-fishing-state-table {
        font-size: 0.75rem;
    }

    .sp-fishing-state-table th,
    .sp-fishing-state-table td {
        padding: 0.4rem 0.5rem;
    }

    .sp-fishing-notes-cell {
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .sp-fishing-table-container {
        margin: 1rem -1rem;
        border-radius: 0;
        max-width: calc(100% + 2rem);
        overflow-x: auto;
    }

    .sp-fishing-state-table {
        font-size: 0.7rem;
    }

    .sp-fishing-state-table th:first-child,
    .sp-fishing-state-table th:last-child {
        border-radius: 0;
    }

    .sp-fishing-state-table th,
    .sp-fishing-state-table td {
        padding: 0.35rem 0.4rem;
    }

    .sp-fishing-notes-cell,
    .sp-fishing-exempt-cell:nth-child(5) {
        display: none;
    }

    .sp-fishing-facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sp-fishing-legend {
        gap: 0.5rem;
        font-size: 0.7rem;
        padding: 0.625rem 0.875rem;
    }
}

@media (max-width: 480px) {
    .sp-fishing-exempt-cell {
        display: none;
    }

    .sp-fishing-cost-cell--secondary {
        display: none;
    }
}

/* ==========================================================================
   FAQ Section - Modern Accordion
   ========================================================================== */

.sp-fishing-faq-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

.sp-fishing-faq-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sp-fishing-faq-header h2 {
    font-size: 1.75rem;
    color: #0c4a6e;
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.sp-fishing-faq-intro {
    color: #475569;
    font-size: 1rem;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sp-fishing-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.sp-fishing-faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sp-fishing-faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #0ea5e9;
}

.sp-fishing-faq-item[open] {
    border-color: #0ea5e9;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
}

.sp-fishing-faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sp-fishing-faq-question::-webkit-details-marker {
    display: none;
}

.sp-fishing-faq-question:hover {
    color: #0369a1;
}

.sp-faq-icon {
    color: #0ea5e9;
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sp-fishing-faq-item[open] .sp-faq-icon {
    transform: rotate(90deg);
}

.sp-fishing-faq-answer {
    padding: 0 1.25rem 1.25rem 2.5rem;
    animation: faqSlide 0.3s ease;
}

.sp-fishing-faq-answer p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
}

@keyframes faqSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FAQ Responsive */
@media (max-width: 768px) {
    .sp-fishing-faq-section {
        margin: 2rem -1rem;
        padding: 1.5rem 1rem;
        border-radius: 0;
    }

    .sp-fishing-faq-header h2 {
        font-size: 1.35rem;
    }

    .sp-fishing-faq-intro {
        font-size: 0.9rem;
    }

    .sp-fishing-faq-question {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
    }

    .sp-fishing-faq-answer {
        padding: 0 1rem 1rem 2rem;
    }

    .sp-fishing-faq-answer p {
        font-size: 0.875rem;
    }
}