/* General Form Styles */
.gatherer-form { max-width: 600px;
margin: 0 auto; padding: 20px; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 5px; }
.gatherer-form p { margin-bottom: 15px;
}
.gatherer-form label { font-weight: bold; }
.gatherer-form input[type="text"], .gatherer-form textarea, .gatherer-form select { width: 100%; padding: 8px; box-sizing: border-box;
}
.gatherer-form button, .gatherer-form input[type="submit"] { padding: 10px 15px; background-color: #0073aa; color: #fff; border: none; border-radius: 3px; cursor: pointer;
}
.gatherer-form button:hover, .gatherer-form input[type="submit"]:hover { background-color: #005177; }

/* Map Styles */
.gatherer-custom-marker {
    width: 100%;
    height: 100%;
background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #0073aa;
    box-sizing: border-box;
/* Ensures border is inside the width/height */
}
.gatherer-marker-pending { box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.9) !important;
}
.gatherer-custom-marker:empty { background-color: #0073aa;
}

/* Default Map View Styles */
.gatherer-map-container { position: relative; width: 100%; }
.gatherer-map-wrapper { margin-bottom: 20px;
}
.gatherer-map-controls { padding: 10px 15px;
background-color: #f7f7f7; border: 1px solid #ddd; border-bottom: none; display: flex; flex-wrap: wrap; gap: 15px;
align-items: center;
}
.gatherer-map-controls label { font-weight: bold; margin-right: 5px; }
.gatherer-map-controls .gatherer-status-filters label { font-weight: normal;
}
.gatherer-map-controls .gatherer-status-filters input { margin-right: 3px;
}
#gatherer_map_canvas { width: 100%; height: 75vh; border: 1px solid #ddd;
} /* Restored to 75vh */

/* --- MODIFIED: Group List Styles for Split-Card Effect --- */
.gatherer-group-list-wrap { max-width: 700px; margin: 20px auto; padding: 10px;
}
.gatherer-group-controls { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
#gatherer-group-search, #gatherer-group-policy { padding: 6px 10px; border-radius: 4px;
border: 1px solid #ccc; }
.gatherer-group-list { list-style: none; padding: 0; margin: 0; }

.gatherer-group-item {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden; /* Important for containing children */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.gatherer-group-item-inner {
    display: flex;
    min-height: 150px; /* Give a consistent minimum height */
}

/* Style for items WITHOUT a thumbnail */
.gatherer-group-item.no-thumbnail .gatherer-group-content {
    background-color: #f9f9f9;
    width: 100%;
}

/* Image background container */
.gatherer-group-image-bg {
    flex-basis: 35%; /* Image takes 35% of the width */
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Content container (takes remaining space) */
.gatherer-group-content {
    flex-basis: 65%; /* Content takes 65% of the width */
    flex-shrink: 0;
    padding: 20px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.gatherer-group-title {
    margin: 0 0 0.5em 0;
    font-size: 1.3em;
}
.gatherer-group-title a {
    text-decoration: none;
    color: #1d2327;
}
.gatherer-group-title a:hover {
    color: #0073aa;
}

.gatherer-group-excerpt {
    margin: 0 0 1em 0;
    color: #333;
    flex-grow: 1; /* Allows excerpt to push action button down */
}
.gatherer-group-excerpt p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.gatherer-group-actions {
    margin-top: auto; /* Pushes button to the bottom */
}

.gatherer-group-btn {
    padding: 8px 14px;
    font-size: 0.9em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #21759b;
    color: white;
    text-decoration: none;
    display: inline-block;
}
.gatherer-group-btn[disabled] {
    background: #ccc;
    cursor: default;
}

/* Admin Styles */
.gatherer-category-icon-preview { display: inline-block; width: 40px;
height: 40px; background-size: cover; vertical-align: middle; border-radius: 50%; border: 1px solid #ddd; background-color: #f0f0f0; margin: 0 10px;
}
#gatherer-group-member-list, #gatherer-pending-requests { list-style: disc; padding-left: 20px; }
#gatherer-group-member-list li, #gatherer-pending-requests li { margin-bottom: 5px;
}
#gatherer-group-member-list .remove-member, #gatherer-pending-requests .approve-request, #gatherer-pending-requests .deny-request { text-decoration: none; margin-left: 8px; color: #a00; }
#gatherer-pending-requests .approve-request { color: #070;
}
.gatherer-icon-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.gatherer-icon-actions .gatherer-icon-crop-btn { margin-top: 0;
}

/* Full Screen Map Styles */
body.gatherer-body-no-scroll { overflow: hidden !important; }
.gatherer-map-container.fullscreen { position: fixed; top: 0; left: 0; width: 100%;
height: 100%; z-index: 100000; background-color: #fff; }
body.admin-bar .gatherer-map-container.fullscreen { top: 32px; height: calc(100% - 32px);
} /* Adjust for WP Admin Bar */
.gatherer-map-container.fullscreen .gatherer-map-wrapper { height: 100%; display: flex; flex-direction: column; margin-bottom: 0;
}
.gatherer-map-container.fullscreen #gatherer_map_canvas { height: 100%; flex-grow: 1; border: none; }
#gatherer-map-fullscreen-btn { position: absolute; top: 10px; right: 10px; z-index: 100001;
background: #fff; border: 1px solid #ccc; border-radius: 4px; width: 34px; height: 34px; line-height: 32px; text-align: center; font-size: 24px; cursor: pointer;
box-shadow: 0 1px 5px rgba(0,0,0,0.4); }
#gatherer-map-fullscreen-btn:hover { background: #f4f4f4; }

/* --- Single Group Page Tabs --- */
.gatherer-group-tabs-container {
    margin-top: 30px;
border-top: 1px solid #ddd;
    padding-top: 20px;
}

ul.gatherer-group-tabs-nav {
    list-style: none !important;
    padding: 0 !important;
margin: 0 0 20px 0 !important;
    border-bottom: 1px solid #ddd;
    display: flex;
}

ul.gatherer-group-tabs-nav li {
    margin: 0 10px -1px 0 !important;
    padding: 0 !important;
    list-style-type: none;
}

ul.gatherer-group-tabs-nav li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
color: #0073aa;
}

ul.gatherer-group-tabs-nav li a.active {
    background-color: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    border-radius: 4px 4px 0 0;
color: #333;
    font-weight: bold;
}

.gatherer-tab-pane {
    display: none;
}

.gatherer-tab-pane.active {
    display: block;
}

/* --- Admin Group Settings Tabs --- */
.gatherer-tabs-wrapper { display: flex; gap: 20px; }
ul.gatherer-tabs-nav { list-style: none !important;
padding: 0 !important; margin: 0 !important; flex-basis: 160px; flex-shrink: 0; }
ul.gatherer-tabs-nav li { margin: 0 !important; padding: 0 !important;
list-style-type: none; }
ul.gatherer-tabs-nav li a { display: flex; align-items: center; gap: 8px; padding: 10px; text-decoration: none; color: #2271b1;
border: 1px solid #c3c4c7; border-right: none; margin-bottom: -1px; background: #f6f7f7; }
ul.gatherer-tabs-nav li a:hover { background-color: #f0f0f1;
}
ul.gatherer-tabs-nav li a.active { background-color: #fff; border-right-color: #fff; color: #1d2327; font-weight: bold; }
ul.gatherer-tabs-nav li a .dashicons { font-size: 20px;
}
ul.gatherer-tabs-nav li a .awaiting-mod { display: inline-block; background-color: #d63638; color: #fff; font-size: 9px; line-height: 1.6; font-weight: 600; padding: 0 6px;
border-radius: 10px; margin-left: auto; }
.gatherer-tabs-content { flex-grow: 1; border: 1px solid #c3c4c7; padding: 1px 20px; background: #fff;
} /* 1px padding to collapse border */
.gatherer-tabs-content .gatherer-tab-pane { display: none; padding-bottom: 20px; }
.gatherer-tabs-content .gatherer-tab-pane.active { display: block;
}
.gatherer-user-list { max-height: 200px; overflow-y: auto; border: 1px solid #c3c4c7; padding: 10px; background-color: #fff;
}

/* --- Frontend Single Group Page Blocks --- */
.group-content-block {
    margin-top: 40px;
    padding-top: 20px;
border-top: 1px solid #eee;
}

/*
=================================
Single Group Page Enhancements
=================================
*/

/* Main wrapper for the single group article */
.gatherer-group-single {
    background: #fff;
border: 1px solid #e0e0e0;
    padding: 2em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-top: 2em;
}

/* Public Summary / Excerpt Box */
.gatherer-group-public-summary {
    background-color: #f6f7f7;
    border-left: 4px solid #0073aa;
    padding: 15px 20px;
margin: 0 0 2em 0;
    font-size: 1.1em;
    font-style: italic;
}

/* Titles for each content block (Description, Map, Members) */
.group-content-block-title {
    font-size: 1.5em;
border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Container for each block */
.group-content-block {
    margin-top: 40px;
padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Special styling for the member list */
.group-content-block ul.gatherer-group-member-list {
    list-style: none;
padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.group-content-block ul.gatherer-group-member-list li {
    padding: 10px;
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
}

/* --- Custom Marker Cluster Styles --- */
.gatherer-cluster-parent .gatherer-cluster-icon {
    width: 100%;
    height: 100%;
    color: #fff;
border-radius: 50%;
    text-align: center;
    font-weight: bold;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
background-size: cover;
    background-position: center center;
    border: 2px solid white;
    background-color: #666;
/* Fallback color if no icon */
    box-sizing: border-box;
/* Ensures border is inside the width/height */
}

.gatherer-cluster-parent .gatherer-cluster-icon span {
    background-color: rgba(0, 0, 0, 0.6);
/* Semi-transparent background for number */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
height: 100%;
    font-size: 14px;
}

/* --- ADDED: User Dashboard Styles --- */
.gatherer-dashboard {
    max-width: 900px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gatherer-dashboard-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.gatherer-dashboard-profile .profile-avatar img {
    border-radius: 50%;
}

.gatherer-dashboard-profile .profile-info h3 {
    margin: 0 0 5px;
    font-size: 1.8em;
}

.gatherer-dashboard-profile .profile-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.gatherer-dashboard-profile .profile-stats {
    margin: 10px 0;
    display: flex;
    gap: 20px;
    font-size: 0.95em;
}

.gatherer-dashboard-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #f0f0f1;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    font-weight: 600;
}
.gatherer-dashboard-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.gatherer-dashboard-finds h3,
.gatherer-dashboard-groups h3,
.gatherer-dashboard-admin h3 {
    font-size: 1.6em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.gatherer-dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.gatherer-dashboard-table th, 
.gatherer-dashboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.gatherer-dashboard-table thead th {
    background-color: #f9f9f9;
    font-weight: 600;
}

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

.gatherer-dashboard-table .find-actions a {
    text-decoration: none;
    font-size: 1.2em;
    margin-right: 10px;
}

.gatherer-dashboard-table .find-status-publish {
    color: #2271b1;
    font-weight: 600;
}
.gatherer-dashboard-table .find-status-pending {
    color: #d63638;
    font-weight: 600;
}

/* --- User Dashboard Tabs --- */
.gatherer-dashboard-layout {
    display: flex;
    gap: 30px;
}

ul.gatherer-dashboard-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-basis: 200px;
    flex-shrink: 0;
}

ul.gatherer-dashboard-nav li {
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    list-style-type: none;
}

ul.gatherer-dashboard-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #2271b1;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
    font-weight: 600;
}

ul.gatherer-dashboard-nav a:hover {
    background-color: #fff;
    border-color: #ccc;
}

ul.gatherer-dashboard-nav a.active {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.gatherer-dashboard-content {
    flex-grow: 1;
}

.gatherer-dashboard-pane {
    display: none;
}

.gatherer-dashboard-pane.active {
    display: block;
}

/* Responsive layout for dashboard tabs */
@media (max-width: 768px) {
    .gatherer-dashboard-layout {
        flex-direction: column;
    }
    ul.gatherer-dashboard-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        flex-basis: auto;
    }
    ul.gatherer-dashboard-nav li {
        margin: 0 !important;
        flex-grow: 1;
    }
    ul.gatherer-dashboard-nav a {
        text-align: center;
    }
}

/* --- Admin Achievement Fields --- */
.gatherer-tier-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}
.gatherer-tier-row input[type="text"] {
    flex-grow: 1;
}
.gatherer-tier-row .gatherer-remove-tier-btn {
    color: #b32d2e;
    border-color: #b32d2e;
    background: #f1f1f1;
}
.gatherer-tier-row .gatherer-remove-tier-btn:hover {
    color: #fff;
    background: #b32d2e;
}

/* --- User Achievements --- */
.gatherer-achievements-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.gatherer-achievement-badge {
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.gatherer-achievement-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}
.gatherer-achievement-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* --- Dashboard Stats --- */
.gatherer-dashboard-stats {
    display: flex;
    gap: 20px;
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 4px;
    margin: 2em 0;
}
.stat-item {
    flex-grow: 1;
    text-align: center;
}
.stat-item .stat-value {
    display: block;
    font-size: 2em;
    font-weight: 600;
    color: #0073aa;
}
.stat-item .stat-label {
    font-size: 0.9em;
    color: #555;
}

/* --- NEW: Private Notes Box --- */
.gatherer-private-notes-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #fffde7; /* Light yellow background */
    border: 1px solid #f0e68c;
    border-left: 5px solid #f0c400;
    border-radius: 4px;
}
.gatherer-private-notes-box h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
}

/* --- NEW: Leaderboard Styles --- */
.gatherer-leaderboard-wrap {
    max-width: 800px;
    margin: 2em auto;
}
.gatherer-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.gatherer-leaderboard-table th,
.gatherer-leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.gatherer-leaderboard-table thead th {
    background-color: #f6f7f7;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    color: #555;
}
.gatherer-leaderboard-table tbody tr:nth-child(odd) {
    background-color: #fdfdfd;
}
.gatherer-leaderboard-table tbody tr:hover {
    background-color: #f0f8ff;
}
.gatherer-leaderboard-table .rank-col {
    width: 10%;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
}
.gatherer-leaderboard-table .user-col {
    width: 50%;
}
.gatherer-leaderboard-table .points-col,
.gatherer-leaderboard-table .finds-col {
    width: 20%;
    text-align: center;
}
.leaderboard-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.leaderboard-user-info img.avatar {
    border-radius: 50%;
}
.leaderboard-display-name {
    font-weight: 500;
}
