/* ============================================================
   tribe-view.css — In-place tribe header & create tribe form
   ============================================================ */

/* ── Tribe View Header (replaces filter chips) ────────────── */

.tribe-view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.tribe-view-back {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.tribe-view-back:hover {
    background: #f3f4f6;
}

.tribe-view-icon {
    flex-shrink: 0;
}

.tribe-view-info {
    flex: 1;
    min-width: 0;
}

.tribe-view-name {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tribe-view-meta {
    font-size: 12px;
    color: #6b7280;
}

.tribe-view-new-post {
    background: none;
    border: 1px solid #10b981;
    color: #10b981;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.tribe-view-new-post:hover {
    background: #ecfdf5;
}

/* ── Create Tribe Form ────────────────────────────────────── */

.create-tribe-form {
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #10b981;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.slug-preview {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    margin-top: 4px;
}

.icon-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.icon-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.icon-option:hover {
    border-color: #10b981;
}
.icon-option.selected {
    border-color: #10b981;
    background: #ecfdf5;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.toggle-row label {
    margin: 0;
}
.toggle-label-sub {
    font-size: 12px;
    color: #9ca3af;
    font-weight: normal;
}

/* ── Tribe View Post Cards (author-focused) ───────────────── */

.tv-post-header {
    margin-bottom: 8px;
}

.tv-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tv-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tv-post-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.tv-post-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tv-post-author-name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}
.tv-post-author-name:hover {
    text-decoration: underline;
}

.tv-post-time {
    font-size: 12px;
    color: #9ca3af;
}

/* Add to public\css\tribe-view.css */

.tribe-view-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tribe-view-map-btn {
    background: none;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}

.tribe-view-map-btn:hover {
    background: #f9fafb;
    border-color: #10b981;
    color: #10b981;
}

/* Leaflet Custom Marker Styling */
.custom-map-marker {
    background: none;
    border: none;
}

.marker-cluster-inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #10b981;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s;
}

.marker-cluster-inner:hover {
    transform: scale(1.1);
}

.marker-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid white;
    border-radius: 50%;
}

#leafletMap {
    width: 100%;
    height: 100%;
    min-height: 400px;
    z-index: 1; /* Ensure map is below dropdowns but above background */
}

/* Fix for the leaflet container to ensure it fills the modal-body */
#mapContainer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Cluster circle base styling */
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
    transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}

/* Style for the Cluster circles (the groups of many users) */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
    background-color: rgba(16, 185, 129, 0.4) !important; /* Emerald green with transparency */
}

.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
    background-color: rgba(16, 185, 129, 0.8) !important; /* Solid emerald green */
    color: white !important;
    font-weight: bold;
}

/* Individual Marker Styling (with the photo) */
.marker-cluster-inner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden; /* Important for the photo image */
}

.marker-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 1.5px solid white;
    border-radius: 50%;
    z-index: 10;
}