/* Pawpoint - Main Styles */

@font-face {
    font-family: 'Behove';
    src: url('../fonts/Behove.woff2') format('woff2'),
         url('../fonts/Behove.ttf') format('truetype'),
         url('../fonts/Behove.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --danger-color: #f44336;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --background-light: #f5f5f5;
    --navbar-height: 56px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: #fff;
}

/* Navigation Styles */
.navbar {
    min-height: var(--navbar-height);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: white !important;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.85) !important;
}

.nav-link:hover {
    color: white !important;
}

.nav-link.active {
    color: white !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
}

/* Alert Container */
.alert-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    width: 100%;
}

.alert-container .alert {
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Compact alert style */
.alert-compact {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.alert-compact .btn-close {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.375rem;
    font-size: 0.75rem;
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.alert-compact .btn-close:hover {
    opacity: 1;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--danger-color);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1060;
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    max-width: calc(100vw - 40px);
}

/* Adjust offline indicator position on mobile */
@media (max-width: 576px) {
    .offline-indicator {
        bottom: 80px; /* Above bottom nav */
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}

.offline-queue-count {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    border-color: #45a049;
    color: white;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    border: none;
    background: transparent;
}

.btn-link:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Button sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Button with icon */
.btn svg,
.btn i {
    flex-shrink: 0;
}

/* Disabled button state */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Card Styles */
.card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-footer {
    background-color: var(--background-light);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    object-fit: cover;
}

/* Card with clickable area */
.card-clickable {
    cursor: pointer;
    user-select: none;
}

.card-clickable:active {
    transform: scale(0.98);
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Form groups with better spacing */
.mb-3 {
    margin-bottom: 1.25rem !important;
}

/* Input groups */
.input-group {
    border-radius: 8px;
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.input-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Textarea resize handle */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* File input styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    background-color: var(--border-color);
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Floating Action Button (for mobile) */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    border-radius: 50%;
    background-color: #1a1b1c;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    overflow: hidden;
}

.fab:hover {
    background-color: #2a2b2c;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fab:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fab:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(26, 27, 28, 0.3);
}

.fab img {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

/* FAB with label */
.fab-extended {
    width: auto;
    padding: 0 1.5rem;
    border-radius: 28px;
    gap: 0.5rem;
}

.fab-label {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Map Container */
#map {
    width: 100%;
    height: calc(100vh - var(--navbar-height));
}

/* Profile Photo */
.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-photo-lg {
    width: 120px;
    height: 120px;
}

/* Message Badge */
.message-badge {
    position: relative;
}

.message-badge .badge {
    position: absolute;
    top: -5px;
    right: -10px;
}

/* Map Marker Styles - Custom Pin Design */
.custom-map-pin-wrapper {
    background: transparent;
    border: none;
}

.map-pin-marker {
    position: relative;
    width: 50px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.map-pin-marker:hover {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    transform: translateY(-3px) scale(1.05);
}

.pin-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--pin-color, #4CAF50);
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pin-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transform: rotate(45deg);
    filter: brightness(0) invert(1);
}

.pin-point {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 20px solid var(--pin-color, #4CAF50);
    filter: brightness(0.9);
}

/* Legacy marker styles (if needed) */
.custom-marker-wrapper {
    background: transparent;
    border: none;
}

.custom-marker {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
    transition: transform 0.2s ease;
}

.custom-marker:hover {
    transform: rotate(-45deg) scale(1.1);
}

.marker-emoji {
    font-size: 20px;
    transform: rotate(45deg);
    display: block;
}

/* User Location Marker */
.user-location-wrapper {
    background: transparent;
    border: none;
}

.user-location-marker {
    font-size: 30px;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 2px 6px rgba(26, 135, 255, 0.6));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

/* Alternative user location with custom styling */
.user-location-dot {
    width: 20px;
    height: 20px;
    background-color: #1a87ff;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(26, 135, 255, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(26, 135, 255, 0.3),
                    0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(26, 135, 255, 0.1),
                    0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Pin Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 280px;
    max-width: 320px;
}

.pin-popup {
    font-family: inherit;
}

.pin-popup-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--border-color);
}

.pin-popup-header h6 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.pin-popup-photo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.pin-popup-body {
    padding: 14px 16px;
}

.pin-popup-body p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.pin-popup-meta {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
}

.pin-popup-meta small {
    font-size: 0.8rem;
}

.pin-popup-actions {
    display: flex;
    gap: 8px;
}

.pin-popup-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}

/* Map Loading Overlay */
#map-loading {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Leaflet Attribution */
.leaflet-control-attribution {
    font-size: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 2px 6px;
}

/* Leaflet Popup Close Button */
.leaflet-popup-close-button {
    font-size: 22px;
    padding: 6px 10px;
    color: #666;
    transition: color 0.2s ease;
}

.leaflet-popup-close-button:hover {
    color: var(--danger-color);
}

/* Leaflet Zoom Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 20px;
    border: none !important;
    background-color: white;
    color: #333;
    transition: all 0.2s ease;
}

.leaflet-control-zoom a:hover {
    background-color: #1a1b1c;
    color: white;
}

.leaflet-control-zoom a:first-child {
    border-bottom: 1px solid #ddd;
}

/* Leaflet Popup Tip */
.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Temporary Marker (for pin creation) */
.temp-marker-wrapper {
    background: transparent;
    border: none;
}

.temp-marker {
    font-size: 40px;
    animation: bounce 1s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Improved temp marker with pulse effect */
.temp-marker-icon {
    width: 40px;
    height: 40px;
    animation: bounceAndPulse 1.5s infinite;
    filter: drop-shadow(0 4px 8px rgba(26, 27, 28, 0.5));
}

@keyframes bounceAndPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.1);
    }
}

/* Pin Drop Animation - Ripple Effect */
.pin-ripple {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid rgba(76, 175, 80, 0.6);
    pointer-events: none;
    z-index: 1000;
    animation: rippleEffect 1s ease-out forwards;
}

@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Pin Creation Modal */
#createPinModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#createPinModal .modal-header {
    background-color: var(--background-light);
    border-bottom: 2px solid var(--primary-color);
    border-radius: 12px 12px 0 0;
}

#createPinModal .modal-title {
    color: var(--text-dark);
    font-weight: 600;
}

#createPinModal .form-label {
    font-weight: 600;
    color: var(--text-dark);
}

#createPinModal .alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

#createPinModal .img-thumbnail {
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

/* Photo Preview */
#photoPreview {
    margin-top: 10px;
}

#photoPreviewImg {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Location Info Alert */
#locationInfo {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
}

#locationInfo strong {
    color: var(--primary-color);
}

/* Comments Section Styles */
.pin-comments-section {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.pin-comments-section h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.comment-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    border: 1px solid var(--border-color);
}

.avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.comment-content {
    font-size: 0.85rem;
}

.comment-header {
    margin-bottom: 2px;
}

.comment-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.comment-text {
    color: var(--text-light);
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-form {
    margin-top: 10px;
}

.comment-form .input-group {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.comment-form input {
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.comment-form input:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.comment-form button {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

/* Scrollbar Styles for Comments List */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Profile Page Styles */
.nav-profile-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-photo-xl {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pin-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.pin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pin-card .card-img-top {
    border-bottom: 1px solid var(--border-color);
}

.pin-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0;
}

.pin-card .card-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pin-card .btn-group {
    flex-shrink: 0;
}

.pin-card .btn-group .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Profile Edit Modals */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--background-light);
    border-bottom: 2px solid var(--primary-color);
    border-radius: 12px 12px 0 0;
}

.modal-title {
    color: var(--text-dark);
    font-weight: 600;
}

/* Photo Preview in Modal */
#photoPreview .img-thumbnail {
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

/* Profile Stats */
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 1rem 0;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
}

.profile-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Links in Comments and Popups */
.comment-username {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.2s ease;
}

.comment-username:hover {
    color: #45a049;
    text-decoration: underline !important;
}

.comment-avatar a {
    display: block;
    line-height: 0;
}

.comment-avatar a:hover img,
.comment-avatar a:hover .avatar-placeholder {
    opacity: 0.8;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.pin-popup-header a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.pin-popup-header a:hover {
    color: #45a049;
    text-decoration: underline !important;
}

/* Messaging System Styles */
.messages-container {
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
}

.conversations-panel {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.conversation-item:hover {
    background-color: var(--background-light);
}

.conversation-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid var(--primary-color);
}

.conversation-item img {
    object-fit: cover;
}

.message-thread-panel {
    height: 100%;
    overflow: hidden;
}

#messageThread {
    height: 100%;
}

.thread-header {
    flex-shrink: 0;
}

.thread-header img {
    object-fit: cover;
}

#messagesContainer {
    overflow-y: auto;
    flex: 1;
    background-color: #fafafa;
}

.message-bubble {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-mine {
    text-align: right;
}

.message-theirs {
    text-align: left;
}

.message-content {
    display: inline-block;
    word-wrap: break-word;
    word-break: break-word;
}

.message-content p {
    margin: 0;
}

.message-input-container {
    flex-shrink: 0;
}

#messageInput {
    resize: none;
    min-height: 60px;
    max-height: 150px;
}

#messageInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Scrollbar Styles for Messages Container */
#messagesContainer::-webkit-scrollbar {
    width: 8px;
}

#messagesContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#messagesContainer::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#messagesContainer::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Scrollbar Styles for Conversations List */
.conversations-list::-webkit-scrollbar {
    width: 8px;
}

.conversations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.conversations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.conversations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* PWA Install Button Styles */
.pwa-install-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

.pwa-install-button svg {
    flex-shrink: 0;
}

.pwa-install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.pwa-install-button:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Floating Install Button (for pages without navbar) */
.pwa-install-floating {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* iOS Install Instructions Modal */
.ios-install-instructions {
    text-align: center;
}

.ios-install-instructions h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.ios-install-instructions ol {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.ios-install-instructions li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
}

.ios-install-instructions svg {
    vertical-align: middle;
    margin: 0 4px;
}

/* Profile Photo Styles */
.profile-photo {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    background-color: #f0f0f0;
}

.profile-photo-sm {
    width: 40px;
    height: 40px;
}

.profile-photo-md {
    width: 60px;
    height: 60px;
}

.profile-photo-lg {
    width: 100px;
    height: 100px;
}

.profile-photo-xl {
    width: 120px;
    height: 120px;
}

/* Profile card specific styles */
.profile-card .card-body {
    padding: 1.25rem;
}

.profile-photo-wrapper {
    position: relative;
    display: inline-block;
}

.profile-photo-wrapper .btn {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Pin cards in profile */
.pin-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e0e0e0;
}

.pin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pin-card .card-body {
    padding: 1rem;
}

.pin-card-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.pin-card-actions {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.pin-card-actions .btn {
    font-weight: 500;
}

.pin-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
