/* Mobile Admin Styles
   For Basshole Fishing Club
   ---------------------------------------- */

/* Left-align modal labels */
.modal label {
  text-align: left;
  display: block;
}


/* Base Mobile Styles - Apply to devices 768px and below */
@media (max-width: 768px) {
    /* Hide the original navigation in mobile view */
    #adminNav, #raceDayNav {
        display: none !important;
    }
    

    
    /* Card-based layout for data tables */
    .admin-section table {
        display: none !important; /* Hide traditional tables on mobile */
    }
    main {
        padding-bottom: 100px; /* Ensures content stays above the bottom nav */
    }
    
    /* Mobile Card Container */
    .mobile-card-container {
        display: block;
        width: 100%;
        margin-top: 15px;
    }
    
    /* Mobile Card */
    .mobile-card {
        background-color: rgba(0, 0, 0, 0.7);
        border: 1px solid #caee00;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        position: relative;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    /* Mobile Card Header */
    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(202, 238, 0, 0.3);
        padding-bottom: 8px;
    }
    
    /* Mobile Card Title */
    .mobile-card-title {
        font-size: 16px;
        font-weight: bold;
        color: #caee00;
    }
    
    /* Mobile Card Actions */
    .mobile-card-actions {
        display: flex;
        gap: 10px;
    }
    
    /* Mobile Card Action */
    .mobile-card-action {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 16px;
        cursor: pointer;
        padding: 5px;
    }
    
    /* Mobile Card Action Hover */
    .mobile-card-action:hover {
        color: #caee00;
    }
    
    /* Mobile Card Content */
    .mobile-card-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* Mobile Card Field */
    .mobile-card-field {
        display: flex;
        flex-direction: column;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile Card Field Last Child */
    .mobile-card-field:last-child {
        border-bottom: none;
    }
    
    /* Mobile Card Label */

    /* Mobile Card Value */
    .mobile-card-value {
        font-size: 14px;
        color: #fff;
        word-break: break-word;
        text-align: left;
    }
    
    /* Admin sections in mobile view */
    .admin-section {
        padding: 10px;
    }
    
    /* Admin section h2 */
    .admin-section h2:not(.base-header-titles) {
        margin-top: 5px;
        margin-bottom: 10px;
    }
    
    /* Admin section add button */
    .admin-section .add-btn {
        display: block;
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
        font-size: 16px;
    }
    
    /* Ensure tables are visible when section is active */
    .admin-section:not(.hidden) table {
        display: table !important;
    }
    
    /* Ensure card containers are visible when section is active */
    .admin-section:not(.hidden) .mobile-card-container {
        display: block !important;
    }
    
    /* Swipe gestures container */
    .swipe-container {
        width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    /* Form adjustments for mobile */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Input, select, textarea */
    input, select, textarea {
        width: 100%;
        padding: 10px;
        font-size: 16px; /* Better for touch input */
    }
    
    
    /* h1 */
    h1 {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }
    
    /* Header right */
    .header-right {
        display: flex;
        align-items: center;
    }
    
    /* Hide View Club button on mobile */
    .dashboard-btn {
        display: none !important;
    }
    
    /* Mobile-specific buttons */
    .mobile-add-btn {
        display: none; /* Hide the floating action button */
    }
    
    /* On The Water Mode Container - Only visible in mobile view */
    .on-water-container {
        display: none; /* Hidden by default on all screen sizes */
    }
    
    /* Only show On The Water Mode elements in mobile view */
    @media (max-width: 768px) {
        /* Fix angler profile image size in mobile cards */
        .mobile-angler-photo,
        .race-badge-img-container img {
            width: 80px !important;
            height: 80px !important;
            max-width: 80px !important;
            max-height: 80px !important;
            min-width: 80px !important;
            min-height: 80px !important;
            border-radius: 50% !important;
            object-fit: cover !important;
            border: 2px solid #caee00 !important;
            background: #111 !important;
            margin: 0 auto 0.4rem auto !important;
            display: block !important;
            box-sizing: border-box !important;
        }
        .on-water-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            height: auto;
            margin-top: 0;
            position: relative;
            width: 100%;
            top: 0; /* Changed from -25px to 0 to prevent content from being cut off */
            padding: 10px 0 0 0; /* Added top padding to maintain spacing */
        }
        

        .on-water-buttons {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            gap: 10px;
            margin-top: 0;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
        }
        
        .on-water-action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: rgba(18, 19, 18, 0.7); /* Increased opacity to 70% */
            border: 2px solid #caee00;
            border-radius: 8px;
            padding: 20px 15px; /* Reduce padding */
            color: #fff;
            width: 90%;
            height: 300px;
            max-width: 350px;
            margin: 0 auto;
            transition: all 0.3s ease;
        }
        
        .on-water-action-btn i {
            font-size: 48px; /* Increased from 30px to match larger text */
            margin-bottom: 15px; /* Increased margin for better spacing with larger text */
            color: #caee00;
        }
        
        .on-water-action-btn span {
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            padding-bottom: 5px; /* Adjust vertical position */
            font-size: 18px;
            font-weight: 600;
        }
        
        .add-fish-btn {
            background-color: rgba(78, 115, 39, 0.7); /* Increased opacity to 70% */
        }
        
        .live-update-btn {
            background-color: rgba(78, 115, 39, 0.7);  /* Increased opacity to 70% */
        }
    }
}

/* Muted state for navigation buttons when in editing mode */
.mobile-nav-btn.muted {
    opacity: 0.7;
    border-color: rgba(202, 238, 0, 0.1);
}

.mobile-nav-btn.muted.active {
    opacity: 1;
    border: none;
}

/* Loading and empty states */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    text-align: center;
}

.mobile-empty-state i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.mobile-empty-state-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* Accordion Card Styling */
.accordion-card {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #caee00;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* --- Compact Mobile Fish Card Styles --- */
@media (max-width: 768px) {
  .fish-card-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;

    border-radius: 8px;
    margin-bottom: 8px;
    gap: 8px;
    min-height: unset;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }
  .fish-thumb-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #caee00;
  }
  .fish-thumb {
    width: 125px;
    height: 125px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }
  .no-photo-thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #444;
    color: #caee00;
    display: flex;
    align-items: center;

        border-radius: 8px;
        margin-bottom: 8px;
        gap: 8px;
        min-height: unset;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
      }
      .fish-thumb-container {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 75px;
        height: 75px;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid #caee00;
        margin-bottom: 10px;
      }
      .fish-thumb {
        width: 125px;
        height: 125px;
        object-fit: cover;
        border-radius: 8px;
        display: block;
      }
      .no-photo-thumb {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: #444;
        color: #caee00;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
        text-align: center;
      }
      .fish-info-stack {
        display: flex;
        flex-direction: column;
        gap: 0;
        min-width: 0;
        margin-top: 25px;
      }
      .fish-angler-name {
        font-weight: bold;
        color: #caee00;
        font-size: 25px;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: -50px;
        
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: -50px;
    

  }
  .fish-type-row, .fish-race-row, .fish-season-row, .fish-date-row, .fish-points-row {
    font-size: 14px !important;
    text-align: left !important;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .fish-type-row .label, .fish-race-row .label, .fish-season-row .label, .fish-date-row .label, .fish-points-row .label {
    color: #caee00 !important;
    font-weight: bold !important;
    display: inline;
  }
  .fish-type-row .value, .fish-race-row .value, .fish-season-row .value, .fish-date-row .value, .fish-points-row .value {
    color: #fff !important;
    font-weight: normal !important;
    display: inline;
  }
  .fish-card-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    margin-left: 6px;
    margin-top: -50px;
  }
  .fish-card-actions button {
    background: #222;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  }
  .fish-card-actions button.edit-btn:hover {
    background: #caee00;
    color: #222;
  }
  .fish-card-actions button.delete-btn:hover {
    background: #d32f2f;
    color: #fff;
  }
}

.accordion-header {
    background-color: rgba(0, 0, 0, 0.8);
    color: #caee00;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(202, 238, 0, 0.3);
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background-color: rgba(20, 20, 20, 0.9);
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #caee00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-toggle {
    color: #caee00;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.accordion-card.active .card-toggle {
    transform: rotate(180deg);
}

.accordion-content {
    background-color: rgba(20, 20, 20, 0.8);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
}

.accordion-card.active .accordion-content {
    padding: 15px;
}

.content-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.item-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    font-weight: 500;
    text-align: left;
}

.item-value {
    font-size: 14px;
    color: #fff;
    word-break: break-word;
    text-align: left;
}

/* Card Actions Section */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-start;
}

.card-actions button {
    background-color: #caee00;
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 0 1 auto;
    min-width: 80px;
    text-align: center;
}

.card-actions button:hover {
    background-color: #d8ff00;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card-actions button.delete-btn,
.card-actions button.remove-btn {
    background-color: #ff3b30;
    color: white;
}

.card-actions button.delete-btn:hover,
.card-actions button.remove-btn:hover {
    background-color: #ff5446;
}

.card-actions button.edit-btn {
    background-color: #007aff;
    color: white;
}

.card-actions button.edit-btn:hover {
    background-color: #2b8fff;
}

/* Special styling for photo content */
.item-value img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

/* Angler photo special handling */
.item-value img[src*="angler"] {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #caee00;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* CONSOLIDATED FISH THUMBNAIL STYLES FOR MOBILE ADMIN */
/* Fish thumbnails in all contexts (accordion items and content) */
.item-value img.race-grid-fish-img,
.item-value .fish-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    border: 2px solid #caee00;
    object-fit: cover;
}

.item-value .race-grid-fish-wrapper,
.item-value .fish-thumbnail-container {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

/* All fish wrapper containers */
.item-value .race-grid-fish-wrapper,
.item-value .fish-thumbnail-container,
.item-value .race-grid-fish-img {
    width: 80px;
    height: 80px;
    margin: 5px auto;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    border: 2px solid #caee00;
}

/* General image styling in accordion content */
.accordion-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 5px 0;
    border-radius: 5px;
}

/* Admin sections in mobile view */
.admin-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Ensure mobile cards are properly displayed */
.mobile-card-container {
    display: block !important;
    width: 100% !important;
    margin: 10px 0 !important;
}

/* Improve accordion card styling */
.accordion-card, .mobile-card {
    margin-bottom: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove border-radius from middle cards in a stack */
.mobile-card:not(:first-child):not(:last-child),
.accordion-card:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* Only top card gets top border-radius */
.mobile-card:first-child, .accordion-card:first-child {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Only bottom card gets bottom border-radius */
.mobile-card:last-child, .accordion-card:last-child {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Single card: full border-radius */
.mobile-card:only-child, .accordion-card:only-child {
    border-radius: 8px !important;
}

/* Make accordion headers more prominent */
.accordion-header {
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

/* Only round the top corners of the header if it's the first/only child of a rounded card */
.accordion-card:first-child .accordion-header,
.accordion-card:only-child .accordion-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Prevent header from covering card's rounded corners */
.accordion-card {
    overflow: hidden;
}

/* Ensure field labels and values are stacked and fully visible */
.mobile-card-field {
    padding: 10px 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.mobile-card-label {
    width: 100% !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #caee00 !important;
    text-align: left !important;
}

/* Ensure all card field labels and values are left-aligned in mobile cards */
.mobile-card-field, .mobile-card-label, .mobile-card-value {
    text-align: left !important;
}

/* Data values stay white */
.mobile-card-value {
    color: #fff !important;
}

/* --- Force left alignment and bold red for labels, left-aligned white for values in fish/accordion cards --- */
.fish-card .mobile-card-label,
.accordion-card .mobile-card-label,
.fish-card .item-label,
.accordion-card .item-label {
    text-align: left !important;
    color: #caee00 !important;
    font-weight: bold !important;
}

.fish-card .mobile-card-value,
.accordion-card .mobile-card-value,
.fish-card .item-value,
.accordion-card .item-value {
    text-align: left !important;
    color: #fff !important;
    font-weight: normal !important;
}


.mobile-card-value {
    width: 100% !important;
    font-size: 15px !important;
    word-break: break-word !important;
}

/* Ensure all content is visible in the viewport */
.mobile-view .container-fluid {
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Fix for specific tables that might be using inline styles */
[data-mobile-hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Special styling for Angler cards */
.angler-card-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
}

.angler-info-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Center align the name */
    text-align: center; /* Center text */
}

.angler-name {
    font-size: 22px;
    font-weight: bold;
    color: #caee00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.angler-email {
    font-size: 14px;
    color: #fff;
    word-break: break-word;
}

.angler-button-container {
    flex: 0 0 100%;
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.show-details-btn {
    background-color: rgba(64, 117, 15, 0.8);
    color: #fff;
    border: 1px solid #caee00;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
}

.show-details-btn i {
    margin-right: 8px;
}

.show-details-btn:hover {
    background-color: rgba(64, 117, 15, 1);
    box-shadow: 0 0 8px rgba(202, 238, 0, 0.5);
}

/* Style for action buttons in accordion content */
.mobile-card-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.mobile-card-actions-container .mobile-card-action {
    background-color: rgba(64, 117, 15, 0.8);
    color: #fff;
    border: 1px solid #caee00;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style for remove buttons */
.mobile-card-actions-container .remove-btn {
    background-color: rgba(180, 30, 30, 0.8) !important;
    border: 1px solid #ff6b6b !important;
    color: #fff !important;
}

.mobile-card-actions-container .remove-btn:hover {
    background-color: rgba(220, 30, 30, 0.9) !important;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5) !important;
}

.mobile-card-actions-container .mobile-card-action i {
    margin-right: 5px;
}

.actions-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile-friendly modals */
.modal-dialog {
    max-width: 95% !important;
    margin: 10px auto !important;
}

.modal-content {
    border-radius: 8px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.modal-header {
    padding: 12px 15px !important;
}

.modal-body {
    padding: 15px !important;
}

.modal-footer {
    padding: 10px 15px !important;
}

/* Mobile-friendly form elements */
.form-group {
    margin-bottom: 1px !important;
}

.form-control, .custom-select, .input-group, .custom-file {
    max-width: 100% !important;
    font-size: 16px !important; /* Prevents iOS zoom on focus */
}

.form-control, .custom-select {
    height: auto !important;
    padding: 10px 12px !important;
}

/* Fix for select dropdowns */
select.form-control, select.custom-select {
    background-position: right 10px center !important;
    padding-right: 30px !important;
}

/* Adjust label sizes */
label {
    font-size: 14px !important;
    margin-bottom: 2px !important;
}

/* Make buttons in forms more tappable */
.modal-footer .btn, .modal-body .btn {
    padding: 10px 15px !important;
    font-size: 16px !important;
    margin: 5px !important;
}

/* Fix for file inputs */
.custom-file-label {
    padding: 10px 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.custom-file-label::after {
    height: auto !important;
    padding: 10px 12px !important;
    line-height: 1.5 !important;
}

/* Ensure modal buttons are properly spaced */
.modal-footer {
    flex-wrap: wrap !important;
    justify-content: space-between !important;
}

/* Fix for date pickers and other special inputs */
input[type="date"], 
input[type="time"], 
input[type="datetime-local"] {
    height: auto !important;
    padding: 10px 12px !important;
}

/* Mobile-specific adjustments for proper spacing */
@media (max-width: 768px) {
    /* Add more space between header and management sections */
    .admin-section {
        margin-top: 20px !important;
        padding-top: 15px !important;
    }
    
    /* Ensure first section has proper spacing */
    .admin-section:first-of-type {
        margin-top: 25px !important;
    }
    
    /* Ensure header has proper bottom spacing */
    header {
        margin-bottom: 20px !important;
    }
    
    /* Ensure content has padding to account for fixed nav */
    main {
        padding-bottom: 0px !important;
    }
}

/* Force all tables to be completely hidden ONLY in mobile view */
@media (max-width: 768px) {
    table, .table-responsive, .table, .table-striped, .table-bordered, .table-hover, .table-sm {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
}

/* Make sure tables are visible in desktop mode */
@media (min-width: 769px) {
    table, .table-responsive, .table, .table-striped, .table-bordered, .table-hover, .table-sm {
        display: table !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        pointer-events: auto !important;
    }
}

/* Desktop-specific styling improvements */
@media (min-width: 769px) {
    /* Make only the management content 80% wide */
    main, 
    .container-fluid, 
    .dashboard-content,
    .admin-section {
        width: 80% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Fix positioning for all admin sections */
    .admin-section {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        padding-top: 10px !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    /* Fix spacing between header and content */
    header {
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
    }
    
    /* Reduce space between navigation and sections */
    #adminNav, #raceDayNav {
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
        padding-top: 5px !important;
    }
    
    /* Minimize main content spacing */
    main {
        margin-top: 10px !important;
        padding-top: 5px !important;
    }
    
    /* Reduce section heading size to save vertical space */
    .admin-section h2:not(.base-header-titles) {
        margin-top: 5px !important;
        margin-bottom: 10px !important;
        font-size: 1.5rem !important;
    }
    
    /* Remove the header width constraint */
    header .header-content {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Make sure tables are visible and properly styled in desktop mode */
    table, .table-responsive, .table, .table-striped, .table-bordered, .table-hover, .table-sm {
        display: table !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        pointer-events: auto !important;
        margin-bottom: 20px !important;
        border-collapse: collapse !important;
    }
    
    /* Ensure table fits within container */
    .table-container {
        width: 100% !important;
        overflow-x: auto !important;
        margin-bottom: 20px !important;
    }
    
    /* Make sure the fish section is properly positioned */
    #fish.admin-section {
        margin-top: 15px !important;
        padding-top: 10px !important;
    }
    
    /* Ensure all sections are properly displayed */
    .admin-section.hidden {
        display: none !important;
    }
    
    /* Ensure proper spacing for section content */
    .admin-section > * {
        margin-top: 5px !important;
    }
}

/* Ensure proper spacing for section content */
.admin-section > * {
    margin-top: 5px !important;
}

/* Loading indicator for mobile refreshes */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Angler photo styling */
.angler-photo-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
}

.angler-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Admin angler photo: 90px, 1px solid #caee00, round, cover */
.angler-photo-admin {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid #caee00;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    display: block;
}



/* Add/Edit Fish Modal - Dashed Borders */
#fishForm .file-group,
#fishForm .form-checkbox {
    border: 2px dashed #caee00;
    border-radius: 7px;
    padding: 12px 10px;
    background: rgba(0,0,0,0.12);
    margin-bottom: 12px;
}

/* Photo item styling */
.photo-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    padding-bottom: 15px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Center align specific content types */
.item-value img {
    display: block;
    margin: 0 auto;
}

.angler-photo-container {
    text-align: center;
    margin-bottom: 0;
}

.angler-photo {
    margin: 0 auto;
}

/* Mobile-specific CSS override to force .admin-section, .mobile-card-container, and .accordion-card to be visible and properly displayed in mobile view */
@media (max-width: 768px) {
  .admin-section,
  .admin-section:not(.hidden),
  .mobile-card-container,
  .accordion-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-height: none !important;
    height: auto !important;
    width: 100% !important;
    z-index: 10 !important;
  }
}

/* Mobile race accordion: labels yellow, numbers white */
@media (max-width: 768px) {
  .mobile-angler-card .mobile-card-points {
    color: #caee00 !important;
  }
  .mobile-angler-card .mobile-card-points b {
    color: #fff !important;
    filter: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
    background: transparent !important;
  }
  .mobile-angler-card .mobile-card-bonuses-row span {
    color: #caee00 !important;
  }
  .mobile-angler-card .mobile-card-bonuses-row span b {
    color: #fff !important;
    filter: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
    background: transparent !important;
  }
}

/* Center the Fish Pics label and thumbnails in mobile view */
@media (max-width: 768px) {
  .mobile-angler-card .mobile-fish-pics-label {
    display: block;
    width: 100%;
    text-align: center !important;
    margin: 0 auto 0.3rem auto !important;
    font-size: 1.05rem;
  }
  .mobile-angler-card .mobile-fish-pics-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 0.4rem;
    width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 768px) {
    body main {
      padding-bottom: 800px !important;
      overflow-x: hidden !important;
    }
  }