/* Proximity Nudge Core Styles */

:root {
    --pn-primary: #ff4757; /* Hotspot Red */
    --pn-bg: #f1f2f6;
    --pn-text: #2f3542;
    --pn-white: #ffffff;
}


.pn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.pn-modal-content {
    background: #ffffff;
    width: 100%;
    /* height: 100vh; */
    min-height: 95vh !important;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    animation: pnSlideUp 0.3s ease-out;
    position: relative; /* Ensure content stacks correctly */
}

input#pn-radius-slider {
    background: #ebebeb;
    border-radius: 10px;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control {
    display: none;
}

.pn-form-group-inline {
    justify-self: center;
}

.leaflet-bottom.leaflet-right {
    display: none;
}

.pn-modal-header {
    background: var(--pn-primary, #ff4757);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pn-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 600;
}

.pn-modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.pn-modal-close:hover {
    opacity: 1;
}

/* Inbox Item Styling */
.pn-inbox-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
    transition: background 0.2s;
}

.pn-inbox-item:hover {
    background: #f9f9f9;
}

.pn-inbox-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid #eee;
    flex-shrink: 0;
}

/* Animation */
@keyframes pnSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Map Container */
#pn-map-wrapper {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
            width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    background: #3e435a;

}

#pn-map-container {
    background-color: #eee; /* Placeholder grey until map loads */

        min-height: 70vh;
        max-height: 90vh;
}

/* Status Pulse on Map */
#pn-map-status {
    position: absolute;
    top: 20px; /* Moved down slightly for better visibility */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #ff4757;
    padding: 10px 20px;
    border-radius: 30px; /* Pill shape */
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2000; /* High Z-Index to beat Leaflet */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: none; /* JS handles the display */
    pointer-events: none; /* Clicks pass through to the map */
}

.pn-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--pn-primary);
    border-radius: 50%;
    margin-right: 5px;
    animation: pn-pulse-animation 1.5s infinite;
}

@keyframes pn-pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* Forms & Cards */
.pn-card {
    background: var(--pn-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.pn-form-group {
    margin-bottom: 15px;
}

.pn-btn-primary {
    background-color: var(--pn-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
}

/* Toggle Switch */
.pn-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.pn-switch input { opacity: 0; width: 0; height: 0; }

.pn-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.pn-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .pn-slider { background-color: var(--pn-primary); }
input:checked + .pn-slider:before { transform: translateX(26px); }

/* Nudge Feed */
.pn-feed-container {
    background: var(--pn-white);
    border-radius: 12px;
    padding: 15px;
}

#pn-nearby-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pn-empty-state {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.pn-face-marker div {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* --- CHAT MODAL STYLES --- */

.pn-chat-content {
    height: 80vh; /* Taller for chat */
    display: flex;
    flex-direction: column;
}

.pn-chat-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#pn-chat-messages {
    flex: 1;
    background: #f9f9f9;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message Bubbles */
.pn-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.pn-msg-sent {
    align-self: flex-end;
    background-color: var(--pn-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.pn-msg-received {
    align-self: flex-start;
    background-color: #e4e6eb;
    color: #050505;
    border-bottom-left-radius: 4px;
}

.pn-msg-time {
    display: block;
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

/* Chat Input Area */
.pn-chat-input-area {
    padding: 10px;
    border-top: 1px solid #ddd;
    background: white;
    display: flex;
    gap: 10px;
}

#pn-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#pn-chat-send {
    background: var(--pn-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

/* Utility Buttons */
.pn-btn-xs {
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}
.pn-btn-danger { background-color: #ff6b6b; color: white; }


/* --- Floating Profile Button --- */
#pn-floating-profile-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Above Leaflet controls */
    background-color: white;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#pn-floating-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background-color: #f8f9fa;
}

/* --- Disabled Nudge Button (Grey) --- */
.pn-btn-disabled {
    background-color: #bdc3c7 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

/* Modal Body Padding Fix */
.pn-modal-body {
    background: #fff;
}

/* --- Profile Photo UI --- */
.pn-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.pn-photo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 5px solid #ffffff; /* Nice white border */
    overflow: hidden;
}

.pn-profile-img-lg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The dark overlay that appears on click/hover */
.pn-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s;
}

.pn-btn-overlay {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    width: 80px;
}

.pn-btn-overlay:hover {
    background: #f1f1f1;
}

.pn-helper-text {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* --- APP-LIKE FORM STYLES --- */

/* Modal Improvements */
.pn-profile-content {
    max-height: 90vh; /* Don't overflow screen height */
    overflow-y: auto; /* Scrollable body */
    background: #f4f5f7; /* Light grey app background */
}

.pn-modal-body {
    padding: 20px;
}

/* Sections */
.pn-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #636e72;
    text-transform: uppercase;
    margin: 20px 0 10px 0;
    letter-spacing: 0.5px;
}

.pn-section-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

/* Inputs */
.pn-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 5px;
    transition: border 0.2s;
}

.pn-input:focus {
    border-color: var(--pn-primary);
    outline: none;
}

.pn-input-disabled {
    width: 100%;
    padding: 10px;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #777;
}

/* Grid System for Rows */
.pn-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.pn-col {
    flex: 1;
}

/* Labels */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
}

/* Checkboxes */
.pn-checkbox-sm {
    font-size: 12px;
    color: #636e72;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Interests */
.pn-interest-row {
    margin-bottom: 8px;
}

.pn-btn-text {
    background: none;
    border: none;
    color: var(--pn-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    font-size: 14px;
}

/* Buttons */
.pn-btn-block {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
}

.pn-btn-outline {
    background: white;
    border: 1px solid #b2bec3;
    color: #2d3436;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.pn-btn-sm {
    background: #2d3436;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}

/* MAP POPUP STYLES (The Card) */
.pn-map-card {
    text-align: center;
    min-width: 180px;
}
.pn-map-card strong {
    font-size: 16px;
    display: block;
    margin-bottom: 2px;
}
.pn-map-meta {
    font-size: 12px;
    color: #636e72;
    margin-bottom: 8px;
}
.pn-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 8px 0;
}
.pn-tag {
    background: #e1f0fa;
    color: #2980b9;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* --- Chats Button (Top Right) --- */
#pn-btn-chats {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: white;
    color: #2f3542;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

#pn-btn-chats:hover {
    transform: scale(1.05);
}

/* --- Conversation List --- */
.pn-conv-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.pn-conv-item:hover {
    background: #f9f9f9;
}

.pn-conv-info {
    flex: 1;
    padding-left: 15px;
}

.pn-conv-name {
    font-size: 15px;
    margin-bottom: 2px;
    display: block;
}

.pn-conv-preview {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Bold Unread */
.pn-unread-bold .pn-conv-name,
.pn-unread-bold .pn-conv-preview {
    font-weight: 800;
    color: #2f3542;
}

/* --- Ticks in Chat --- */
.pn-msg-ticks {
    display: inline-block;
    font-size: 10px;
    margin-left: 5px;
    letter-spacing: -3px; /* Ticks closer together */
    font-weight: bold;
}

.pn-tick-delivered {
    color: #3498db; /* Blue for 1 tick */
}

.pn-tick-read {
    color: #2ecc71; /* Green for 2 ticks */
}

/* --- Hotspot List Styles --- */
.pn-hotspot-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.pn-hotspot-info {
    flex: 1;
}

.pn-hotspot-name {
    font-size: 16px;
    font-weight: 700;
    color: #2f3542;
    margin-bottom: 4px;
    display: block;
}

.pn-hotspot-meta {
    font-size: 13px;
    color: #a4b0be;
    margin-bottom: 6px;
}

.pn-action-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pn-action-btn:disabled {
    background: #dfe4ea;
    color: #a4b0be;
    cursor: not-allowed;
}

/* Secondary XS Button (Grey/Orange) */
.pn-btn-secondary {
    background-color: #fab1a0;
    color: #2d3436;
}

/* Blocked List Items */
.pn-blocked-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.pn-btn-unblock {
    background: white;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.pn-btn-unblock:hover {
    background: #f1f1f1;
}

/* --- APP HUB NAVIGATION --- */
.pn-tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
}

.pn-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    cursor: pointer;
    font-size: 20px; /* Icon size */
    color: #b2bec3;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pn-tab-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.pn-tab-btn:hover {
    background: #f1f2f6;
    color: #636e72;
}

.pn-tab-btn.active {
    color: #ff4757;
    border-bottom-color: #ff4757;
}

/* Ensure views fill the modal but scroll internally */
.pn-hub-view {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* --- FIXED BOTTOM TOOLBAR --- */


.pn-bar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    color: #2f3542;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform 0.2s, color 0.2s;
}

.pn-bar-btn:hover {
    color: #ff4757;
    transform: translateY(-2px);
}

.pn-icon {
    font-size: 18px;
    line-height: 1;
}

/* Vertical Divider */
.pn-bar-divider {
    width: 1px;
    height: 24px;
    background: #eee;
    margin: 0 5px;
}


.pn-map-toolbar {
    margin-top: 5px;
    bottom: 25px;
    left: 0;
    /* transform: translateX(-50%); */
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    justify-content: space-around;
        margin: 3%;
margin-bottom: 20px;
}

/* --- "ME" Marker on Map --- */
.pn-me-marker div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    /* Distinctive Border (Blue) */
    border: 3px solid #3498db; 
    /* Subtle Pulse/Glow */
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
    transition: transform 0.2s;
}

.pn-me-marker:hover div {
    transform: scale(1.1);
}

/* Top Right Container */
.pn-top-right-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Right align them */
    gap: 10px;
}

#pn-btn-chats {
    /* Reset position since parent handles it now */
    position: static; 
    background-color: white;
    color: #2f3542;
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

/* Visibility Toggle Styles */
#pn-visibility-toggle {
    background: white;
    padding: 8px 12px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2f3542;
    transition: all 0.3s;
    border: 2px solid white;
}

/* Ghost Mode Active State */
#pn-visibility-toggle.active {
    background: #2f3542;
    color: white;
    border-color: #2f3542;
}

#pn-vis-icon {
    font-size: 16px;
}


/* --- SUBSCRIPTION STYLES --- */
.pn-plan-card {
    background: #f1f2f6;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #dfe6e9;
}

.pn-plan-premium {
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    color: white;
    border: none;
}

.pn-plan-label {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.7;
    display: block;
    margin-bottom: 2px;
}

.pn-price-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 10px;
    border: 1px solid #eee;
}

.pn-price {
    font-size: 48px;
    font-weight: 800;
    color: #2f3542;
    margin: 10px 0 20px 0;
}

.pn-price .currency {
    font-size: 24px;
    vertical-align: super;
}

.pn-price .period {
    font-size: 16px;
    color: #b2bec3;
    font-weight: 400;
}

.pn-benefits {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    text-align: left;
    margin-left: 20px;
}

.pn-benefits li {
    margin-bottom: 10px;
    font-size: 15px;
}


