/* Social Community Pro - Frontend Styles */

/* CSS Variables - Default to theme colors, can be overridden by admin settings */
:root {
    /* Colors - will be set by PHP or inherit from theme */
    --scp-primary: transparent; /* Blank/transparent primary text */
    --scp-secondary: #6b7280; /* Grey secondary */
    --scp-accent: #22c55e; /* Green hover/select */
    --scp-text: #111827; /* Default text color */
    --scp-background: transparent; /* Transparent background by default */
    --scp-card-background: #ffffff; /* White background for cards */
    --scp-border: #e5e7eb;
    
    /* Typography - will inherit from theme by default */
    --scp-font-family: inherit;
    --scp-font-size: inherit;
    --scp-font-weight-normal: inherit;
    --scp-font-weight-bold: inherit;
}

/* Dark Mode - Reverse colors like Facebook */
body.scp-dark-mode-active,
html.scp-dark-mode-active,
body.dark-mode,
html.dark-mode,
body[data-theme="dark"],
html[data-theme="dark"] {
    --scp-primary: transparent;
    --scp-secondary: #9ca3af; /* Lighter grey in dark mode */
    --scp-accent: #22c55e; /* Green stays same */
    --scp-text: #ffffff; /* White text in dark mode */
    --scp-background: transparent; /* Transparent background */
    --scp-card-background: #18191a; /* Dark background like Facebook */
    --scp-border: #3a3b3c; /* Dark border */
}

/* Global Box Sizing - Ensure all SCP elements respect margins */
.scp-profile-page *,
.scp-members-directory *,
.scp-groups-directory *,
.scp-user-card *,
.scp-group-card *,
.scp-member-card * {
    box-sizing: border-box;
}

/* Global Container Background Rules - Transparent/White by Default */
.scp-activity-item,
.scp-activity-form,
.scp-user-card,
.scp-group-card,
.scp-member-card,
.scp-profile-overview,
.scp-profile-tabs,
.scp-profile-tab-panel,
.scp-grid,
.scp-listings-grid,
.scp-listings-wrapper,
.scp-marketplace-listings-grid,
.scp-marketplace-listing-grid,
.scp-profile-groups-grid,
.scp-profile-pages-grid,
.scp-profile-communities-grid,
.scp-profile-events-grid,
.scp-media-gallery,
.scp-gallery-grid,
.scp-container,
.scp-card,
.scp-box,
.scp-panel,
.scp-widget {
    background: var(--scp-card-background, transparent) !important;
    color: var(--scp-text, #111827) !important;
}

/* Dark Mode for All Containers */
body.scp-dark-mode-active .scp-activity-item,
body.scp-dark-mode-active .scp-activity-form,
body.scp-dark-mode-active .scp-user-card,
body.scp-dark-mode-active .scp-group-card,
body.scp-dark-mode-active .scp-member-card,
body.scp-dark-mode-active .scp-profile-overview,
body.scp-dark-mode-active .scp-profile-tabs,
body.scp-dark-mode-active .scp-profile-tab-panel,
body.scp-dark-mode-active .scp-grid,
body.scp-dark-mode-active .scp-listings-grid,
body.scp-dark-mode-active .scp-listings-wrapper,
body.scp-dark-mode-active .scp-marketplace-listings-grid,
body.scp-dark-mode-active .scp-marketplace-listing-grid,
body.scp-dark-mode-active .scp-profile-groups-grid,
body.scp-dark-mode-active .scp-profile-pages-grid,
body.scp-dark-mode-active .scp-profile-communities-grid,
body.scp-dark-mode-active .scp-profile-events-grid,
body.scp-dark-mode-active .scp-media-gallery,
body.scp-dark-mode-active .scp-gallery-grid,
body.scp-dark-mode-active .scp-container,
body.scp-dark-mode-active .scp-card,
body.scp-dark-mode-active .scp-box,
body.scp-dark-mode-active .scp-panel,
body.scp-dark-mode-active .scp-widget,
html.scp-dark-mode-active .scp-activity-item,
html.scp-dark-mode-active .scp-activity-form,
html.scp-dark-mode-active .scp-user-card,
html.scp-dark-mode-active .scp-group-card,
html.scp-dark-mode-active .scp-member-card,
html.scp-dark-mode-active .scp-profile-overview,
html.scp-dark-mode-active .scp-profile-tabs,
html.scp-dark-mode-active .scp-profile-tab-panel,
html.scp-dark-mode-active .scp-grid,
html.scp-dark-mode-active .scp-listings-grid,
html.scp-dark-mode-active .scp-listings-wrapper,
html.scp-dark-mode-active .scp-marketplace-listings-grid,
html.scp-dark-mode-active .scp-marketplace-listing-grid,
html.scp-dark-mode-active .scp-profile-groups-grid,
html.scp-dark-mode-active .scp-profile-pages-grid,
html.scp-dark-mode-active .scp-profile-communities-grid,
html.scp-dark-mode-active .scp-profile-events-grid,
html.scp-dark-mode-active .scp-media-gallery,
html.scp-dark-mode-active .scp-gallery-grid,
html.scp-dark-mode-active .scp-container,
html.scp-dark-mode-active .scp-card,
html.scp-dark-mode-active .scp-box,
html.scp-dark-mode-active .scp-panel,
html.scp-dark-mode-active .scp-widget,
body.dark-mode .scp-activity-item,
body.dark-mode .scp-activity-form,
body.dark-mode .scp-user-card,
body.dark-mode .scp-group-card,
body.dark-mode .scp-member-card,
body.dark-mode .scp-profile-overview,
body.dark-mode .scp-profile-tabs,
body.dark-mode .scp-profile-tab-panel,
body.dark-mode .scp-grid,
body.dark-mode .scp-listings-grid,
body.dark-mode .scp-listings-wrapper,
body.dark-mode .scp-marketplace-listings-grid,
body.dark-mode .scp-marketplace-listing-grid,
body.dark-mode .scp-profile-groups-grid,
body.dark-mode .scp-profile-pages-grid,
body.dark-mode .scp-profile-communities-grid,
body.dark-mode .scp-profile-events-grid,
body.dark-mode .scp-media-gallery,
body.dark-mode .scp-gallery-grid,
body.dark-mode .scp-container,
body.dark-mode .scp-card,
body.dark-mode .scp-box,
body.dark-mode .scp-panel,
body.dark-mode .scp-widget,
html.dark-mode .scp-activity-item,
html.dark-mode .scp-activity-form,
html.dark-mode .scp-user-card,
html.dark-mode .scp-group-card,
html.dark-mode .scp-member-card,
html.dark-mode .scp-profile-overview,
html.dark-mode .scp-profile-tabs,
html.dark-mode .scp-profile-tab-panel,
html.dark-mode .scp-grid,
html.dark-mode .scp-listings-grid,
html.dark-mode .scp-listings-wrapper,
html.dark-mode .scp-marketplace-listings-grid,
html.dark-mode .scp-marketplace-listing-grid,
html.dark-mode .scp-profile-groups-grid,
html.dark-mode .scp-profile-pages-grid,
html.dark-mode .scp-profile-communities-grid,
html.dark-mode .scp-profile-events-grid,
html.dark-mode .scp-media-gallery,
html.dark-mode .scp-gallery-grid,
html.dark-mode .scp-container,
html.dark-mode .scp-card,
html.dark-mode .scp-box,
html.dark-mode .scp-panel,
html.dark-mode .scp-widget {
    background: var(--scp-card-background, #18191a) !important;
    color: var(--scp-text, #ffffff) !important;
}

/* Messaging UI */
.scp-messages {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
}
.scp-messages-sidebar {
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 10px;
    background: var(--scp-card-background, #ffffff);
    overflow: hidden;
}
.scp-messages-sidebar h3 {
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
    font-size: 0.95rem;
}
.scp-messages-threads {
    max-height: 70vh;
    overflow: auto;
}
.scp-thread-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.scp-thread-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--scp-border, #f1f5f9);
}
.scp-thread-item:hover {
    background: var(--scp-hover-background, rgba(249, 250, 251, 0.5));
}
body.scp-dark-mode-active .scp-thread-item:hover,
html.scp-dark-mode-active .scp-thread-item:hover,
body.dark-mode .scp-thread-item:hover,
html.dark-mode .scp-thread-item:hover {
    background: rgba(58, 59, 60, 0.5);
}
.scp-thread-item.has-unread {
    background: rgba(238, 242, 255, 0.5);
}
body.scp-dark-mode-active .scp-thread-item.has-unread,
html.scp-dark-mode-active .scp-thread-item.has-unread,
body.dark-mode .scp-thread-item.has-unread,
html.dark-mode .scp-thread-item.has-unread {
    background: rgba(29, 78, 216, 0.2);
}

/* Outline-style action buttons used in activity forms */
.scp-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent !important;
    color: inherit !important;
    border: none !important; /* borderless as requested */
    padding: 6px 8px !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    pointer-events: auto !important;
}
.scp-outline-btn .icon,
.scp-outline-btn svg {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    fill: currentColor !important;
    stroke: none !important;
}
.scp-outline-btn .btn-label {
    display: inline-block;
    font-size: 13px;
    color: inherit;
}

/* Variant for small icon-only buttons */
.scp-outline-btn.icon-only {
    padding: 6px !important;
    width: 36px;
    height: 36px;
    justify-content: center;
}
/* Ensure activity toolbar icons are interactive (defensive) */
.scp-activity-form .form-actions,
.scp-activity-form .form-actions * {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 2 !important;
}
.scp-activity-form .form-actions .action-buttons,
.scp-activity-form .form-actions .btn-add-media,
.scp-activity-form .form-actions .btn-gif-picker,
.scp-activity-form .form-actions .btn-checkin,
.scp-activity-form .form-actions .btn-tag-friends,
.scp-activity-form .form-actions .btn-emoji,
.scp-activity-form .form-actions .btn-create-story,
.scp-activity-form .form-actions .btn-create-live,
.scp-activity-form .form-actions .btn-create-reel,
.scp-activity-form .form-actions .btn-create-event,
.scp-activity-form .form-actions button[class^="btn-"],
.scp-activity-form .form-actions button[class*="btn-create"] {
    pointer-events: auto !important;
    z-index: 3 !important;
    position: relative !important;
}

/* Ensure submit is on top and clickable */
.scp-activity-form .form-actions .btn-submit,
.scp-activity-form .form-actions .btn-submit .icon {
    pointer-events: auto !important;
    z-index: 4 !important;
    position: relative !important;
}

/* Make sure SVG icons inherit visible color */
.scp-activity-form .form-actions .icon svg,
.scp-create-icon-toolbar .icon svg,
.scp-activity-form .form-actions .scp-icon svg {
    fill: currentColor !important;
    color: inherit !important;
}
/* Fix: ensure activity action buttons are not blocked by overlays
   Force pointer-events and z-index so icons (photo/video/gif/checkin) are clickable */
.scp-activity-form .form-actions,
.scp-activity-form .form-actions * {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 2 !important;
}
.scp-activity-form .form-actions .action-buttons,
.scp-activity-form .form-actions .btn-add-media,
.scp-activity-form .form-actions .btn-gif-picker,
.scp-activity-form .form-actions .btn-checkin,
.scp-activity-form .form-actions .btn-tag-friends,
.scp-activity-form .form-actions .btn-emoji {
    pointer-events: auto !important;
    z-index: 3 !important;
}

/* Make sure the submit icon/button remains visible and clickable */
.scp-activity-form .form-actions .btn-submit,
.scp-activity-form .form-actions .btn-submit .icon {
    pointer-events: auto !important;
    z-index: 4 !important;
    position: relative !important;
}

/* Ensure all toolbar/create icons behave the same (story, live, reel, event, etc.) */
.scp-activity-form .form-actions .action-buttons button,
.scp-activity-form .form-actions button[class^="btn-"],
.scp-activity-form .form-actions button[class*="btn-create"],
.scp-create-icon-toolbar .scp-create-icon-btn,
.scp-create-icon-toolbar button,
.scp-activity-form .form-actions .scp-create-icon-btn {
    pointer-events: auto !important;
    z-index: 3 !important;
    position: relative !important;
}

/* Ensure SVG icons are visible and inherit color */
.scp-activity-form .form-actions .icon svg,
.scp-create-icon-toolbar .icon svg,
.scp-activity-form .form-actions .scp-icon svg {
    fill: currentColor !important;
    color: inherit !important;
}


/* Ensure emoji and gif buttons match outline look */
.form-actions .action-buttons .btn-gif-picker,
.form-actions .action-buttons .btn-emoji,
.form-actions .action-buttons .btn-create-live,
.form-actions .action-buttons .btn-create-reel {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
}

/* Hide legacy type filters if present */
.scp-activity-filters,
.scp-activity-type-switcher {
    display: none !important;
}

/* Make the small create-icon toolbar buttons borderless and transparent */
.scp-create-icon-toolbar .scp-create-icon-btn,
.scp-create-icon-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 6px !important;
    border-radius: 6px !important;
    color: inherit !important;
}
.scp-create-icon-toolbar .scp-create-icon-btn .scp-icon,
.scp-create-icon-btn .scp-icon,
.scp-create-icon-toolbar .scp-create-icon-btn svg,
.scp-create-icon-btn svg {
    fill: currentColor !important;
    width: 20px;
    height: 20px;
}

/* Activity form layout: align action icons and submit in one responsive row */
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
}
.form-actions .action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Submit as icon-only (send/enter). Keep text for screen readers. */
.btn-submit,
.btn-submit-activity,
.btn-submit-activity[type="submit"],
.btn-submit[type="submit"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 6px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-submit .text,
.btn-submit-activity .text {
    display: none; /* visually hide Post text, keep accessible label below if needed */
}
.btn-submit .icon,
.btn-submit-activity .icon {
    width: 20px;
    height: 20px;
}

/* Accessibility: keep a visually-hidden class for screen-readers */
.scp-screen-reader {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.scp-thread-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}
.scp-thread-avatar {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    object-fit: cover;
    display: block;
}
.scp-thread-meta {
    min-width: 0;
}
.scp-thread-item.has-unread .scp-thread-name {
    color: #1d4ed8;
}
.scp-thread-unread {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    min-width: 1.25rem;
    height: 1.25rem;
    line-height: 1.25rem;
    text-align: center;
    border-radius: 9999px;
    padding: 0 0.35rem;
    font-weight: 700;
}
.scp-thread-name {
    font-weight: 600;
    color: var(--scp-text, #111827);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scp-thread-last {
    color: #64748b;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scp-messages-conversation {
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 10px;
    background: var(--scp-card-background, #ffffff);
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 60vh;
}
.scp-conversation-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
    font-weight: 600;
}
.scp-conversation-body {
    padding: 0.75rem;
    overflow: auto;
    background: transparent;
}
body.scp-dark-mode-active .scp-conversation-body,
html.scp-dark-mode-active .scp-conversation-body,
body.dark-mode .scp-conversation-body,
html.dark-mode .scp-conversation-body {
    background: transparent;
}
.scp-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.scp-message {
    display: flex;
}
.scp-message.is-mine {
    justify-content: flex-end;
}
.scp-message-bubble {
    max-width: 65%;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    color: var(--scp-text, #111827);
    word-wrap: break-word;
    white-space: pre-wrap;
}
body.scp-dark-mode-active .scp-message-bubble,
html.scp-dark-mode-active .scp-message-bubble,
body.dark-mode .scp-message-bubble,
html.dark-mode .scp-message-bubble {
    background: var(--scp-card-background, #242526);
    border-color: var(--scp-border, #3a3b3c);
    color: var(--scp-text, #ffffff);
}
.scp-message.is-mine .scp-message-bubble {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.scp-conversation-composer {
    padding: 0.6rem;
    border-top: 1px solid var(--scp-border, #e5e7eb);
    background: var(--scp-card-background, #ffffff);
}
body.scp-dark-mode-active .scp-conversation-composer,
html.scp-dark-mode-active .scp-conversation-composer,
body.dark-mode .scp-conversation-composer,
html.dark-mode .scp-conversation-composer {
    background: var(--scp-card-background, #18191a);
}
.scp-message-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
}
.scp-message-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
}
.scp-message-form .button {
    align-self: end;
}

@media (max-width: 900px) {
    .scp-messages {
        grid-template-columns: 1fr;
    }
    .scp-messages-sidebar {
        order: 2;
    }
    .scp-messages-conversation {
        order: 1;
        min-height: 55vh;
    }
}
/* Dark mode support - Facebook-like reverse colors */
body.scp-dark-mode-active .scp-activity-form,
body.scp-dark-mode-active .scp-activity-item,
body.scp-dark-mode-active .scp-user-card,
body.scp-dark-mode-active .scp-group-card,
body.scp-dark-mode-active .scp-member-card,
body.scp-dark-mode-active .scp-profile-tabs a,
body.scp-dark-mode-active .scp-profile-overview,
html.scp-dark-mode-active .scp-activity-form,
html.scp-dark-mode-active .scp-activity-item,
html.scp-dark-mode-active .scp-user-card,
html.scp-dark-mode-active .scp-group-card,
html.scp-dark-mode-active .scp-member-card,
html.scp-dark-mode-active .scp-profile-tabs a,
html.scp-dark-mode-active .scp-profile-overview {
    background: #18191a; /* Facebook dark background */
    color: #e4e6eb; /* Facebook light text */
    border-color: #3a3b3c; /* Facebook dark border */
}

/* Dark mode specific styles */
body.scp-dark-mode-active .scp-group-card,
html.scp-dark-mode-active .scp-group-card {
    background: #242526; /* Facebook card dark background */
    border-color: #3a3b3c;
}

body.scp-dark-mode-active .scp-group-card:hover,
html.scp-dark-mode-active .scp-group-card:hover {
    background: #2d2d2d;
}

body.scp-dark-mode-active .scp-profile-tabs a,
html.scp-dark-mode-active .scp-profile-tabs a {
    background: #242526; /* Dark card background */
    color: #b0b3b8; /* Grey text in dark mode */
}

body.scp-dark-mode-active .scp-profile-tabs a:hover,
html.scp-dark-mode-active .scp-profile-tabs a:hover {
    background: #3a3b3c;
    color: #22c55e; /* Green hover stays same */
}

body.scp-dark-mode-active .scp-profile-tabs a.is-active,
html.scp-dark-mode-active .scp-profile-tabs a.is-active {
    background: #242526;
    color: #22c55e; /* Green active */
    border-bottom-color: #22c55e;
}

body.scp-dark-mode-active .scp-group-card .group-name,
body.scp-dark-mode-active .scp-group-card .group-meta,
body.scp-dark-mode-active .scp-group-card .group-description,
body.scp-dark-mode-active .scp-group-card .group-location,
html.scp-dark-mode-active .scp-group-card .group-name,
html.scp-dark-mode-active .scp-group-card .group-meta,
html.scp-dark-mode-active .scp-group-card .group-description,
html.scp-dark-mode-active .scp-group-card .group-location {
    color: #e4e6eb; /* Light text in dark mode */
}

body.scp-dark-mode-active .scp-group-card .group-name a:hover,
html.scp-dark-mode-active .scp-group-card .group-name a:hover {
    color: #22c55e; /* Green hover */
}

body.scp-dark-mode-active .filter-btn:hover,
body.scp-dark-mode-active .filter-btn.active,
html.scp-dark-mode-active .filter-btn:hover,
html.scp-dark-mode-active .filter-btn.active {
    background: #22c55e; /* Green in dark mode too */
    color: #ffffff;
}

/* Activity Stream */
.scp-activity-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* When activity layout is inside profile tab panel, use simpler layout */
.scp-profile-tab-panel .scp-activity-layout {
    display: block; /* Stack vertically in profile context */
    gap: 0;
}

.scp-profile-tab-panel .scp-activity-layout .scp-activity-main {
    width: 100%;
    max-width: 100%;
}

.scp-profile-tab-panel .scp-activity-layout .scp-activity-sidebar {
    display: none; /* Hide sidebar in profile context */
}

/* Ensure activity list stays within profile container */
.scp-profile-tab-panel .scp-activity-list,
.scp-profile-tab-panel .scp-activity-stream {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

/* Ensure load more button stays within container */
.scp-profile-tab-panel .scp-load-more {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 1rem;
}

.scp-profile-tab-panel .scp-load-more .btn-load-more {
    max-width: 100%;
    box-sizing: border-box;
}

.scp-activity-main {
    flex: 1 1 auto;
    min-width: 0;
}

.scp-activity-sidebar {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scp-activity-stream {
    width: 100%;
    padding: 1rem;
}

/* Icon System - Match Navigation Menu Style */
.scp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    flex-shrink: 0;
}

.scp-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
}

.scp-icon-emoji {
    font-size: 18px;
    line-height: 1;
}

/* Activity Actions Icons */
.activity-actions .icon,
.menu-item .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: middle;
}

.activity-actions .icon svg,
.menu-item .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Post Button Icon */
.btn-submit .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

.btn-submit .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Action Buttons Icons */
.action-buttons button .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.action-buttons button .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Match Navigation Tab Icon Style */
.activity-actions .icon,
.btn-submit .icon,
.action-buttons button .icon {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.activity-actions button:hover .icon,
.btn-submit:hover .icon,
.action-buttons button:hover .icon {
    opacity: 1;
}

/* Activity Form - ensure form and submit are clickable */
.scp-activity-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 1.35rem;
    margin-bottom: 1.75rem;
    position: relative;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    pointer-events: auto;
}

.scp-activity-post-form {
    pointer-events: auto;
}

.scp-activity-post-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 14px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scp-activity-post-form .form-group {
    position: relative;
}

.scp-activity-post-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    pointer-events: auto;
}

.scp-activity-post-form .form-actions .btn-submit {
    pointer-events: auto;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    pointer-events: auto;
}

/* Clean icon-only buttons like navigation menu */
.action-buttons button {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    color: #6b7280;
    transition: color 0.2s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.action-buttons button:hover,
.action-buttons button:focus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.action-buttons button:active {
    background: rgba(59, 130, 246, 0.15);
}

.action-buttons button .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.action-buttons button .icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Special accent colors for certain buttons */
.action-buttons .btn-create-story {
    color: #8b5cf6;
}
.action-buttons .btn-create-story:hover {
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.08);
}

.action-buttons .btn-create-live {
    color: #ef4444;
}
.action-buttons .btn-create-live:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
}

.action-buttons .btn-create-reel {
    color: #3b82f6;
}
.action-buttons .btn-create-reel:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
}

.action-buttons .btn-create-event {
    color: #10b981;
}
.action-buttons .btn-create-event:hover {
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
}

.action-buttons .btn-emoji {
    color: #f59e0b;
}
.action-buttons .btn-emoji:hover {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
}

.privacy-select select {
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(203, 213, 225, 0.75);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
}

.btn-submit {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.32);
}

.post-type-switcher {
    display: inline-flex;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    background: rgba(37, 99, 235, 0.08);
    padding: 0.3rem;
    border-radius: 999px;
}

/* Modern Post Type Icon Toolbar */
.post-type-switcher.scp-post-type-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
}

.scp-post-type-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--scp-text-color, #374151);
    white-space: nowrap;
    flex-shrink: 0;
    touch-action: manipulation;
    min-height: 36px;
}

.scp-post-type-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.scp-post-type-icon-btn:hover {
    background: var(--scp-hover-background, #f3f4f6);
    border-color: var(--scp-primary-color, #1d4ed8);
    color: var(--scp-primary-color, #1d4ed8);
    transform: translateY(-1px);
}

.scp-post-type-icon-btn.active {
    background: var(--scp-primary-color, #1d4ed8);
    color: #ffffff;
    border-color: var(--scp-primary-color, #1d4ed8);
}

.scp-post-type-icon-btn .post-type-label {
    font-size: 13px;
}

@media (max-width: 768px) {
    .scp-post-type-toolbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .scp-post-type-icon-btn .post-type-label {
        display: none; /* Hide labels on mobile */
    }
}

/* Legacy support */
.post-type-btn {
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1f2937;
}

.post-type-btn:hover {
    color: #1d4ed8;
}

.post-type-btn.active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.media-preview {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.media-preview .media-chip {
    flex: 0 0 auto;
    max-width: 200px;
    width: 100%;
}

/* Activity Edit Form Styles */
.activity-edit-form {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.activity-edit-content {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    resize: vertical;
    min-height: 100px;
}

.activity-edit-media {
    margin-top: 10px;
}

.activity-edit-media .media-preview {
    margin-top: 10px;
}

.activity-edit-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.activity-edit-controls .btn-save-activity {
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.activity-edit-controls .btn-save-activity:hover {
    background: #1976D2;
}

.activity-edit-controls .btn-save-activity:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.activity-edit-controls .btn-cancel-edit {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.activity-edit-controls .btn-cancel-edit:hover {
    background: #e5e5e5;
}

.tagged-friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tagged-friends-list .tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #eef2ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

/* Outline style for activity form action buttons (border, no fill) */
.scp-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--scp-border, #e5e7eb);
    background: transparent;
    color: var(--scp-text, #111827);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.scp-outline-btn .icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
}
.scp-outline-btn:hover {
    background: var(--scp-hover-background, #f3f4f6);
    border-color: var(--scp-primary-color, #1d4ed8);
    color: var(--scp-primary-color, #1d4ed8);
}
.scp-outline-btn .btn-label {
    display: inline-block;
}

/* Hide legacy post type toolbar labels if present (we removed the type switcher) */
.scp-post-type-toolbar {
    display: none !important;
}

.tagged-friends-list .tag-chip .username {
    color: #4f46e5;
    font-weight: 500;
}

.tagged-friends-list .tag-chip .btn-remove-tag {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.form-feedback {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2563eb;
    min-height: 1.2em;
}

.form-feedback.is-error {
    color: #dc2626;
}

.form-feedback.is-success {
    color: #16a34a;
}

.friend-picker {
    position: absolute;
    z-index: 15;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    width: 280px;
    max-height: 320px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.friend-picker.active {
    display: flex;
}

.friend-picker .picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.friend-picker .picker-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #111827;
}

.friend-picker .picker-header button {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6b7280;
}

.friend-picker .picker-search {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.friend-picker .picker-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.friend-picker .picker-list {
    overflow-y: auto;
    padding: 0.5rem 0;
}

.friend-picker .friend-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.friend-picker .friend-option:hover {
    background: #f3f4f6;
}

.friend-picker .friend-option img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

.friend-picker .friend-option .friend-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.friend-picker .friend-option .friend-meta .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.friend-picker .friend-option .friend-meta .username {
    font-size: 0.8rem;
    color: #6b7280;
}

.friend-picker .picker-empty {
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.gif-picker {
    position: absolute;
    z-index: 15;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    width: 360px;
    display: none;
    padding: 0.75rem;
}

.gif-picker.active {
    display: block;
}

.gif-picker .picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gif-picker .picker-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.gif-picker .picker-header button {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6b7280;
}

.gif-picker .picker-search {
    margin-bottom: 0.75rem;
}

.gif-picker .picker-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.gif-picker .picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
}

.gif-picker .picker-empty {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.gif-picker .gif-option {
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gif-picker .gif-option img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.18s ease;
}

.gif-picker .gif-option:hover img {
    transform: scale(1.05);
}

.gif-picker .picker-footer {
    margin-top: 0.5rem;
    text-align: right;
    font-size: 0.75rem;
    color: #6b7280;
}

.gif-picker .picker-footer a {
    color: #2563eb;
    text-decoration: none;
}

.media-chip {
    position: relative;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    min-width: 120px;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.media-chip .media-filename {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    color: #374151;
    word-break: break-all;
    text-align: center;
}

.media-chip {
    position: relative;
    display: inline-block;
    max-width: 200px;
    margin: 0;
}

.media-chip img,
.media-chip video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.media-chip-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.media-chip .btn-remove-media,
.media-chip .btn-edit-media {
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.media-chip .btn-edit-media {
    font-size: 12px;
}

.media-chip .btn-edit-media .dashicons {
    width: 12px;
    height: 12px;
    font-size: 12px;
}

.media-chip .btn-remove-media:hover {
    background: rgba(220, 38, 38, 0.9);
}

.media-chip .btn-edit-media:hover {
    background: rgba(59, 130, 246, 0.9);
}

.media-chip.uploading::after {
    content: attr(data-uploading-text);
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    color: #ffffff;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
}

.media-chip.uploading .btn-remove-media {
    display: none;
}

/* GIF Picker Styles */
#scp-gif-picker-ui,
.gif-picker {
    position: fixed !important;
    z-index: 100010 !important;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;
    max-width: 320px;
    width: 90vw;
    max-height: 400px;
    display: none;
    overflow: hidden;
}

#scp-gif-picker-ui.active,
.gif-picker.active {
    display: block;
}

.gif-picker-header {
    position: relative;
    margin-bottom: 10px;
}

.gif-search-input {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.gif-picker-close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gif-picker-close:hover {
    color: #111827;
}

.gif-picker-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.gif-picker-results::-webkit-scrollbar {
    width: 6px;
}

.gif-picker-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.gif-picker-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.gif-picker-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.gif-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
    aspect-ratio: 1;
}

.gif-item:hover {
    transform: scale(1.05);
}

.gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Emoji Panel Styles */
#scp-emoji-panel,
.emoji-panel {
    position: fixed !important;
    z-index: 100010 !important;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
    border-radius: 8px;
    width: 200px;
    max-width: 90vw;
    padding: 8px;
    max-height: 200px;
    display: none;
    overflow: hidden;
    pointer-events: none;
}

#scp-emoji-panel.active,
.emoji-panel.active {
    display: block;
    pointer-events: auto;
}

/* Prevent any element hidden via aria-hidden from intercepting pointer events.
   This avoids invisible overlays blocking buttons (like the Post button). */
[aria-hidden="true"] {
    pointer-events: none !important;
    touch-action: none !important;
}

.emoji-panel-header {
    display: none;
}

.emoji-panel-header button {
    border: none;
    background: transparent;
    font-size: 1rem;
    cursor: pointer;
    color: #6b7280;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.emoji-item {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.emoji-item:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.emoji-item:active {
    transform: scale(0.95);
    background: #e5e7eb;
}

/* Tag Friends Panel Styles */
#scp-tag-friends-panel,
.tag-friends-panel {
    position: fixed !important;
    z-index: 100010 !important;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;
    min-width: 300px;
    max-width: 90vw;
    max-height: 400px;
    display: none;
    overflow: hidden;
}

#scp-tag-friends-panel.active,
.tag-friends-panel.active {
    display: block;
}

.tag-friends-header {
    position: relative;
    margin-bottom: 10px;
}

.tag-friends-search {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.tag-friends-close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-friends-close:hover {
    color: #111827;
}

.tag-friends-results {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.tag-friends-results::-webkit-scrollbar {
    width: 6px;
}

.tag-friends-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tag-friends-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tag-friend-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.2s ease;
}

.tag-friend-item:hover {
    background: #f3f4f6;
}

.tag-friend-item.tagged {
    background: #e3f2fd;
}

.tag-friend-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.tag-friend-item > div {
    flex: 1;
    min-width: 0;
}

.tag-friend-item > div > div:first-child {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.tag-friend-item > div > div:last-child {
    font-size: 12px;
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #scp-gif-picker-ui,
    .gif-picker {
        max-width: calc(100vw - 20px);
        width: calc(100vw - 20px);
        max-height: 50vh;
    }

    #scp-emoji-panel,
    .emoji-panel {
        width: 180px;
        max-width: calc(100vw - 20px);
        max-height: 180px;
        padding: 6px;
    }

    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
        max-height: 160px;
    }

    .emoji-item {
        font-size: 16px;
        padding: 3px;
    }

    #scp-tag-friends-panel,
    .tag-friends-panel {
        min-width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: 50vh;
    }

    .gif-picker-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .emoji-item {
        font-size: 18px;
    }

    .gif-picker-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

.scp-profile-settings {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.scp-group-create {
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 2.25rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.scp-group-create .scp-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.scp-group-create label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.scp-group-create label .required {
    color: #dc2626;
}

.scp-group-create input[type="text"],
.scp-group-create textarea,
.scp-group-create select {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.85rem 1rem;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(248, 250, 252, 0.65);
}

.scp-group-create textarea {
    resize: vertical;
    min-height: 140px;
}

.scp-group-create input:focus,
.scp-group-create textarea:focus,
.scp-group-create select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.85);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.scp-group-create .description {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
}

.scp-group-create .scp-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.scp-group-create .scp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #2563eb, #4338ca);
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scp-group-create .scp-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.scp-group-create .scp-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.scp-group-create .scp-form-feedback {
    font-size: 0.92rem;
    font-weight: 500;
    color: #475569;
}

.scp-group-create .scp-form-feedback.is-error {
    color: #dc2626;
}

.scp-group-create .scp-form-feedback.is-success {
    color: #0f766e;
}

.scp-settings-layout {
    display: flex;
    gap: 1.5rem;
}

.scp-settings-nav {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scp-settings-nav button,
.scp-marketplace-dashboard-nav button {
    border: 1px solid #d1d5db;
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer !important;
    transition: all 0.2s;
    pointer-events: auto !important;
    position: relative;
    z-index: 100 !important;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.scp-settings-nav button > *,
.scp-marketplace-dashboard-nav button > * {
    pointer-events: none;
}

.scp-settings-nav button:hover,
.scp-marketplace-dashboard-nav button:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
    background: #eff6ff;
}

.scp-settings-nav button.is-active,
.scp-marketplace-dashboard-nav button.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.scp-marketplace-dashboard-nav {
    position: relative;
    z-index: 100;
    isolation: isolate;
}

.scp-settings-panels {
    flex: 1;
    position: relative;
    z-index: 1;
}

.scp-settings-section {
    display: none;
}

.scp-settings-section.is-active {
    display: block;
}

/* Ensure marketplace dashboard sections are properly scoped */
.scp-marketplace-dashboard .scp-settings-section {
    display: none;
}

.scp-marketplace-dashboard .scp-settings-section.is-active {
    display: block;
}

.scp-settings-section header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: #111827;
}

.scp-settings-section header p {
    margin: 0 0 1.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.scp-profile-settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.scp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.scp-profile-settings-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #374151;
    font-size: 0.95rem;
}

.scp-profile-settings-form label span {
    font-weight: 600;
}

.scp-profile-settings-form input[type="text"],
.scp-profile-settings-form input[type="email"],
.scp-profile-settings-form input[type="url"],
.scp-profile-settings-form input[type="password"],
.scp-profile-settings-form input[type="date"],
.scp-profile-settings-form select,
.scp-profile-settings-form textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.scp-profile-settings-form textarea {
    resize: vertical;
    min-height: 120px;
}

.scp-profile-settings-form input:focus,
.scp-profile-settings-form textarea:focus,
.scp-profile-settings-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.scp-profile-settings-form label.full {
    width: 100%;
}

.scp-form-actions {
    display: flex;
    justify-content: flex-end;
}

.scp-profile-settings-form .btn-save {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    border: none;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.scp-profile-settings-form .btn-save:hover {
    background: #1e40af;
}

.scp-profile-settings-form .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scp-avatar-upload-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.scp-avatar-upload-section label > span {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.scp-avatar-upload {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.scp-avatar-preview {
    flex-shrink: 0;
}

.scp-avatar-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scp-avatar-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.scp-avatar-controls .btn-upload-avatar,
.scp-avatar-controls .btn-remove-avatar {
    align-self: flex-start;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.scp-avatar-controls .btn-upload-avatar {
    background: #1e40af;
    color: #fff;
}

.scp-avatar-controls .btn-upload-avatar:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.scp-avatar-controls .btn-remove-avatar {
    background: transparent;
    color: #ef4444;
    border-color: #ef4444;
}

.scp-avatar-controls .btn-remove-avatar:hover {
    background: #ef4444;
    color: #fff;
}

.scp-avatar-controls .btn-upload-avatar:disabled,
.scp-avatar-controls .btn-remove-avatar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scp-avatar-controls .description {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.scp-preference-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scp-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.scp-toggle input {
    display: none;
}

.toggle-indicator {
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s;
}

.toggle-indicator::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s;
}

.scp-toggle input:checked + .toggle-indicator {
    background: #1d4ed8;
}

.scp-toggle input:checked + .toggle-indicator::after {
    transform: translateX(20px);
}

.toggle-label {
    font-weight: 600;
    color: #1f2937;
}

.scp-settings-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.scp-select select {
    margin-top: 0.35rem;
}

.scp-profile-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    background: #ffffff !important;
}

.scp-members-directory,
.scp-groups-directory {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.scp-profile-header {
    margin-bottom: 1.5rem;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.scp-profile-header .scp-user-card {
    padding: 1rem 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.scp-user-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    padding: 1.75rem;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.scp-user-card .user-avatar {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(30, 64, 175, 0.18);
}

.scp-user-card .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-status-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 16px;
    height: 16px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #9ca3af;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.user-status-dot.scp-status-online {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.user-status-dot.scp-status-offline {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.scp-user-card .user-info,
.scp-group-card .group-info {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.scp-user-card .user-name {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.scp-user-card .user-username {
    margin: -0.4rem 0 0;
    font-size: 1rem;
    color: #475569;
}

.user-stats-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.user-stats-matrix .metric {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.2s ease, background 0.2s ease;
    border-radius: 8px;
    padding: 0.5rem;
}

.user-stats-matrix .metric-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1d4ed8;
}

.user-stats-matrix .metric-label {
    font-size: 0.825rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.user-stats-matrix .metric.metric-hover,
.user-stats-matrix .metric:hover {
    background: rgba(29, 78, 216, 0.08);
    transform: translateY(-2px);
    cursor: pointer;
}

.user-stats-matrix .metric.metric-hover .metric-count,
.user-stats-matrix .metric:hover .metric-count {
    color: #1e40af;
}

.scp-user-card .user-actions,
.scp-group-card .group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    width: 100%;
    box-sizing: border-box;
}

.scp-user-card .user-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.scp-user-card .btn-follow {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.25);
}

.scp-user-card .btn-follow.following {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: none;
}

.scp-user-card .btn-follow:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.28);
}

.scp-user-card .btn-follow.following:hover {
    background: rgba(37, 99, 235, 0.15);
}

.scp-user-card .btn-friend,
.scp-user-card .btn-message {
    background: rgba(255, 255, 255, 0.85);
    color: #1f2937;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.scp-user-card .btn-friend:hover,
.scp-user-card .btn-message:hover {
    background: #ffffff;
    border-color: rgba(59, 130, 246, 0.4);
    color: #2563eb;
    transform: translateY(-1px);
}

/* Group Card - Matching Member Card Style (Smaller) */
/* Unified card wrapper - groups and communities now use scp-member-card class */
.scp-group-card-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.scp-group-card:hover {
    transform: scale(1.02);
    opacity: 0.95;
    background: var(--scp-hover-background, #f9fafb);
    z-index: 10;
}

.scp-group-card .group-avatar {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
}

.scp-group-card .group-avatar a {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--scp-border-color, #e5e7eb);
    transition: border-color 0.2s ease;
}

.scp-group-card:hover .group-avatar a {
    border-color: var(--scp-primary-color, #1d4ed8);
}

.scp-group-card .group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scp-group-card .group-avatar .avatar-fallback {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #6366f1;
}

.group-verified-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.group-verified-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.scp-group-card .group-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.scp-group-card .group-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--scp-text-color, #1f2937);
    line-height: 1.3;
}

.scp-group-card .group-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scp-group-card .group-name a:hover {
    color: #22c55e; /* Green hover */
}

.scp-group-card .group-meta {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280; /* Grey secondary */
}

.scp-group-card .group-description {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280; /* Grey secondary */
    line-height: 1.5;
}

.scp-group-card .group-location {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280; /* Grey secondary */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scp-group-card .group-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Hide group stats matrix to make cards smaller */
.group-stats-matrix {
    display: none;
}

.scp-group-card .group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
    width: 100%;
}

/* Groups and Communities now use .scp-member-card class - button styles unified below */
/* Legacy support for old .scp-group-card class */
.scp-group-card .group-actions button,
.scp-group-card .group-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
    min-height: 36px;
    touch-action: manipulation;
}

.scp-group-card .btn-join-group,
.scp-member-card .btn-join-group,
.scp-member-card .btn-join-community {
    background: #22c55e;
    color: #ffffff;
}

.scp-group-card .btn-join-group:hover,
.scp-member-card .btn-join-group:hover,
.scp-member-card .btn-join-community:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.scp-group-card .btn-leave-group,
.scp-member-card .btn-leave-group,
.scp-member-card .btn-leave-community {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.scp-group-card .btn-leave-group:hover,
.scp-member-card .btn-leave-group:hover,
.scp-member-card .btn-leave-community:hover {
    background: #e5e7eb;
    color: #374151;
}

.scp-group-card .btn-view-group,
.scp-member-card .btn-view-group,
.scp-member-card .btn-view-community {
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.scp-group-card .btn-view-group:hover,
.scp-member-card .btn-view-group:hover,
.scp-member-card .btn-view-community:hover {
    background: #f9fafb;
    border-color: #22c55e;
    color: #22c55e;
}

/* Groups and Communities now use .scp-members-grid - unified grid styling */
/* Legacy support for old class names */
.scp-groups-grid,
.scp-communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Ensure cards in grids have consistent minimum width */
.scp-groups-grid > *,
.scp-communities-grid > * {
    min-width: 280px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 769px) {
    .scp-groups-grid,
    .scp-communities-grid,
    .scp-profile-groups-grid,
    .scp-profile-communities-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .scp-groups-grid,
    .scp-communities-grid,
    .scp-profile-groups-grid,
    .scp-profile-communities-grid,
    .scp-profile-pages-grid,
    .scp-profile-events-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .scp-groups-grid > *,
    .scp-communities-grid > *,
    .scp-profile-groups-grid > *,
    .scp-profile-communities-grid > *,
    .scp-profile-pages-grid > *,
    .scp-profile-events-grid > * {
        min-width: 200px;
    }
}

/* Nominatim Location Search Results */
.nominatim-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.nominatim-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: background-color 0.2s ease;
}

.nominatim-result-item:last-child {
    border-bottom: none;
}

.nominatim-result-item:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

.nominatim-result-item strong {
    display: block;
    color: #1f2937;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.nominatim-result-item small {
    color: #6b7280;
    font-size: 0.8125rem;
}

.nominatim-loading,
.nominatim-no-results,
.nominatim-error {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.nominatim-error {
    color: #dc2626;
}

/* Mapbox Geocoder Wrapper */
.mapbox-geocoder-wrapper {
    width: 100%;
}

.mapbox-geocoder-wrapper .mapboxgl-ctrl-geocoder {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.scp-activity-stories,
.scp-activity-external {
    margin-bottom: 1.5rem;
}

.scp-activity-stories h3,
.scp-activity-external h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.scp-activity-external-inner,
.scp-activity-stories-inner {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.scp-activity-external-inner > :last-child,
.scp-activity-stories-inner > :last-child {
    margin-bottom: 0;
}

.scp-activity-widgets {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.scp-widget {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    position: relative;
}

.scp-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.scp-widget-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.scp-widget-nav {
    display: inline-flex;
    gap: 0.35rem;
}

.widget-nav-btn {
    border: none;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.widget-nav-btn:hover {
    background: rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.scp-widget-track {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.scp-widget-track.is-carousel {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.scp-widget-track.is-carousel::-webkit-scrollbar {
    display: none;
}

.scp-widget-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    position: relative;
    scroll-snap-align: start;
    min-width: 0;
}

.scp-widget-track.is-carousel .scp-widget-item {
    min-width: 220px;
    flex: 0 0 auto;
}

.scp-widget-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.avatar-link {
    position: relative;
    display: inline-flex;
}

.avatar-link img {
    border-radius: 14px;
    width: 60px;
    height: 60px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.status-dot {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    background: #9ca3af;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.status-dot.scp-status-online {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.status-dot.scp-status-offline {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.scp-widget .item-meta {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.scp-widget .item-name {
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
}

.scp-widget .item-name:hover {
    color: #2563eb;
}

.scp-widget .item-username,
.scp-widget .item-stats,
.scp-widget .item-time {
    font-size: 0.78rem;
    color: #64748b;
}

.scp-widget .item-description,
.scp-widget .item-excerpt {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
}

.scp-widget .item-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.scp-widget .item-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.scp-widget .btn-follow,
.scp-widget .btn-friend,
.scp-widget .btn-view-group,
.scp-widget .btn-view-post {
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.scp-widget .btn-follow {
    border: none;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.scp-widget .btn-follow:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(79, 70, 229, 0.3);
}

.scp-widget .btn-friend:hover,
.scp-widget .btn-view-group:hover,
.scp-widget .btn-view-post:hover {
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.35);
    background: #ffffff;
    transform: translateY(-1px);
}

.scp-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.scp-profile-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: #6b7280; /* Grey secondary */
    font-weight: 600;
    background: #ffffff; /* White background */
    transition: background 0.2s, color 0.2s;
}

.scp-profile-tabs .tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: inherit;
}

.scp-profile-tabs .tab-icon svg {
    width: 100%;
    height: 100%;
}

.scp-profile-tabs .tab-icon-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.scp-profile-tabs .tab-label {
    line-height: 1.1;
}

.scp-profile-tabs a:hover {
    background: #f3f4f6; /* Light grey hover */
    color: #22c55e; /* Green hover */
}

.scp-profile-tabs a.is-active {
    background: #ffffff; /* White background */
    color: #22c55e; /* Green active */
    border-bottom: 2px solid #22c55e; /* Green underline */
}

.scp-profile-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 400px;
    padding: 0;
}

/* Ensure consistent layout for all tab content */
.scp-profile-tab-panel > section,
.scp-profile-tab-panel > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Posts tab - ensure consistent width */
.scp-profile-posts {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.scp-posts-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.scp-posts-container h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--scp-text-primary, #111827);
}

/* Media tab - ensure consistent width */
.scp-profile-media-tab {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Groups tab */
.scp-profile-groups {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Communities tab */
.scp-profile-communities {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Events tab */
.scp-profile-events {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Overview tab */
.scp-profile-overview {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
}

.scp-profile-activity {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Activity tab */
.scp-profile-activity-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.scp-profile-overview {
    background: #ffffff; /* White background */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.scp-profile-overview .scp-profile-fields {
    margin-top: 1rem;
}

.scp-profile-activity h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: #111827;
}

.no-activities-filtered {
    margin-top: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.scp-members-empty {
    margin-top: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.scp-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.scp-toast {
    min-width: 220px;
    max-width: 320px;
    background: #111827;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
    font-size: 0.9rem;
}

.scp-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.scp-toast.is-success {
    background: #16a34a;
}

.scp-toast.is-error {
    background: #dc2626;
}

.scp-toast.is-info {
    background: #2563eb;
}

/* Activity Item */
.scp-activity-item {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.activity-author {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.activity-author img {
    border-radius: 50%;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.author-name {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.activity-time {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Verified Badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #3b82f6;
    background: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: middle;
    margin-left: 2px;
}

.verified-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Group Badge */
.group-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
    margin-left: 0.5rem;
}

.group-badge .group-label {
    display: inline-block;
}

.group-badge .verified-badge {
    width: 12px;
    height: 12px;
    margin-left: 0;
}

/* Follow Button in Activity Feed */
.btn-follow-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.btn-follow-user:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-follow-user.following {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.btn-follow-user.following:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-follow-user .btn-text {
    display: inline-block;
}

.activity-actions-menu {
    position: relative;
}

.activity-actions-menu .btn-menu {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    color: #6b7280;
    border-radius: 999px;
    transition: background 0.2s;
}

.activity-actions-menu .btn-menu:hover,
.activity-actions-menu.open .btn-menu {
    background: #f3f4f6;
    color: #1f2937;
}

.activity-actions-menu .menu-dropdown {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.12);
    padding: 0.5rem 0;
    display: none;
    z-index: 5;
}

.activity-actions-menu.open .menu-dropdown {
    display: block;
}

.menu-dropdown .menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1f2937;
    transition: background 0.2s, color 0.2s;
}

.menu-dropdown .menu-item:hover {
    background: #f3f4f6;
}

.menu-dropdown .menu-item .icon {
    font-size: 1.1rem;
}

.activity-content {
    margin-bottom: 1rem;
}

.activity-text {
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* Clickable Media Links */
.scp-media-lightbox {
    display: block;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.scp-media-lightbox:hover {
    opacity: 0.9;
}

.scp-video-link {
    display: block;
    position: relative;
}

.activity-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.activity-media .media-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.activity-media .media-item img,
.activity-media .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.activity-media .media-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.media-item--video video {
    background: #000;
}

.scp-video-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.scp-video-toggle:hover {
    background: rgba(79, 70, 229, 0.8);
    transform: translateY(-1px);
}

.activity-hashtags {
    margin-top: 0.5rem;
}

.hashtag {
    color: #1d4ed8;
    text-decoration: none;
    margin-right: 0.5rem;
}

.hashtag:hover {
    text-decoration: underline;
}

.activity-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #6b7280;
}

.activity-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.75rem;
}

.activity-actions button {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    transition: color 0.2s;
}

.activity-actions button:hover {
    color: #1d4ed8;
}

.activity-actions button.liked {
    color: #dc2626;
}

.activity-form-wrapper {
    position: relative;
}

.btn-bookmark.bookmarked {
    color: #1d4ed8;
}

.btn-follow.following {
    color: #1d4ed8;
    font-weight: 600;
}

/* Presence Badges */
.user-status-dot {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    background: #9ca3af;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

.member-actions .btn-follow,
.member-actions .btn-friend {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    background: var(--scp-card-background, #ffffff);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--scp-text-color, #1f2937);
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 36px; /* Touch-friendly */
    touch-action: manipulation;
}

.member-actions .btn-follow {
    background: var(--scp-primary-color, #1d4ed8);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.2);
}

.member-actions .btn-follow.following {
    background: rgba(29, 78, 216, 0.1);
    color: var(--scp-primary-color, #1d4ed8);
    border: 1px solid rgba(29, 78, 216, 0.2);
    box-shadow: none;
}

.member-actions .btn-follow:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.member-actions .btn-follow.following:hover {
    background: rgba(29, 78, 216, 0.15);
}

.member-actions .btn-friend {
    border: 1px solid var(--scp-border-color, #e5e7eb);
}

.member-actions .btn-friend:hover {
    color: var(--scp-primary-color, #1d4ed8);
    border-color: var(--scp-primary-color, #1d4ed8);
    background: var(--scp-hover-background, #f9fafb);
    transform: translateY(-1px);
}

.member-status-dot.scp-status-online,
.user-status-dot.scp-status-online {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.member-status-dot.scp-status-offline,
.user-status-dot.scp-status-offline {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

/* Members Directory */
.scp-members-directory {
    width: 100%;
}

.scp-members-search,
.scp-groups-search {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.scp-members-search .scp-search-input,
.scp-groups-search .scp-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 12px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.scp-members-search .scp-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modern Icon Toolbar Filters */
.scp-members-filters,
.scp-groups-filters {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.scp-filters-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
}

.scp-filter-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--scp-text-color, #374151);
    white-space: nowrap;
    flex-shrink: 0;
}

.scp-filter-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.scp-filter-icon-btn:hover {
    background: var(--scp-hover-background, #f3f4f6);
    border-color: var(--scp-primary-color, #1d4ed8);
    color: var(--scp-primary-color, #1d4ed8);
    transform: translateY(-1px);
}

.scp-filter-icon-btn.active {
    background: var(--scp-primary-color, #1d4ed8);
    color: #ffffff;
    border-color: var(--scp-primary-color, #1d4ed8);
}

.scp-filter-icon-btn .filter-label {
    font-size: 13px;
}

.scp-location-filter-wrapper {
    flex: 1;
    min-width: 200px;
    margin-left: auto;
}

.scp-location-filter-wrapper .scp-location-filter {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.scp-location-filter-wrapper .scp-location-filter:focus {
    outline: none;
    border-color: var(--scp-primary-color, #1d4ed8);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* Mobile responsive filters */
@media (max-width: 768px) {
    .scp-filters-toolbar {
        padding: 10px 12px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .scp-filters-toolbar::-webkit-scrollbar {
        height: 4px;
    }
    
    .scp-filter-icon-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .scp-filter-icon-btn .filter-label {
        display: none; /* Hide labels on mobile, show only icons */
    }
    
    .scp-location-filter-wrapper {
        min-width: 150px;
        margin-left: 0;
        width: 100%;
        order: 10; /* Move to bottom on mobile */
    }
}

/* Modern Instagram-style Members Grid */
.scp-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 20px;
    background: var(--scp-border-color, #e5e7eb);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 769px) {
    .scp-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .scp-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        border-radius: 8px;
    }
}

.scp-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--scp-card-background, #ffffff);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    text-align: center;
    position: relative;
    min-height: 180px;
}

.scp-member-card:hover {
    transform: scale(1.02);
    opacity: 0.95;
    background: var(--scp-hover-background, #f9fafb);
    z-index: 10;
}

.member-avatar {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
}

.member-avatar a {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--scp-border-color, #e5e7eb);
    transition: border-color 0.2s ease;
}

.scp-member-card:hover .member-avatar a {
    border-color: var(--scp-primary-color, #1d4ed8);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-status-dot {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 3px solid var(--scp-card-background, #ffffff);
    background: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.member-status-dot.status-online {
    background: #22c55e;
}

.member-status-dot.status-away {
    background: #f59e0b;
}

.member-status-dot.status-busy {
    background: #ef4444;
}

.member-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.member-info h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--scp-text-color, #1f2937);
    line-height: 1.3;
}

.member-info h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.member-info h3 a:hover {
    color: var(--scp-primary-color, #1d4ed8);
}

.member-info .member-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--scp-text-secondary, #6b7280);
}

.member-info .member-location {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--scp-text-secondary, #9ca3af);
}

.member-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    justify-content: center;
    width: 100%;
}

.scp-members-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Modals */
.scp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.scp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    pointer-events: none;
}

.scp-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.scp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.scp-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.scp-content-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
}

.scp-content-modal.active {
    display: flex;
    pointer-events: auto;
}

/* Activity wall / content modal: overlay behind modal content (no z-index so modal’s z-index wins) */
/* Overlay below .scp-content-modal (100002) so popup stays on top and clickable */
.scp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    pointer-events: none;
}

.scp-modal-overlay.active {
    display: block;
    pointer-events: auto;
}

/* Overlay is moved inside modal by JS; keep it behind content */
.scp-content-modal .scp-modal-overlay {
    z-index: 1;
}

.scp-content-modal .scp-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    margin: auto;
    pointer-events: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Ensure modal content is not blurred and is fully interactive */
.scp-content-modal.active .scp-modal-content {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2 !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

.scp-content-modal.active .scp-modal-content * {
    pointer-events: auto !important;
}

.scp-content-modal.active .scp-modal-content input,
.scp-content-modal.active .scp-modal-content textarea,
.scp-content-modal.active .scp-modal-content button,
.scp-content-modal.active .scp-modal-content select,
.scp-content-modal.active .scp-modal-content a {
    pointer-events: auto !important;
    cursor: pointer;
}

/* Ensure all form fields are enabled and interactive in active modals */
.scp-content-modal.active input,
.scp-content-modal.active textarea,
.scp-content-modal.active select,
.scp-content-modal.active button:not(:disabled) {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: text !important;
}

.scp-content-modal.active button:not(:disabled) {
    cursor: pointer !important;
}

.scp-content-modal.active input[type="file"] {
    cursor: pointer !important;
}

/* Prevent disabled state on modal fields when modal is active */
.scp-content-modal.active input:not([disabled]),
.scp-content-modal.active textarea:not([disabled]),
.scp-content-modal.active select:not([disabled]) {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #d1d5db !important;
}

/* Ensure select dropdown text is visible in modals */
.scp-content-modal .scp-modal-content select,
#scp-create-listing-modal select {
    color: #333 !important;
    background-color: #fff !important;
}

.scp-content-modal .scp-modal-content select option,
#scp-create-listing-modal select option {
    color: #333 !important;
    background-color: #fff !important;
}

.scp-content-modal.active .scp-modal-content button:hover,
.scp-content-modal.active .scp-modal-content a:hover {
    cursor: pointer !important;
}

.scp-content-modal .scp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    pointer-events: auto;
}

.scp-content-modal .scp-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
}

.scp-content-modal.active .scp-modal-body {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.scp-content-modal.active .scp-modal-body * {
    pointer-events: auto !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.scp-content-modal .scp-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.scp-content-form {
    padding: 1.5rem;
}

.scp-content-form .scp-form-group {
    margin-bottom: 1.25rem;
}

.scp-content-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.scp-content-form .required {
    color: #ef4444;
}

.scp-content-form input[type="text"],
.scp-content-form input[type="date"],
.scp-content-form input[type="time"],
.scp-content-form input[type="file"],
.scp-content-form textarea,
.scp-content-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.scp-content-form input:focus,
.scp-content-form textarea:focus,
.scp-content-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.scp-content-form .description {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.375rem;
}

.scp-content-form .scp-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.scp-content-form .scp-form-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.scp-content-form .scp-form-feedback.is-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.scp-content-form .scp-form-feedback.is-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.scp-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.scp-modal-close:hover {
    background: rgba(229, 231, 235, 0.8);
    color: #1f2937;
}

.scp-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.scp-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scp-modal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.scp-modal-item:hover {
    background: rgba(249, 250, 251, 1);
}

.scp-modal-item-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
}

.scp-modal-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scp-modal-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.scp-modal-item-name {
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.scp-modal-item-name:hover {
    color: #1e40af;
}

.scp-modal-item-username {
    font-size: 0.875rem;
    color: #6b7280;
}

.scp-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.scp-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.scp-error {
    text-align: center;
    padding: 2rem;
    color: #dc2626;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .scp-modal {
        padding: 1rem;
    }
    
    .scp-modal-content {
        max-height: 90vh;
    }
    
    .scp-modal-header {
        padding: 1rem 1.25rem;
    }
    
    .scp-modal-body {
        padding: 1rem;
    }
}

/* Comments */
.activity-comments {
    margin-top: 1rem;
    display: none;
}

.activity-comments.visible {
    display: block;
}

/* Comment Modal Styles */
.scp-comment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.scp-comment-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.scp-comment-modal-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.scp-comment-modal-content.active {
    opacity: 1;
    visibility: visible;
}

.scp-comment-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.scp-comment-modal-content.active .scp-comment-modal {
    transform: scale(1);
}

.scp-comment-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.scp-comment-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.scp-comment-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.scp-comment-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.scp-comment-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 200px;
    max-height: calc(90vh - 200px);
}

.scp-comment-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #f9fafb;
}

.scp-comment-modal-footer .scp-comment-form {
    margin: 0;
}

body.scp-modal-open {
    overflow: hidden;
}

.activity-comments.loading {
    position: relative;
}

.scp-comments-wrapper {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.scp-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-wrapper[data-depth="0"] {
    margin-bottom: 1rem;
}

.comment-wrapper[data-depth="1"] {
    margin-top: 0.75rem;
    margin-left: 3.25rem;
    position: relative;
    padding-left: 0.5rem;
}

.comment-wrapper[data-depth="1"]::before {
    content: '';
    position: absolute;
    left: -2.75rem;
    top: 1.5rem;
    width: 2rem;
    height: 2px;
    background: rgba(203, 213, 225, 0.4);
    border-radius: 2px;
}

.comment-wrapper[data-depth="2"] {
    margin-top: 0.5rem;
    margin-left: 0;
    padding-left: 0;
    display: none; /* Hide 2nd level replies by default */
}

.comment-wrapper[data-depth="3"],
.comment-wrapper[data-depth="4"],
.comment-wrapper[data-depth="5"] {
    display: none; /* Hide 3rd level and beyond by default */
}

/* Show nested replies when parent has .show-nested class */
.comment-wrapper.show-nested .comment-wrapper[data-depth="2"],
.comment-wrapper.show-nested .comment-wrapper[data-depth="3"],
.comment-wrapper.show-nested .comment-wrapper[data-depth="4"],
.comment-wrapper.show-nested .comment-wrapper[data-depth="5"] {
    display: block;
}

.scp-comment {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.comment-avatar img {
    border-radius: 999px;
    width: 42px;
    height: 42px;
}

.comment-body {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.scp-comment[data-depth="1"] .comment-body,
.scp-comment[data-depth="2"] .comment-body {
    background: #f9fafb;
}

.comment-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.comment-reply-to {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-right: 0.25rem;
}

.comment-reply-to strong {
    font-weight: 600;
    color: #4b5563;
    font-style: normal;
}

.comment-author {
    font-weight: 600;
    color: #111827;
}

.comment-time {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-left: auto;
}

.comment-content {
    margin-top: 0.35rem;
    line-height: 1.55;
    color: #1f2937;
    word-break: break-word;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
    white-space: normal;
    overflow-wrap: break-word;
}

.comment-attachments {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-attachments__media {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-media-link {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    background: #111827;
}

.comment-media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-attachments__gif img {
    max-width: 160px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.6rem;
    font-size: 0.8125rem;
    color: #6b7280;
    align-items: center;
}

.comment-actions button {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-actions button:hover {
    color: #111827;
    text-decoration: underline;
}

.btn-comment-react {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-comment-react:hover {
    background: rgba(239, 246, 255, 1);
    color: #dc2626;
    text-decoration: none;
}

.btn-comment-react.liked {
    color: #dc2626;
}

.btn-comment-react.liked:hover {
    background: rgba(254, 242, 242, 1);
}

.btn-comment-react .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.btn-comment-react .react-count {
    font-size: 0.8125rem;
    font-weight: 500;
}

.comment-replies-container {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.comment-replies-container::before {
    content: '';
    position: absolute;
    left: -2.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(203, 213, 225, 0.3);
    border-radius: 2px;
}

.comment-show-more-replies {
    margin-top: 0.5rem;
    margin-left: 3.25rem;
    padding-left: 0.5rem;
}

.btn-show-more-replies {
    background: none;
    border: none;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.btn-show-more-replies:hover {
    color: #1f2937;
    text-decoration: underline;
}

.comment-hidden-replies {
    margin-top: 0.5rem;
    display: none !important;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.comment-hidden-replies.showing {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 5000px;
}

/* Override inline styles when showing */
.comment-hidden-replies[style*="display: none"].showing,
.comment-hidden-replies[style*="display:none"].showing {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 5000px !important;
}

/* Ensure nested replies are properly hidden when parent is hidden */
.comment-wrapper .comment-hidden-replies:not(.showing) {
    display: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.comment-wrapper .comment-hidden-replies.showing {
    display: flex !important;
    max-height: 5000px !important;
    overflow: visible !important;
}

.comment-actions .btn-delete-comment {
    color: #dc2626;
}

.comment-actions .btn-delete-comment:hover {
    color: #b91c1c;
}

.comment-children {
    margin-top: 0.75rem;
    margin-left: 0;
    padding-left: 3.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
    position: relative;
}

.comment-children::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(203, 213, 225, 0.4), transparent);
    border-radius: 2px;
}

.comment-children .scp-comment {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
    position: relative;
    padding-left: 0.5rem;
}

.comment-children .scp-comment::before {
    content: '';
    position: absolute;
    left: -2.75rem;
    top: 1.5rem;
    width: 2rem;
    height: 2px;
    background: rgba(203, 213, 225, 0.4);
    border-radius: 2px;
}

.comment-children .comment-body {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.comment-children .comment-content {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

/* Nested comment depth styling */
.scp-comment[data-depth="1"] {
    margin-left: 0;
}

.scp-comment[data-depth="2"] {
    margin-left: 0;
}

.scp-comment[data-depth="3"] {
    margin-left: 0;
}

.scp-comment[data-depth="1"] .comment-body,
.scp-comment[data-depth="2"] .comment-body,
.scp-comment[data-depth="3"] .comment-body {
    background: #f9fafb;
    border-color: rgba(229, 231, 235, 0.6);
}

.scp-comment[data-depth="2"] .comment-body {
    background: #f3f4f6;
}

.scp-comment[data-depth="3"] .comment-body {
    background: #e5e7eb;
}

.comment-reply-holder {
    margin-top: 0.75rem;
    margin-left: 0;
    padding-left: 0;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
    width: 100%;
}

.comment-wrapper[data-depth="1"] .comment-reply-holder {
    margin-left: 3.25rem;
    padding-left: 0.5rem;
}

.comment-reply-holder .scp-comment-form {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.comment-reply-holder .scp-comment-form .comment-form-main,
.comment-reply-holder .scp-comment-form textarea {
    width: 100%;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.scp-comment-form {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.85rem;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.comment-form-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.comment-form-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.comment-form-main textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem 8rem 0.75rem 0.75rem;
    border: none;
    border-radius: 0;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    box-sizing: border-box;
    background: transparent;
}

.comment-form-main textarea:focus {
    outline: none;
    box-shadow: none;
}

.comment-form-input-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.comment-form-tools-inline {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    display: flex !important;
    gap: 0.25rem;
    align-items: center;
    z-index: 10;
    flex-shrink: 0;
    pointer-events: auto;
}

.comment-form-tools-inline .comment-tool-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 9999 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.comment-form-tools-inline .comment-tool-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.comment-form-tools-inline .comment-tool-btn.btn-submit-comment-inline {
    background: #2563eb;
    color: #ffffff;
}

.comment-form-tools-inline .comment-tool-btn.btn-submit-comment-inline:hover {
    background: #1d4ed8;
}

.comment-form-tools-inline .comment-tool-btn * {
    pointer-events: none;
    font-size: 16px;
    line-height: 1;
}

.comment-form-tools-inline .comment-tool-btn span:not(.dashicons) {
    font-size: 11px;
    font-weight: 600;
}

.comment-form-main .comment-form-tools {
    display: none !important;
}

.scp-comment-form.is-reply {
    background: #f3f4f6;
    margin-top: 0.5rem;
    position: relative;
    z-index: 2;
}

.comment-form-footer {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.25rem;
}

.comment-form-actions {
    position: relative;
    z-index: 10;
}

.comment-form-main textarea {
    width: 100%;
    min-height: 72px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9375rem;
}

.comment-form-main textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.comment-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-media-chip {
    position: relative;
    max-width: 200px;
    width: auto;
    height: auto;
    min-height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 1px rgba(17, 24, 39, 0.08);
}

.comment-media-chip img,
.comment-media-chip video {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

.comment-media-chip .btn-remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.comment-media-chip .btn-remove-media:hover {
    background: rgba(0, 0, 0, 0.9);
}

.comment-media-chip.uploading {
    animation: comment-media-pulse 1.4s ease-in-out infinite;
}

.comment-media-status {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 4px;
    font-size: 0.625rem;
    text-align: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 4px;
    border-radius: 999px;
}

.comment-media-chip .btn-remove-comment-media,
.comment-media-chip .btn-remove-comment-gif {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.85);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-media-chip .btn-remove-comment-media:hover,
.comment-media-chip .btn-remove-comment-gif:hover {
    background: rgba(220, 38, 38, 0.9);
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comment-form-tools {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.comment-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    position: relative;
    z-index: 9999 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex-shrink: 0;
}

.comment-tool-btn * {
    pointer-events: none;
}

.comment-tool-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1d4ed8;
}

.comment-form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.scp-comment-form .btn-submit-comment {
    background: #1d4ed8;
    color: #ffffff;
    border: none;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.scp-comment-form .btn-submit-comment:hover {
    background: #1e3a8a;
}

.scp-comment-form .btn-cancel-reply {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
}

.scp-comment-form .btn-cancel-reply:hover {
    color: #111827;
    text-decoration: underline;
}

.scp-no-comments {
    font-size: 0.875rem;
    color: #6b7280;
}

@keyframes comment-media-pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.scp-loading {
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.75rem 0;
}

.scp-error {
    color: #dc2626;
    font-size: 0.875rem;
    padding: 0.75rem 0;
}

.scp-no-comments {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .scp-activity-layout {
        flex-direction: column;
    }

    .scp-activity-sidebar {
        width: 100%;
        flex: none;
        order: -1;
    }

    .scp-activity-stream {
        padding: 0;
        max-width: none;
    }
    
    .scp-activity-item {
        border-radius: 0;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        margin-left: 0;
        margin-right: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        border-top: 1px solid rgba(226, 232, 240, 0.7);
        border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    }
    
    .activity-header {
        margin-bottom: 0.75rem;
    }
    
    .activity-content {
        padding: 0;
    }
    
    .activity-actions {
        flex-wrap: wrap;
    }

    .scp-settings-layout {
        flex-direction: column;
    }

    .scp-settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .scp-settings-nav button {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
    }

    .scp-form-grid {
        grid-template-columns: 1fr;
    }

    .scp-user-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .scp-user-card .user-avatar {
        margin: 0 auto;
        width: 120px;
        height: 120px;
    }

    .user-stats-matrix {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0.75rem;
    }

    .scp-user-card .user-actions {
        justify-content: center;
    }

    .scp-profile-page {
        padding: 1.5rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .scp-members-directory,
    .scp-groups-directory {
        padding: 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .scp-user-card,
    .scp-group-card {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .scp-user-card .user-avatar,
    .scp-group-card .group-avatar {
        width: 100px;
        height: 100px;
    }

    .scp-profile-tabs {
        justify-content: center;
        gap: 0.35rem;
    }

    .scp-profile-tabs a {
        padding: 0.35rem 0.75rem;
        font-size: 0.95rem;
    }

    .post-type-switcher {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .post-type-btn {
        flex: 1 1 calc(50% - 0.25rem);
        text-align: center;
    }

    .comment-children {
        margin-left: 1.75rem;
    }
}

@media (max-width: 480px) {
    .user-stats-matrix {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .scp-user-card .user-actions button {
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .scp-group-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .scp-group-card .group-avatar {
        margin: 0 auto;
        width: 120px;
        height: 120px;
    }

    .group-stats-matrix {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.75rem;
    }

    .scp-group-card .group-actions {
        justify-content: center;
        width: 100%;
    }
    
    .scp-group-card .group-actions button,
    .scp-group-card .group-actions a {
        flex: 1 1 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .scp-members-search,
    .scp-groups-search,
    .scp-members-filters,
    .scp-groups-filters {
        width: 100%;
        box-sizing: border-box;
    }
    
    .scp-members-filters input,
    .scp-groups-filters input {
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* Birthday Styles */
.user-birthday {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.user-birthday .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.user-age {
    color: #9ca3af;
    font-size: 0.8125rem;
}

.birthday-soon {
    color: #f59e0b;
    font-weight: 500;
}

.birthday-today {
    color: #dc2626;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Upcoming Birthdays Widget */
.scp-widget-upcoming-birthdays .birthday-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 1.25rem;
    line-height: 1;
    z-index: 1;
}

.scp-widget-upcoming-birthdays .widget-item-avatar {
    position: relative;
}

.scp-widget-upcoming-birthdays .birthday-countdown {
    color: #6b7280;
    font-size: 0.8125rem;
}

.scp-widget-upcoming-birthdays .birthday-age {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.scp-widget-upcoming-birthdays .birthday-today {
    color: #dc2626;
    font-weight: 600;
}

/* Location Styles */
.user-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.user-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.scp-profile-location {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.scp-profile-location h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* Location Autocomplete */
.scp-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.25rem;
}

.scp-autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.scp-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.scp-autocomplete-item:hover {
    background: #f9fafb;
}

.scp-autocomplete-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6b7280;
    flex-shrink: 0;
}

.scp-autocomplete-item .location-text {
    flex: 1;
    color: #1f2937;
    font-size: 0.875rem;
}

.scp-profile-settings .scp-form-grid label.full {
    position: relative;
}

.scp-profile-settings #scp-location-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scp-profile-settings #scp-location-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* Notifications Menu */
.scp-notifications-menu {
    position: relative;
}

.scp-notifications-toggle {
    position: relative;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scp-notifications-toggle:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.scp-notifications-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.scp-notifications-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.notifications-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.btn-mark-all-read {
    background: transparent;
    border: none;
    color: #3b82f6;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.btn-mark-all-read:hover {
    background: #f0f9ff;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    position: relative;
    padding: 0.875rem 2rem 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.notification-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.notification-delete-btn:hover {
    color: #ef4444;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-item.unread:hover {
    background: #dbeafe;
}

.notification-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
}

.notification-text {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.notifications-loading,
.notifications-empty,
.notifications-error {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.notifications-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.notifications-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* Group Location Map Styles */
.scp-group-location {
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

#scp-group-location-map,
#scp-group-location-map-preview {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
}

#scp-group-location-map-preview {
    height: 200px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

/* Group Spots Styles */
.scp-group-spots {
    margin: 20px 0;
}

.scp-spot-card {
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.scp-spot-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scp-spot-card h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #111827;
}

.scp-create-spot-btn {
    font-size: 14px;
    padding: 8px 16px;
}

/* Hangout Map Page Styles */
.scp-hangout-map-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.scp-hangout-map-header {
    margin-bottom: 20px;
}

.scp-hangout-map-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.scp-hangout-map-header .description {
    color: #6b7280;
    font-size: 14px;
}

.scp-hangout-map-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.scp-map-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scp-map-filters select,
.scp-map-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.scp-map-filters input {
    min-width: 200px;
}

.scp-map-legend {
    margin-left: auto;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
}

.scp-map-legend span {
    display: inline-flex;
    align-items: center;
}

.scp-map-legend span span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    display: inline-block;
}

#scp-hangout-map {
    width: 100%;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f3f4f6;
    position: relative;
}

.scp-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6b7280;
}

.scp-map-results-list {
    margin-top: 20px;
}

/* Leaflet Map Marker Styles */
.scp-map-marker-group {
    background: #3b82f6;
}

.scp-map-marker-spot {
    background: #10b981;
}

/* Responsive Styles for Maps */
@media (max-width: 768px) {
    .scp-hangout-map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .scp-map-legend {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .scp-map-filters {
        width: 100%;
    }
    
    .scp-map-filters input,
    .scp-map-filters select {
        width: 100%;
        min-width: auto;
    }
    
    #scp-hangout-map {
        height: 400px;
    }
    
    #scp-group-location-map,
    #scp-group-location-map-preview {
        height: 200px;
    }
}

/* ============================================
   ENHANCED CARD DESIGNS - GROUPS, PAGES, COMMUNITIES
   ============================================ */

/* Page Card Styles */
.scp-page-card {
    display: inline-block;
    width: calc(33.333% - 14px);
    margin: 7px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    vertical-align: top;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.scp-page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scp-page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.scp-page-card:hover::before {
    opacity: 1;
}

.scp-page-card .scp-page-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: transform 0.3s ease;
}

.scp-page-card:hover .scp-page-card-avatar {
    transform: scale(1.05);
}

.scp-page-card .scp-page-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scp-page-card .scp-page-card-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #6366f1;
}

.scp-page-card h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.scp-page-card h4 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scp-page-card h4 a:hover {
    color: #2563eb;
}

.scp-page-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.scp-page-card .scp-page-card-meta {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scp-pages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Community Card Styles */
.scp-community-card {
    display: inline-block;
    width: calc(33.333% - 14px);
    margin: 7px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    vertical-align: top;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.scp-community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scp-community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.scp-community-card:hover::before {
    opacity: 1;
}

.scp-community-card .scp-community-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: transform 0.3s ease;
}

.scp-community-card:hover .scp-community-card-avatar {
    transform: scale(1.05);
}

.scp-community-card .scp-community-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scp-community-card .scp-community-card-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #10b981;
}

.scp-community-card h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.scp-community-card h4 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scp-community-card h4 a:hover {
    color: #059669;
}

.scp-community-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.scp-community-card .scp-community-card-meta {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scp-communities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced Group Card Improvements */
.scp-group-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scp-group-card:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

/* Page Single Template Styles */
/* Container Wrapper for proper margins */
.scp-container-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    background: #ffffff;
    min-height: 100vh;
}

/* Page Creation Form Styles */
.scp-page-create {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.05);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    box-sizing: border-box;
}

.scp-page-create .scp-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.scp-page-create label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.scp-page-create label .required {
    color: #dc2626;
}

.scp-page-create input[type="text"],
.scp-page-create input[type="url"],
.scp-page-create input[type="email"],
.scp-page-create input[type="tel"],
.scp-page-create textarea,
.scp-page-create select {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.85rem 1rem;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(248, 250, 252, 0.65);
    width: 100%;
    box-sizing: border-box;
}

.scp-page-create textarea {
    resize: vertical;
    min-height: 120px;
}

.scp-page-create input:focus,
.scp-page-create textarea:focus,
.scp-page-create select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.85);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.scp-page-create .description {
    margin: 0.35rem 0 0 0;
    font-size: 0.85rem;
    color: #475569;
}

.scp-page-create .scp-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.scp-page-create .scp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.scp-page-create .scp-button--primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.scp-page-create .scp-button--primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.scp-page-create .scp-avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scp-page-create .scp-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed rgba(148, 163, 184, 0.4);
}

.scp-page-create .scp-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scp-page-create .scp-avatar-controls {
    display: flex;
    gap: 0.5rem;
}

.scp-page-create .scp-form-feedback {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.scp-page-create .scp-form-feedback.is-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.scp-page-create .scp-form-feedback.is-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@media (max-width: 768px) {
    .scp-page-create {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .scp-page-create .scp-form-actions {
        width: 100%;
    }
    
    .scp-page-create .scp-button {
        width: 100%;
    }
}

.scp-page-single,
.scp-community-single {
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

/* Ensure proper container wrapper */
.scp-page-single > *,
.scp-community-single > * {
    box-sizing: border-box;
}

.scp-page-header,
.scp-community-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    background: var(--scp-background, #ffffff);
    border-radius: 16px;
    border: 1px solid var(--scp-border, rgba(226, 232, 240, 0.8));
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
    flex-wrap: wrap;
}

.scp-page-avatar,
.scp-community-avatar {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

.scp-community-avatar {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.scp-page-avatar img,
.scp-community-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scp-page-meta,
.scp-community-meta {
    flex: 1;
    min-width: 0;
}

.scp-page-meta h2,
.scp-community-meta h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.scp-page-category,
.scp-community-category {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    text-transform: capitalize;
}

.scp-community-privacy {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
    text-transform: capitalize;
}

.scp-page-actions,
.scp-community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.scp-page-actions .button,
.scp-community-actions .button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}

.scp-page-body,
.scp-community-body {
    background: var(--scp-background, #ffffff);
    border-radius: 16px;
    border: 1px solid var(--scp-border, rgba(226, 232, 240, 0.8));
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
}

.scp-page-description,
.scp-community-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--scp-text, #334155);
    margin-bottom: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scp-page-description p,
.scp-community-description p {
    margin: 0 0 12px 0;
}

.scp-page-description p:last-child,
.scp-community-description p:last-child {
    margin-bottom: 0;
}

.scp-page-contact,
.scp-community-rules,
.scp-community-location,
.scp-page-location {
    margin: 24px 0;
    padding: 20px;
    background: var(--scp-background, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--scp-border, rgba(226, 232, 240, 0.6));
    box-sizing: border-box;
    width: 100%;
}

.scp-community-location,
.scp-page-location {
    background: var(--scp-background, #ffffff);
}

.scp-page-contact h3,
.scp-community-rules h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.scp-page-contact p {
    margin: 8px 0;
    font-size: 14px;
    color: #475569;
}

.scp-page-contact a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scp-page-contact a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Enhanced Hangout Map Styles */
.scp-hangout-map-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
}

.scp-hangout-map-header {
    margin-bottom: 30px;
    text-align: center;
}

.scp-hangout-map-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scp-hangout-map-header .description {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

.scp-hangout-map-controls {
    margin: 30px 0;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    box-sizing: border-box;
}

.scp-map-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.scp-map-filters select,
.scp-map-filters input[type="text"] {
    padding: 10px 14px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.scp-map-filters select:focus,
.scp-map-filters input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.scp-map-filters input[type="text"] {
    min-width: 220px;
    flex: 1;
}

.scp-map-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.scp-map-filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.scp-map-legend {
    margin-left: auto;
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
}

.scp-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.scp-map-legend span span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#scp-hangout-map {
    width: 100%;
    height: 650px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.scp-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #64748b;
    font-size: 16px;
    z-index: 1000;
}

.scp-map-results-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Profile Tab Navigation Improvements */
.scp-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 30px 0;
    border-bottom: 2px solid rgba(226, 232, 240, 0.8);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    align-items: center;
    z-index: 1000;
}

.scp-profile-tabs a.scp-tab-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.scp-profile-tabs a.scp-tab-main:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px 8px 0 0;
}

.scp-profile-tabs a.scp-tab-main.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.scp-profile-tabs .tab-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scp-profile-tabs .tab-icon svg {
    width: 100%;
    height: 100%;
}

/* Hamburger Menu for Additional Tabs */
.scp-profile-tabs-more {
    position: relative;
    margin-left: auto;
    z-index: 10000 !important;
    isolation: isolate;
}

.scp-profile-tabs-more * {
    box-sizing: border-box;
}

.scp-tabs-more-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    min-width: auto;
    min-height: auto;
}

/* Ensure button children don't block clicks - already set above, just ensuring */
.scp-tabs-more-toggle .hamburger-icon,
.scp-tabs-more-toggle .more-label {
    pointer-events: none !important;
}

/* Debug: Ensure button is fully visible and clickable */
.scp-tabs-more-toggle {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
}

/* Ensure no overlay covers the button */
.scp-profile-tabs-more::before,
.scp-profile-tabs-more::after {
    display: none !important;
    pointer-events: none !important;
    content: none !important;
}

.scp-tabs-more-toggle:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px 8px 0 0;
}

.scp-tabs-more-toggle[aria-expanded="true"] {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
    height: 16px;
    justify-content: space-between;
    pointer-events: none;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.scp-tabs-more-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.scp-tabs-more-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.scp-tabs-more-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.scp-tabs-more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 200px;
    max-width: 300px;
    margin-top: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10002 !important;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
    pointer-events: auto !important;
}

.scp-tabs-more-dropdown[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scp-tabs-more-dropdown .scp-tab-more {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    border-bottom: none;
    margin: 0;
}

.scp-tabs-more-dropdown .scp-tab-more:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #2563eb;
}

.scp-tabs-more-dropdown .scp-tab-more.is-active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 600;
}

.scp-tabs-more-dropdown .scp-tab-notification-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
}

.scp-tabs-more-dropdown .tab-icon {
    width: 18px;
    height: 18px;
}

/* Dark Mode Support for Hamburger Menu */
body.scp-dark-mode-active .scp-tabs-more-dropdown,
html.scp-dark-mode-active .scp-tabs-more-dropdown {
    background: var(--scp-bg-secondary, #1f2937);
    border-color: var(--scp-border-color, #374151);
}

body.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more,
html.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more {
    color: var(--scp-text-primary, #f9fafb);
}

body.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more:hover,
html.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

body.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more.is-active,
html.scp-dark-mode-active .scp-tabs-more-dropdown .scp-tab-more.is-active {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

/* Responsive Design for Profile Navigation */
@media (max-width: 768px) {
    .scp-profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .scp-profile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .scp-profile-tabs a.scp-tab-main {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .scp-profile-tabs-more {
        flex-shrink: 0;
    }
    
    .scp-tabs-more-toggle {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .scp-tabs-more-dropdown {
        right: auto;
        left: 0;
        min-width: 180px;
        max-width: 250px;
    }
    
    .scp-tabs-more-dropdown .scp-tab-more {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .scp-page-card,
    .scp-community-card {
        width: calc(50% - 14px);
    }
    
    .scp-page-header,
    .scp-community-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .scp-page-meta,
    .scp-community-meta {
        width: 100%;
        text-align: center;
    }
    
    .scp-page-actions,
    .scp-community-actions {
        justify-content: center;
    }
    
    .scp-hangout-map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .scp-map-legend {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .scp-map-filters {
        width: 100%;
    }
    
    .scp-map-filters input[type="text"],
    .scp-map-filters select {
        width: 100%;
        min-width: auto;
    }
    
    #scp-hangout-map {
        height: 450px;
    }
    
    .scp-profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .scp-profile-tabs a {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .scp-page-card,
    .scp-community-card {
        width: 100%;
        margin: 7px 0;
    }
    
    .scp-page-single,
    .scp-community-single,
    .scp-hangout-map-page {
        padding: 20px 15px;
    }
    
    .scp-page-header,
    .scp-community-header {
        padding: 20px;
    }
    
    .scp-page-body,
    .scp-community-body {
        padding: 20px;
    }
    
    #scp-hangout-map {
        height: 350px;
    }
    
    .scp-hangout-map-header h1 {
        font-size: 24px;
    }
}

/* Profile Tab Actions & Sections */
.scp-profile-tab-actions {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.scp-profile-tab-actions .description {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.scp-profile-section {
    margin-bottom: 32px;
}

.scp-section-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.scp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
}

/* Location Map Styles */
.scp-page-location,
.scp-community-location {
    margin: 24px 0;
    padding: 20px;
    background: var(--scp-background, #ffffff);
    border-radius: 12px;
    border: 1px solid var(--scp-border, rgba(226, 232, 240, 0.6));
    box-sizing: border-box;
    width: 100%;
}

.scp-page-location h3,
.scp-community-location h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.scp-location-address {
    margin: 0 0 16px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.scp-location-map {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    max-width: 100%;
}

/* Community Members Section */
.scp-community-members {
    margin: 30px 0;
    padding: 0;
}

.scp-community-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.scp-community-member-item {
    display: inline-block;
    margin: 0;
    text-align: center;
    box-sizing: border-box;
}

.scp-community-member-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.scp-community-member-item img {
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

/* Activity Section */
.scp-community-activity,
.scp-page-activity {
    margin: 30px 0 0 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

.scp-community-activity h3,
.scp-page-activity h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--scp-text, #0f172a);
}

.scp-section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--scp-text, #0f172a);
}

/* Groups Directory Improvements */
.scp-groups-directory {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.scp-groups-search {
    margin-bottom: 24px;
}

.scp-groups-search .scp-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.scp-groups-search .scp-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.scp-groups-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.scp-groups-filters .filter-btn {
    padding: 10px 18px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scp-groups-filters .filter-btn:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
}

.scp-groups-filters .filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.scp-groups-filters .scp-groups-location-filter {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.scp-groups-filters .scp-groups-location-filter:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Profile Tabs Container Improvements - Consistent Width */
.scp-profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    background: #ffffff !important;
}

.scp-profile-tab-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0; /* Prevent flex overflow */
}

/* Container Alignment Fixes - Ensure Consistent Width */
.scp-profile-pages-tab,
.scp-profile-communities-tab,
.scp-profile-groups-tab,
.scp-profile-media-tab,
.scp-profile-events-tab,
.scp-profile-marketplace-tab {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    min-width: 0;
}

/* Ensure all containers respect max-width */
.scp-groups-directory,
.scp-pages-list,
.scp-communities-list,
.scp-events-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* Profile Grids - Consistent Card Widths */
.scp-profile-groups-grid,
.scp-profile-pages-grid,
.scp-profile-communities-grid,
.scp-profile-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* Ensure cards have consistent minimum width and prevent shrinking */
.scp-profile-groups-grid > *,
.scp-profile-pages-grid > *,
.scp-profile-communities-grid > *,
.scp-profile-events-grid > *,
.scp-group-card,
.scp-page-card,
.scp-community-card,
.scp-event-card {
    min-width: 280px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Ensure all card-like elements in profile tabs have consistent width */
.scp-profile-tab-panel .scp-card,
.scp-profile-tab-panel .scp-box,
.scp-profile-tab-panel .scp-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Activity items - consistent width */
.scp-profile-tab-panel .scp-activity-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Activity Section Styles */
.scp-page-activity,
.scp-community-members {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* ============================================
   MOBILE & TOUCH OPTIMIZATION
   ============================================ */

/* Touch-friendly button sizes (minimum 44x44px recommended) */
button,
.button,
.scp-group-card .group-actions button,
.scp-group-card .group-actions a,
.scp-page-actions .button,
.scp-community-actions .button,
.scp-map-filters button,
.scp-map-locate-me,
.scp-profile-tab-actions .button {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation; /* Prevent double-tap zoom */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2); /* iOS tap highlight */
}

/* Touch-friendly inputs */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
}

/* Prevent text size adjustment on mobile */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Smooth scrolling on mobile */
.scp-profile-tabs,
.scp-groups-list,
.scp-pages-list,
.scp-communities-list {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* Improved touch targets for interactive elements */
.scp-profile-tabs a,
.scp-user-card .user-actions button,
.scp-group-card .group-actions button,
.scp-group-card .group-actions a,
.scp-page-card h4 a,
.scp-community-card h4 a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
}

/* Prevent horizontal scrolling */
body,
.scp-profile-page,
.scp-groups-directory,
.scp-members-directory,
.scp-hangout-map-page,
.scp-page-single,
.scp-community-single {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Image optimization for mobile */
img {
    max-width: 100%;
    height: auto;
}

/* Card layout improvements for small screens */
@media (max-width: 640px) {
    .scp-page-card,
    .scp-community-card {
        width: 100%;
        margin: 7px 0;
    }
    
    .scp-pages-list,
    .scp-communities-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .scp-group-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .scp-group-card .group-avatar {
        margin: 0 auto;
    }
}

/* Enhanced mobile breakpoints */
@media (max-width: 768px) {
    /* Improve readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Larger tap targets for navigation */
    .scp-profile-tabs a {
        padding: 14px 18px;
        min-height: 48px;
    }
    
    /* Better spacing on mobile */
    .scp-container-wrapper {
        padding: 15px;
    }
    
    .scp-profile-page,
    .scp-groups-directory,
    .scp-members-directory,
    .scp-hangout-map-page {
        padding: 15px;
    }
    
    .scp-page-single,
    .scp-community-single {
        padding: 0;
    }
    
    .scp-page-header,
    .scp-community-header {
        flex-wrap: wrap;
        padding: 20px;
    }
    
    .scp-page-avatar,
    .scp-community-avatar {
        width: 80px;
        height: 80px;
    }
    
    .scp-page-meta h2,
    .scp-community-meta h2 {
        font-size: 24px;
    }
    
    /* Card improvements */
    .scp-page-card,
    .scp-community-card {
        padding: 18px;
    }
    
    /* Form improvements */
    .scp-profile-tab-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .scp-profile-tab-actions .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Map improvements */
    #scp-hangout-map,
    .scp-location-map {
        height: 400px;
    }
    
    /* Button stacking */
    .scp-page-actions,
    .scp-community-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .scp-page-actions .button,
    .scp-community-actions .button {
        width: 100%;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .scp-profile-page,
    .scp-groups-directory,
    .scp-members-directory,
    .scp-hangout-map-page,
    .scp-container-wrapper {
        padding: 12px;
    }
    
    .scp-page-single,
    .scp-community-single {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .scp-page-header,
    .scp-community-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .scp-page-avatar,
    .scp-community-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .scp-page-meta,
    .scp-community-meta {
        text-align: center;
        width: 100%;
    }
    
    .scp-page-body,
    .scp-community-body {
        padding: 20px;
    }
    
    /* Compact headers */
    .scp-page-header,
    .scp-community-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .scp-page-avatar,
    .scp-community-avatar {
        margin: 0 auto 16px;
    }
    
    /* Smaller font sizes for headers */
    .scp-page-meta h2,
    .scp-community-meta h2 {
        font-size: 22px;
    }
    
    .scp-section-title {
        font-size: 18px;
    }
    
    /* Map on small screens */
    #scp-hangout-map,
    .scp-location-map {
        height: 300px;
    }
    
    /* Compact cards */
    .scp-page-card .scp-page-card-avatar,
    .scp-community-card .scp-community-card-avatar {
        width: 56px;
        height: 56px;
        margin-bottom: 10px;
    }
    
    .scp-page-card h4,
    .scp-community-card h4 {
        font-size: 16px;
    }
    
    /* Touch-friendly stats */
    .group-stats-matrix {
        gap: 8px;
        padding: 12px;
    }
    
    /* Better filter layout */
    .scp-groups-filters {
        flex-direction: column;
    }
    
    .scp-groups-filters .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .scp-map-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .scp-map-filters select,
    .scp-map-filters input,
    .scp-map-filters label {
        width: 100%;
    }
    
    .scp-map-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    #scp-hangout-map,
    .scp-location-map {
        height: 350px;
    }
    
    .scp-profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .scp-page-card,
    .scp-community-card,
    .scp-group-card {
        border-width: 0.5px;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .scp-page-card,
    .scp-community-card,
    .scp-group-card {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Print styles */
@media print {
    .scp-profile-tabs,
    .scp-page-actions,
    .scp-community-actions,
    .scp-group-card .group-actions,
    .scp-hangout-map-controls {
        display: none;
    }
    
    .scp-page-card,
    .scp-community-card,
    .scp-group-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ========================================
   Story Viewer - Instagram-style Stories
   ======================================== */

/* Story Circles Container (Horizontal Scroll) */
.scp-story-circles-container {
    margin-bottom: 20px;
    padding: 15px 0;
    background: var(--scp-background, #fff);
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
}

.scp-story-circles-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scp-story-circles-wrapper::-webkit-scrollbar {
    display: none;
}

/* Story Circle Item */
.scp-story-circle-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    width: 80px;
}

.scp-story-circle-border {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease;
}

.scp-story-circle-item:not(.seen) .scp-story-circle-border {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.scp-story-circle-item.seen .scp-story-circle-border {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

.scp-story-circle-item:hover .scp-story-circle-border {
    transform: scale(1.05);
}

.scp-story-circle-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--scp-background, #fff);
}

.scp-story-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid var(--scp-background, #fff);
}

.scp-story-circle-title {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--scp-text, #111827);
}

.scp-story-circle-title.uncropped {
    white-space: normal;
    max-width: 80px;
    word-wrap: break-word;
    line-height: 1.3;
}

/* Full-Screen Story Viewer */
.scp-story-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-story-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.scp-story-viewer-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 100%;
    max-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Story Circles in Viewer */
.scp-story-circles {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.scp-story-circle {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.scp-story-circle.active .scp-story-circle-border {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.3);
}

/* Progress Bars */
.scp-story-progress-bars {
    display: flex;
    gap: 4px;
    padding: 15px 15px 10px;
    position: relative;
    z-index: 10;
}

.scp-story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.scp-story-progress-bar.completed {
    background: rgba(255, 255, 255, 0.6);
}

.scp-story-progress-bar.active .scp-story-progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    animation: story-progress 5s linear forwards;
}

.scp-story-progress-bar.completed .scp-story-progress-fill {
    width: 100%;
    background: #fff;
}

@keyframes story-progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Story Content Area */
.scp-story-content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-story-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
}

.scp-story-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.scp-story-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Story Media Container */
.scp-story-media-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-story-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scp-story-item.active {
    display: flex;
    opacity: 1;
}

.scp-story-media-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scp-story-media-wrapper.full-size img,
.scp-story-media-wrapper.full-size video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scp-story-media-wrapper:not(.full-size) img,
.scp-story-media-wrapper:not(.full-size) video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.scp-story-image,
.scp-story-video {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.scp-story-caption {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 15px 20px;
    color: #fff;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.scp-story-caption p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Swipe Up Button */
.scp-story-button-wrapper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

.scp-story-swipe-button {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scp-story-swipe-button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Navigation Hints */
.scp-story-nav-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 20px;
    z-index: 15;
    transition: color 0.2s;
    pointer-events: none;
}

.scp-story-nav-hint.prev {
    left: 10px;
}

.scp-story-nav-hint.next {
    right: 10px;
}

.scp-story-item:hover .scp-story-nav-hint {
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scp-story-circles-wrapper {
        padding: 0 10px;
        gap: 12px;
    }
    
    .scp-story-circle-item {
        width: 70px;
    }
    
    .scp-story-circle-border {
        width: 70px;
        height: 70px;
    }
    
    .scp-story-viewer-container {
        max-width: 100%;
    }
    
    .scp-story-nav-hint {
        font-size: 24px;
        padding: 15px;
    }
}

/* ============================================
   Browser-Based Recorder Styles
   ============================================ */

.scp-recorder-status {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.scp-recorder-status.recording {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.scp-recorder-status.paused {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.scp-recorder-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.scp-recorder-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.scp-recording-timer {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    z-index: 10;
    white-space: nowrap;
}

.scp-video-preview-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9 / 16;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-video-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scp-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.scp-recorder-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.scp-recorder-controls .scp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.scp-recorder-controls .scp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scp-recorder-controls .scp-btn-primary {
    background: var(--scp-primary, #1d4ed8);
    color: #fff;
}

.scp-recorder-controls .scp-btn-secondary {
    background: #6b7280;
    color: #fff;
}

.scp-recorder-controls .scp-btn-danger {
    background: #dc2626;
    color: #fff;
}

.scp-recorder-controls .scp-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.scp-recorder-controls .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.scp-recorder-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.scp-recorder-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.scp-recorder-tab.active {
    color: var(--scp-primary, #1d4ed8);
    border-bottom-color: var(--scp-primary, #1d4ed8);
}

.scp-recorder-tab:hover {
    color: var(--scp-primary, #1d4ed8);
}

.scp-recorder-content {
    display: none;
}

.scp-recorder-content[data-tab] {
    display: block;
}

/* ========== MARKETPLACE QUICK WINS FEATURES STYLING ========== */

/* Comparison Button */
.scp-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-compare-btn:hover {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
    border-color: var(--scp-accent, #22c55e);
}

.scp-compare-btn.in-compare {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
    border-color: var(--scp-accent, #22c55e);
}

.scp-compare-btn.max-reached:not(.in-compare) {
    opacity: 0.5;
    cursor: not-allowed;
}

.scp-compare-btn .compare-icon {
    font-size: 16px;
}

/* Comparison Page */
.scp-compare-page {
    padding: 20px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    margin: 20px 0;
}

.scp-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--scp-border, #e5e7eb);
}

.scp-compare-header h1 {
    margin: 0;
    color: var(--scp-text, #111827);
}

.scp-compare-table-wrapper {
    overflow-x: auto;
}

.scp-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--scp-card-background, #ffffff);
}

.scp-compare-table th,
.scp-compare-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
}

.scp-compare-table th {
    background: var(--scp-background, transparent);
    font-weight: 600;
    color: var(--scp-text, #111827);
}

.scp-compare-table .compare-listing {
    text-align: center;
    vertical-align: top;
    min-width: 200px;
}

.scp-compare-table .compare-listing-image img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.scp-compare-table .compare-value {
    text-align: center;
}

.scp-compare-table .na {
    color: var(--scp-secondary, #6b7280);
    font-style: italic;
}

.scp-remove-compare {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-compare-empty {
    text-align: center;
    padding: 60px 20px;
}

/* Wishlist Button */
.scp-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-wishlist-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.scp-wishlist-btn.in-wishlist {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.scp-wishlist-btn .wishlist-icon {
    font-size: 18px;
}

/* Recently Viewed */
.scp-recently-viewed-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--scp-border, #e5e7eb);
}

.scp-recently-viewed-section h3 {
    margin: 0 0 15px 0;
    color: var(--scp-text, #111827);
    font-size: 18px;
}

.scp-recently-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scp-recently-viewed-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--scp-background, transparent);
    border-radius: 6px;
    transition: background 0.2s;
}

.scp-recently-viewed-item:hover {
    background: var(--scp-border, #e5e7eb);
}

.scp-recently-viewed-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.scp-recently-viewed-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.scp-recently-viewed-content h4 a {
    color: var(--scp-text, #111827);
    text-decoration: none;
}

.scp-recently-viewed-price {
    font-weight: 600;
    color: var(--scp-accent, #22c55e);
    font-size: 14px;
}

/* Price Alert Button */
.scp-price-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-price-alert-btn:hover {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
}

.scp-price-alert-btn.has-alert {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
}

.scp-price-alert-btn .price-alert-icon {
    font-size: 16px;
}

/* Social Share Dropdown */
.scp-social-share-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    min-width: 180px;
    z-index: 1000;
}

.scp-social-share-dropdown a,
.scp-social-share-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--scp-text, #111827);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.scp-social-share-dropdown a:hover,
.scp-social-share-dropdown button:hover {
    background: var(--scp-border, #e5e7eb);
}

.scp-social-share-dropdown .share-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Listing Tags */
.scp-listing-tags-section {
    margin: 20px 0;
    padding: 15px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--scp-border, #e5e7eb);
}

.scp-listing-tags-section h4 {
    margin: 0 0 12px 0;
    color: var(--scp-text, #111827);
    font-size: 16px;
}

.scp-listing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.scp-listing-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--scp-background, transparent);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 20px;
    font-size: 13px;
    color: var(--scp-text, #111827);
}

.scp-listing-tag .scp-remove-tag {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--scp-secondary, #6b7280);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.scp-listing-tag .scp-remove-tag:hover {
    background: #dc2626;
}

.scp-add-tag-btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* Vendor Follow Button */
.scp-vendor-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--scp-card-background, #ffffff);
    border: 2px solid var(--scp-accent, #22c55e);
    border-radius: 6px;
    color: var(--scp-accent, #22c55e);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-vendor-follow-btn:hover {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

.scp-vendor-follow-btn.following {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

.scp-vendor-follow-btn .follow-icon {
    font-size: 16px;
}

.scp-vendor-follow-btn .followers-count {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid currentColor;
    opacity: 0.8;
    font-size: 12px;
}

/* Verification Badge */
.scp-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scp-verified-badge.badge-large {
    padding: 10px 18px;
    font-size: 15px;
}

.scp-verified-badge .verified-icon {
    font-size: 16px;
    font-weight: bold;
}

.scp-verified-badge.badge-large .verified-icon {
    font-size: 18px;
}

/* Collections */
.scp-collections-page {
    padding: 20px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
}

.scp-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scp-collection-item {
    padding: 20px;
    background: var(--scp-background, transparent);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 8px;
    transition: all 0.2s;
}

.scp-collection-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.scp-collection-item h3 {
    margin: 0 0 10px 0;
    color: var(--scp-text, #111827);
}

.scp-collection-item .collection-privacy {
    display: inline-block;
    padding: 4px 8px;
    background: var(--scp-border, #e5e7eb);
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Listing Actions Container */
.scp-marketplace-listing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.scp-marketplace-listing-compare-section,
.scp-marketplace-listing-social-section {
    margin: 15px 0;
    padding: 15px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--scp-border, #e5e7eb);
}

.scp-listing-social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scp-listing-social-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-listing-social-actions button:hover {
    background: var(--scp-border, #e5e7eb);
}

/* Dark Mode Support */
body.scp-dark-mode-active .scp-compare-btn,
body.scp-dark-mode-active .scp-wishlist-btn,
body.scp-dark-mode-active .scp-price-alert-btn,
body.scp-dark-mode-active .scp-vendor-follow-btn {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
    color: var(--scp-text, #ffffff);
}

body.scp-dark-mode-active .scp-compare-btn:hover,
body.scp-dark-mode-active .scp-wishlist-btn:hover,
body.scp-dark-mode-active .scp-price-alert-btn:hover {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

body.scp-dark-mode-active .scp-social-share-dropdown {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
}

body.scp-dark-mode-active .scp-social-share-dropdown a,
body.scp-dark-mode-active .scp-social-share-dropdown button {
    color: var(--scp-text, #ffffff);
}

body.scp-dark-mode-active .scp-social-share-dropdown a:hover,
body.scp-dark-mode-active .scp-social-share-dropdown button:hover {
    background: var(--scp-border, #3a3b3c);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scp-compare-table-wrapper {
        overflow-x: scroll;
    }
    
    .scp-compare-table .compare-listing {
        min-width: 150px;
    }
    
    .scp-listing-social-actions {
        flex-direction: column;
    }
    
    .scp-listing-social-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .scp-collections-grid {
        grid-template-columns: 1fr;
    }
    
    .scp-social-share-dropdown {
        left: auto;
        right: 0;
    }
}

/* Mobile Responsive for Recorder */
@media (max-width: 768px) {
    .scp-video-preview-container {
        max-width: 100%;
    }
    
    .scp-recorder-controls {
        flex-direction: column;
    }
    
    .scp-recorder-controls .scp-btn {
        width: 100%;
        justify-content: center;
    }
    
    .scp-recording-timer {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* ============================================
   MOBILE-FIRST ACTIVITY WALL IMPROVEMENTS
   ============================================ */

/* Activity Form Mobile Fixes */
@media (max-width: 768px) {
    .scp-activity-form {
        padding: 1rem;
        margin: 0.75rem;
        border-radius: 12px;
    }
    
    .scp-activity-post-form .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
        order: 1;
    }
    
    .privacy-select {
        order: 2;
        width: 100%;
    }
    
    .privacy-select select {
        width: 100%;
    }
    
    .btn-submit {
        order: 3;
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    .scp-activity-post-form textarea {
        min-height: 80px;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Post Type Toolbar Mobile */
    .post-type-switcher.scp-post-type-toolbar {
        padding: 6px;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .post-type-switcher.scp-post-type-toolbar::-webkit-scrollbar {
        display: none;
    }
    
    .scp-post-type-icon-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-height: 32px;
    }
    
    .scp-post-type-icon-btn .post-type-label {
        display: none;
    }
}

/* Activity Item Mobile */
@media (max-width: 768px) {
    .scp-activity-item {
        padding: 1rem;
        margin: 0 0.5rem 0.75rem;
        border-radius: 12px;
    }
    
    .activity-header {
        gap: 0.5rem;
    }
    
    .activity-header .avatar {
        width: 40px;
        height: 40px;
    }
    
    .activity-header .author-name {
        font-size: 0.9rem;
    }
    
    .activity-header .activity-time {
        font-size: 0.75rem;
    }
    
    .activity-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .activity-actions {
        gap: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .activity-actions button {
        padding: 0.4rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Emoji Panel Mobile Fixes */
@media (max-width: 480px) {
    #scp-emoji-panel,
    .emoji-panel {
        width: calc(100vw - 20px) !important;
        max-width: 280px;
        left: 10px !important;
        right: 10px !important;
        padding: 8px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        max-height: 200px;
    }
    
    .emoji-item {
        font-size: 20px;
        padding: 6px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* GIF Picker Mobile */
@media (max-width: 480px) {
    #scp-gif-picker,
    .gif-picker {
        width: calc(100vw - 20px) !important;
        max-width: 320px;
        left: 10px !important;
        right: 10px !important;
    }
    
    .gif-picker-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tag Friends Panel Mobile */
@media (max-width: 480px) {
    #scp-tag-friends-panel,
    .tag-friends-panel {
        width: calc(100vw - 20px) !important;
        max-width: 320px;
        left: 10px !important;
        right: 10px !important;
    }
}

/* Error / Loading States Mobile Styling */
.scp-error-message,
.scp-loading-message {
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    margin: 1rem;
}

.scp-error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.scp-loading-message {
    background: #f3f4f6;
    color: #6b7280;
}

/* Fix touch interactions */
@media (hover: none) and (pointer: coarse) {
    .action-buttons button:active {
        background: rgba(59, 130, 246, 0.15);
        transform: scale(0.95);
    }
    
    .btn-submit:active {
        transform: scale(0.98);
    }
    
    .scp-post-type-icon-btn:active {
        background: rgba(59, 130, 246, 0.15);
    }
    
    /* Ensure all clickable elements have proper touch targets */
    .action-buttons button,
    .activity-actions button,
    .btn-submit,
    .scp-post-type-icon-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Full width container on mobile */
@media (max-width: 640px) {
    .scp-activity-stream-container {
        padding: 0;
    }
    
    .scp-activity-content {
        padding: 0;
    }
    
    .scp-activity-sidebar {
        display: none;
    }
    
    /* Story circles scroll */
    .scp-stories-container {
        margin: 0 -0.5rem;
        padding: 0.5rem;
    }
}

/* Comments Mobile */
@media (max-width: 768px) {
    .scp-comment {
        padding: 0.75rem;
    }
    
    .comment-author-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-form-wrapper textarea {
        min-height: 60px;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .comment-tool-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 0.35rem;
    }
}

/* Profile / Directory Mobile */
@media (max-width: 640px) {
    .scp-members-grid,
    .scp-groups-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .scp-profile-page {
        padding: 0.75rem;
    }
    
    .scp-user-card {
        padding: 1rem;
    }
    
    .user-stats-matrix {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* Navigation / Tabs Mobile */
@media (max-width: 768px) {
    .scp-profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.25rem;
        padding-bottom: 0.25rem;
    }
    
    .scp-profile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .scp-profile-tabs a {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Modals Mobile */
@media (max-width: 640px) {
    .scp-modal-content,
    .scp-content-modal .scp-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .scp-modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: inherit;
        z-index: 10;
    }
    
    .scp-modal-body {
        padding: 1rem;
    }
}

/* Marketplace Mobile */
@media (max-width: 768px) {
    .scp-marketplace-listing-form .scp-marketplace-form-group {
        margin-bottom: 1rem;
    }
    
    .scp-marketplace-listing-form input[type="text"],
    .scp-marketplace-listing-form input[type="number"],
    .scp-marketplace-listing-form textarea,
    .scp-marketplace-listing-form select {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    .scp-marketplace-listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .scp-marketplace-listings-grid {
        grid-template-columns: 1fr;
    }
}