/* WP Media Gallery Pro Styles v6.32.0 - Fixed member logout issue, guest comments, mobile sticky form on all photos */

/* Photo link styling - MUST be fully clickable */
.wpmgp-photo-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.wpmgp-photo-link * {
    pointer-events: none;
}
:root {
    --wpmgp-primary: #4a90d9;
    --wpmgp-secondary: #7c5cc4;
    --wpmgp-lightbox-bg: #000000;
    --wpmgp-lightbox-text: #ffffff;
}

/* ========================================= */
/* FACEBOOK-STYLE PHOTO PAGE */
/* ========================================= */
.wpmgp-photo-page {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
}

body.wpmgp-photo-page-open {
    overflow: hidden;
}

.wpmgp-photo-page {
    display: none;
    flex-direction: row;
}

.wpmgp-photo-page[style*="block"] {
    display: flex !important;
}

/* Left Column - Photo */
.wpmgp-pp-photo-side {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.wpmgp-pp-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.wpmgp-pp-close:hover {
    opacity: 1;
}

.wpmgp-pp-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wpmgp-pp-zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wpmgp-pp-zoom-btn:hover {
    background: rgba(255,255,255,0.2);
}

.wpmgp-pp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.wpmgp-pp-photo-side:hover .wpmgp-pp-nav {
    opacity: 1;
}

.wpmgp-pp-nav:hover {
    background: rgba(255,255,255,0.2);
}

.wpmgp-pp-nav-prev { left: 20px; }
.wpmgp-pp-nav-next { right: 20px; }

.wpmgp-pp-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wpmgp-pp-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
}

.wpmgp-pp-img.zoomed {
    cursor: grab;
}

/* Right Column - Info */
.wpmgp-pp-info-side {
    width: 360px;
    min-width: 360px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wpmgp-pp-member-nav {
    padding: 12px 16px;
    border-bottom: 1px solid #e4e6e9;
    background: #f0f2f5;
}

.wpmgp-pp-nav-icons {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.wpmgp-pp-nav-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e4e6e9;
    color: #050505;
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
}

.wpmgp-pp-nav-icon:hover {
    background: #d8dadf;
}

.wpmgp-pp-nav-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.wpmgp-pp-inbox-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #e41e3f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.wpmgp-pp-author-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e4e6e9;
}

.wpmgp-pp-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

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

.wpmgp-pp-author-name:hover {
    text-decoration: underline;
}

.wpmgp-pp-author-date {
    font-size: 13px;
    color: #65676b;
}

.wpmgp-pp-description-section {
    padding: 16px;
    border-bottom: 1px solid #e4e6e9;
}

.wpmgp-pp-description {
    font-size: 15px;
    color: #050505;
    line-height: 1.4;
}

.wpmgp-pp-see-more {
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
}

.wpmgp-pp-see-more:hover {
    text-decoration: underline;
}

.wpmgp-pp-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e4e6e9;
    font-size: 15px;
    color: #65676b;
}

.wpmgp-pp-reactions-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wpmgp-pp-reaction-icon {
    font-size: 18px;
}

.wpmgp-pp-reaction-buttons {
    display: flex;
    padding: 4px 16px;
    border-bottom: 1px solid #e4e6e9;
}

.wpmgp-pp-react-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.wpmgp-pp-react-btn:hover {
    background: #f0f2f5;
}

.wpmgp-pp-react-btn.active {
    color: var(--wpmgp-primary);
}

.wpmgp-pp-react-btn.active svg {
    stroke: var(--wpmgp-primary);
    fill: var(--wpmgp-primary);
}

.wpmgp-pp-comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wpmgp-pp-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.wpmgp-pp-comment-item {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.wpmgp-pp-comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.wpmgp-pp-comment-content {
    flex: 1;
}

.wpmgp-pp-comment-author a {
    font-weight: 600;
    color: #050505;
    text-decoration: none;
}

.wpmgp-pp-comment-text {
    background: #f0f2f5;
    padding: 8px 12px;
    border-radius: 18px;
    display: inline-block;
    font-size: 15px;
}

.wpmgp-pp-comment-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: #65676b;
    padding-left: 12px;
}

.wpmgp-pp-comment-like,
.wpmgp-pp-comment-reply-btn,
.wpmgp-pp-comment-delete {
    background: none;
    border: none;
    color: #65676b;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.wpmgp-pp-comment-like:hover,
.wpmgp-pp-comment-reply-btn:hover {
    text-decoration: underline;
}

.wpmgp-pp-comment-like.active {
    color: var(--wpmgp-primary);
}

.wpmgp-pp-comment-form {
    padding: 12px 16px;
    border-top: 1px solid #e4e6e9;
    background: #fff;
}

.wpmgp-pp-comment-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.wpmgp-pp-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.wpmgp-pp-comment-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 8px 12px;
}

.wpmgp-pp-comment-input-container textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 15px;
    max-height: 80px;
}

.wpmgp-pp-comment-actions {
    display: flex;
    gap: 8px;
}

.wpmgp-pp-image-upload,
.wpmgp-pp-comment-submit {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.wpmgp-pp-image-upload:hover,
.wpmgp-pp-comment-submit:hover {
    background: #e4e6e9;
}

.wpmgp-pp-comment-submit {
    color: var(--wpmgp-primary);
}

.wpmgp-pp-no-comments,
.wpmgp-pp-loading {
    text-align: center;
    color: #65676b;
    padding: 20px;
}

.wpmgp-pp-login-prompt {
    text-align: center;
    padding: 16px;
    color: #65676b;
}

.wpmgp-pp-login-prompt a {
    color: var(--wpmgp-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .wpmgp-photo-page {
        flex-direction: column;
    }
    
    .wpmgp-pp-photo-side {
        height: 50vh;
    }
    
    .wpmgp-pp-info-side {
        width: 100%;
        min-width: 100%;
        height: 50vh;
    }
}

/* Gallery Container */
.wpmgp-gallery-container {
    margin: 20px 0;
}

.wpmgp-upload-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.wpmgp-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.wpmgp-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Simple Grid Gallery */
.wpmgp-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(var(--wpmgp-columns, 4), 1fr);
}

@media (max-width: 768px) {
    .wpmgp-gallery {
        grid-template-columns: repeat(var(--wpmgp-columns-mobile, 2), 1fr);
    }
}

/* Gallery Item - uniform square cells */
.wpmgp-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.wpmgp-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.wpmgp-photo-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.wpmgp-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.wpmgp-gallery-item:hover .wpmgp-photo-wrap img {
    transform: scale(1.05);
}

.wpmgp-no-photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* Photo Overlay - Only for owner actions */
.wpmgp-photo-overlay.wpmgp-owner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 10px;
}

.wpmgp-gallery-item:hover .wpmgp-photo-overlay.wpmgp-owner-overlay {
    opacity: 1;
}

.wpmgp-photo-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.wpmgp-photo-actions button {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wpmgp-photo-actions button:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.wpmgp-delete-btn:hover {
    background: rgba(220, 53, 69, 0.8) !important;
}

/* Like count display on thumbnail */
.wpmgp-like-count-display {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    z-index: 5;
}

.wpmgp-like-count-display svg {
    opacity: 0.9;
}

.wpmgp-like-count-display span {
    font-weight: 600;
}

/* Photo Description */
.wpmgp-photo-desc {
    padding: 12px 15px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

/* Grid only mode - no justified view */

.wpmgp-no-photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* Body class when lightbox is open - simple approach matching BPPC */
/* Lightbox Overlay - Simple approach like BPPC */
.wpmgp-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    cursor: pointer;
}

.wpmgp-lightbox-overlay.wpmgp-active {
    display: block;
}

/* Lightbox Container - Simple approach like BPPC */
.wpmgp-lightbox {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    background: #000;
    border-radius: 12px;
    overflow: visible;
    z-index: 100000;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

.wpmgp-lightbox.wpmgp-active {
    display: flex;
}

.wpmgp-lightbox-content {
    display: flex;
    height: 100%;
    min-height: 400px;
    max-height: calc(80vh - 60px);
    border-radius: 12px;
    overflow: hidden;
}

.wpmgp-lightbox-photo-side {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.wpmgp-lightbox-image-container {
    width: 100%;
    height: calc(100% - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.wpmgp-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wpmgp-lightbox-img.zoomed {
    cursor: grab;
}

.wpmgp-lightbox-img.zoomed:active {
    cursor: grabbing;
}

/* Lightbox Close Button - On image side, appears on hover */
.wpmgp-lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 365px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 99999999;
    opacity: 0;
}

.wpmgp-lightbox:hover .wpmgp-lightbox-close-btn {
    opacity: 1;
}

.wpmgp-lightbox-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Lightbox Controls - Bottom left of photo side */
.wpmgp-lightbox-controls {
    position: absolute;
    bottom: 60px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.wpmgp-lightbox-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--wpmgp-lightbox-text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wpmgp-lightbox-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.wpmgp-lightbox-close {
    font-size: 28px;
    font-weight: bold;
}

/* Lightbox Navigation - Hidden arrows, keyboard navigation only */
.wpmgp-lightbox-nav {
    display: none; /* Navigation arrows removed - use keyboard arrows or dots */
}

/* Lightbox Dots - Centered at bottom of photo side */
.wpmgp-lightbox-nav-dots {
    position: absolute;
    bottom: 15px;
    left: 20px;
    right: 370px;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 1000;
    pointer-events: auto;
}

.wpmgp-lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    pointer-events: auto;
}

.wpmgp-lightbox-dot:hover {
    background: rgba(255,255,255,0.7);
}

.wpmgp-lightbox-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Lightbox Photo Actions - positioned above the nav dots */
.wpmgp-lightbox-photo-actions {
    position: absolute;
    bottom: 50px;
    left: 15px;
    right: 360px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
    pointer-events: auto;
}

.wpmgp-lightbox-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--wpmgp-lightbox-text);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-lightbox-like-btn:hover {
    color: var(--wpmgp-primary);
}

.wpmgp-lightbox-like-btn.active {
    color: var(--wpmgp-primary);
}

.wpmgp-lightbox-like-btn.active svg {
    fill: var(--wpmgp-primary);
}

.wpmgp-lightbox-desc {
    flex: 1;
    color: var(--wpmgp-lightbox-text);
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox Comments Side - ensure it fits within lightbox */
.wpmgp-lightbox-comments-side {
    width: 350px;
    min-width: 350px;
    max-height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e9ecef;
    overflow: hidden;
}

/* Hide all backgrounds in lightbox comment reactions */
.wpmgp-lightbox .wpmgp-reaction-btn,
.wpmgp-lightbox .wpmgp-comment-action {
    background: transparent !important;
    border: none !important;
}

/* Hide reply button backgrounds */
.wpmgp-lightbox .wpmgp-comment-reply-btn {
    background: transparent !important;
    border: none !important;
}

.wpmgp-lightbox-comments-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
}

.wpmgp-lightbox-comments-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wpmgp-lightbox-photo-title {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    flex-shrink: 0;
}

.wpmgp-lightbox-photo-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    word-break: break-word;
}

.wpmgp-lightbox-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    min-height: 0;
}

/* wpDiscuz Integration in Lightbox */
.wpmgp-lightbox-wpdiscuz-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.wpmgp-lightbox-wpdiscuz-container .wpd-thread-list,
.wpmgp-lightbox-wpdiscuz-container .wpd-comment-form-wrapper {
    padding: 15px 20px;
}

.wpmgp-lightbox-wpdiscuz-container .wpdiscuz-main-form-wrapper {
    margin: 0;
    padding: 15px 20px;
}

.wpmgp-lightbox-wpdiscuz-container .wpd-comment-wrap {
    margin-bottom: 15px;
}

.wpmgp-lightbox-wpdiscuz-container #wpdiscuz_form {
    padding: 0 20px 20px;
}

.wpmgp-comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.wpmgp-comment-avatar {
    flex-shrink: 0;
}

.wpmgp-comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
}

.wpmgp-comment-content {
    flex: 1;
}

.wpmgp-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wpmgp-comment-profile-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.wpmgp-comment-profile-link:hover {
    opacity: 0.7;
}

.wpmgp-comment-avatar .wpmgp-comment-profile-link img {
    transition: transform 0.2s ease;
}

.wpmgp-comment-avatar .wpmgp-comment-profile-link:hover img {
    transform: scale(1.1);
}

.wpmgp-comment-text {
    font-size: 14px;
    color: #555;
    margin: 4px 0;
    line-height: 1.4;
}

.wpmgp-comment-date {
    font-size: 12px;
    color: #999;
}

.wpmgp-comment-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.wpmgp-comment-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Comment actions - no background, just text */
.wpmgp-comment-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 12px;
    color: #65676b;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-comment-action:hover {
    background: transparent;
    color: var(--wpmgp-primary);
}

.wpmgp-comment-action.active {
    color: var(--wpmgp-primary);
    background: transparent;
}

.wpmgp-comment-like-count {
    font-weight: 600;
}

/* Hide Reply button in comments */
.wpmgp-comment-reply-btn {
    display: none !important;
}

/* Comment reactions - only thumbs up, no background */
.wpmgp-comment-reactions {
    display: flex;
    gap: 4px;
}

.wpmgp-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-reaction-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

.wpmgp-reaction-btn.active {
    background: transparent;
}

.wpmgp-reaction-btn span {
    font-size: 11px;
    color: #65676b;
}

.wpmgp-comment-reply {
    border-left: 2px solid #e4e6e9;
    padding-left: 12px;
}

.wpmgp-cancel-reply {
    margin-top: 8px;
    padding: 6px 14px;
    background: #e4e6e9;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    color: #65676b;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-cancel-reply:hover {
    background: #d8dadf;
    color: #050505;
}

/* Comment form - ensure it stays within lightbox */
.wpmgp-lightbox-comment-form {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
}

.wpmgp-lightbox-comment-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wpmgp-lightbox-comment-input:focus {
    border-color: var(--wpmgp-primary);
}

.wpmgp-lightbox-comment-submit {
    margin-top: 8px;
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-lightbox-comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Guest Login Form in Comments */
.wpmgp-lightbox-login-form {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.wpmgp-login-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.wpmgp-login-header svg {
    color: var(--wpmgp-primary);
}

.wpmgp-login-form-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpmgp-login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wpmgp-login-field input:focus {
    border-color: var(--wpmgp-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.wpmgp-login-field input::placeholder {
    color: #999;
}

.wpmgp-login-error {
    padding: 8px 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c00;
    font-size: 13px;
    text-align: center;
}

.wpmgp-login-submit {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wpmgp-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.wpmgp-login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wpmgp-login-spinner svg {
    animation: wpmgp-spin 1s linear infinite;
}

@keyframes wpmgp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wpmgp-login-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.wpmgp-login-links a {
    color: var(--wpmgp-primary);
    text-decoration: none;
}

.wpmgp-login-links a:hover {
    text-decoration: underline;
}

.wpmgp-login-divider {
    color: #ccc;
}

/* Popups */
.wpmgp-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99998;
    display: none;
    backdrop-filter: blur(4px);
}

.wpmgp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    z-index: 99999;
    display: none;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.wpmgp-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.wpmgp-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
}

.wpmgp-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.wpmgp-popup-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wpmgp-popup-close:hover {
    background: rgba(255,255,255,0.25);
}

.wpmgp-popup-content {
    padding: 24px;
}

/* Dropzone */
.wpmgp-dropzone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #888;
}

.wpmgp-dropzone:hover,
.wpmgp-dropzone.dragover {
    border-color: var(--wpmgp-primary);
    background: rgba(74, 144, 217, 0.05);
}

.wpmgp-dropzone svg {
    stroke: #ccc;
    margin-bottom: 15px;
}

.wpmgp-dropzone p {
    margin: 0;
    font-size: 14px;
}

.wpmgp-browse {
    color: var(--wpmgp-primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Upload Previews */
.wpmgp-upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.wpmgp-upload-preview-item {
    position: relative;
    width: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.wpmgp-upload-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.wpmgp-upload-preview-item textarea {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    font-size: 11px;
    resize: none;
    height: 40px;
}

.wpmgp-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.wpmgp-upload-submit {
    margin-top: 15px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.wpmgp-upload-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Share Popup - Inbox Style */
.wpmgp-inbox-popup {
    max-width: 650px;
}

.wpmgp-inbox-popup .wpmgp-popup-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpmgp-inbox-content {
    padding: 0 !important;
}

.wpmgp-inbox-layout {
    display: flex;
    min-height: 400px;
}

.wpmgp-inbox-sidebar {
    width: 220px;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.wpmgp-inbox-search-wrap {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
}

.wpmgp-inbox-search-wrap svg {
    color: #888;
    flex-shrink: 0;
}

.wpmgp-inbox-search {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.wpmgp-inbox-members-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.wpmgp-inbox-empty {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.wpmgp-inbox-member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.wpmgp-inbox-member-item:hover {
    background: #f5f5f5;
}

.wpmgp-inbox-member-item.selected {
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
}

.wpmgp-inbox-member-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.wpmgp-inbox-member-info {
    flex: 1;
    min-width: 0;
}

.wpmgp-inbox-member-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpmgp-inbox-member-username {
    font-size: 12px;
    opacity: 0.7;
}

.wpmgp-inbox-main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wpmgp-inbox-photo-preview {
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.wpmgp-inbox-photo-preview img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    object-fit: contain;
}

.wpmgp-inbox-photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.wpmgp-inbox-selected-recipient {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #e8f4fd;
    border-radius: 8px;
}

.wpmgp-inbox-to-label {
    font-size: 13px;
    color: #666;
}

.wpmgp-inbox-recipient-name {
    font-weight: 600;
    color: var(--wpmgp-primary);
}

.wpmgp-inbox-recipient-remove {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpmgp-inbox-recipient-remove:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.wpmgp-inbox-message {
    flex: 1;
    min-height: 80px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.wpmgp-inbox-message:focus {
    border-color: var(--wpmgp-primary);
}

.wpmgp-inbox-send-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.wpmgp-inbox-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.wpmgp-inbox-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* View Count Styles */
.wpmgp-lightbox-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wpmgp-lightbox-text);
    font-size: 14px;
    opacity: 0.8;
}

.wpmgp-lightbox-views svg {
    opacity: 0.7;
}

/* Edit Description Popup */
.wpmgp-edit-description {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
}

.wpmgp-edit-submit {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--wpmgp-primary), var(--wpmgp-secondary));
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .wpmgp-lightbox-content {
        flex-direction: column;
    }
    
    .wpmgp-lightbox-photo-side {
        height: 50%;
    }
    
    .wpmgp-lightbox-comments-side {
        width: 100%;
        height: 50%;
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
}

@media (max-width: 768px) {
    .wpmgp-gallery-grid {
        grid-template-columns: repeat(var(--wpmgp-columns-mobile, 2), 1fr);
    }
    
    .wpmgp-gallery-masonry {
        column-count: var(--wpmgp-columns-mobile, 2);
    }
    
    .wpmgp-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .wpmgp-nav-prev { left: 8px; }
    .wpmgp-nav-next { right: 8px; }
    
    .wpmgp-lightbox-controls {
        top: 10px;
        right: 10px;
    }
    
    .wpmgp-lightbox-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .wpmgp-popup {
        width: 95%;
        max-width: none;
    }
    
    .wpmgp-popup-content {
        padding: 16px;
    }
}

/* Spin animation for loading */
.wpmgp-spin {
    animation: wpmgp-spin 1s linear infinite;
}

@keyframes wpmgp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Share dot on photos */
.wpmgp-share-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
    opacity: 0;
}

.wpmgp-gallery-item:hover .wpmgp-share-dot {
    opacity: 1;
}

.wpmgp-share-dot:hover {
    background: var(--wpmgp-primary);
    transform: scale(1.1);
}

/* Emoji picker on photos */
.wpmgp-emoji-picker {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s;
}

.wpmgp-gallery-item:hover .wpmgp-emoji-picker {
    opacity: 1;
}

.wpmgp-emoji-btn {
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wpmgp-emoji-btn:hover {
    transform: scale(1.2);
    background: rgba(0,0,0,0.7);
}

.wpmgp-emoji-btn.active {
    background: var(--wpmgp-primary);
}

/* Reaction counts on photos */
.wpmgp-reaction-counts {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.wpmgp-reaction-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
}

.wpmgp-reaction-count span {
    font-weight: 600;
}
