/* ============================================
   OSSN WP Comments — Design System
   ============================================ */

#ossn-wp-comments-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #1c1e21;
    line-height: 1.45;
    margin-top: 24px;
}

/* ============================================
   MAIN COMMENT FORM  (OSSN Wall-Post style)
   ============================================ */
.ossn-comment-form-wrap {
    background: #dfdfdf;
    border: 1px solid #ababab;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ossn-comment-form-wrap:focus-within {
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.12), 0 2px 10px rgba(220, 53, 69, 0.08);
    transform: translateY(-2px);
    border-color: #ffb3b8;
}

/* Form header */
.ossn-form-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    border-bottom: none;
    font-size: 15px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

.ossn-form-header-icon {
    width: 20px;
    height: 20px;
    fill: white;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.ossn-quicktags {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 4px;
}

.ossn-qt-btn {
    background: linear-gradient(to bottom, #fefefe 0%, #e8e8e8 100%);
    border: 1px solid #bbb;
    border-bottom-color: #aaa;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 18px;
    height: 22px;
    cursor: pointer;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    user-select: none;
    transition: box-shadow 0.1s, background 0.1s, transform 0.05s;
}

.ossn-qt-btn:hover {
    background: linear-gradient(to bottom, #fff 0%, #ddd 100%);
    border-color: #999;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 1px 3px rgba(0, 0, 0, 0.18);
}

.ossn-qt-btn:active {
    background: linear-gradient(to bottom, #ddd 0%, #f5f5f5 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Textarea area / bg preview */
.ossn-main-textarea {
    width: auto;
    margin: 5px;
    border: 1px solid #e2e5e8;
    border-radius: 8px;
    background: #fcfcfc;
    outline: none;
    min-height: 100px;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    overflow-y: auto;
    padding: 5px 5px;
    cursor: text;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    transition: border-color 0.2s, background 0.2s;
}

.ossn-main-textarea:focus {
    border-color: #FF416C;
    background: #fff;
}

.ossn-main-textarea:empty:before {
    content: attr(data-placeholder);
    color: #a0a5aa;
    pointer-events: none;
    display: block;
    font-style: italic;
}

/* Icon bar */
.ossn-form-iconbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid #f0f2f5;
    gap: 8px;
}

.ossn-iconbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ossn-iconbar-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #606770;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    transition: background 0.15s, color 0.15s;
}

.ossn-iconbar-btn:hover {
    background: #f0f2f5;
    color: #1877f2;
}

.ossn-iconbar-btn.active {
    color: #1877f2;
    background: #e7f0fd;
}

.ossn-iconbar-btn svg {
    width: 20px;
    height: 20px;
}

/* Avatar (used in reply forms) */
.ossn-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #ddd;
}

.ossn-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #ddd;
}

/* Post button */
.ossn-post-btn {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 22px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(255, 75, 43, 0.3);
}

.ossn-post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 75, 43, 0.45);
    background: linear-gradient(135deg, #FF4B2B, #FF416C);
}

.ossn-post-btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 2px 5px rgba(255, 75, 43, 0.3);
}

/* Guest fields */
.ossn-guest-fields {
    display: flex;
    gap: 8px;
}

.ossn-guest-fields input {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid #ced0d4;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #f0f2f5;
    color: #1c1e21;
    transition: border-color 0.15s, background 0.15s;
}

.ossn-guest-fields input:focus {
    background: #fff;
    border-color: #1877f2;
}

/* Image preview */
.ossn-image-preview-wrap {
    display: none;
    position: relative;
    max-width: 180px;
    margin-top: 4px;
}

.ossn-image-preview-wrap img {
    width: 100%;
    border-radius: 8px;
    display: block;
    border: 1px solid #ced0d4;
}

.ossn-remove-preview {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #606770;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    border: 2px solid #fff;
    transition: background 0.15s;
}

.ossn-remove-preview:hover {
    background: #e41e3f;
}

/* ============================================
   COMMENT CARDS LIST
   ============================================ */
#ossn-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ossn-loading-msg {
    color: #8a8d91;
    font-size: 13px;
    padding: 8px 0;
}

/* ── EACH COMMENT CARD ── */
.ossn-comment-card {
    background: #fff;
    border: 1px solid #e4e6e9;
    border-radius: 10px;
    padding: 12px 14px 8px;
    animation: ossn-fadein 0.25s ease;
}

@keyframes ossn-fadein {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Comment top row: avatar + right-side content */
.ossn-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ossn-comment-right {
    flex: 1;
    min-width: 0;
}

/* Name + time stacked vertically */
.ossn-comment-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.ossn-comment-author {
    display: inline;
    font-weight: 700;
    font-size: 13px;
    color: #050505;
    text-decoration: none;
    line-height: 1.3;
}

.ossn-comment-author:hover {
    text-decoration: underline;
}

.ossn-comment-time {
    font-size: 11px;
    font-weight: 400;
    color: #8a8d91;
    margin-top: 1px;
    line-height: 1.3;
}

/* Body: text + photo. Sejajar dengan avatar (flush left) */
.ossn-comment-body {
    margin-bottom: 8px;
    word-break: break-word;
}

/* Reply body: indent sejajar nama komentar (jika diperlukan) */
.ossn-comment-body--sm {
    padding-left: 0;
    margin-bottom: 0;
    /* Remove bottom margin inside grey bubble */
}

.ossn-comment-body.bg-body {
    padding: 24px 20px;
}

.ossn-comment-text {
    font-size: 14px;
    color: #050505;
    margin: 0;
    white-space: pre-line;
}

.ossn-comment-text img.wp-smiley,
.ossn-comment-text img.emoji {
    height: 20px !important;
    max-height: 20px !important;
    width: 20px !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    margin: 0 1px !important;
    display: inline-block !important;
}

.ossn-comment-photo-wrap {
    text-align: center;
    margin: 8px 0;
    width: 100%;
    background: #eaeaea;
}

.ossn-comment-photo {
    display: inline-block;
    max-width: 100%;
    max-height: 400px;
    /* auto sizing to keep natural proportions under limits */
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ossn-comment-photo:hover {
    opacity: 0.88;
}

/* Action bar: flush left */
.ossn-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #65676b;
    border-top: 1px solid #f0f2f5;
    margin-top: 4px;
}

/* Reply actions: di bawah teks/bubble, tetap pakai flex gap dari wrapper */
.ossn-reply-item>.ossn-comment-right>.ossn-comment-actions {
    border-top: none;
    padding: 2px 0 0 12px;
    margin-top: 0;
}

.ossn-action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #65676b;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: color 0.12s;
    display: inline-flex;
    align-items: center;
}

.ossn-action-btn:hover {
    color: #1877f2;
    text-decoration: underline;
}

.ossn-action-btn[data-reacted] {
    color: #1877f2;
}

/* ── REACTION PICKER (FB LIKE) ── */
.ossn-react-wrap {
    position: relative;
    display: inline-block;
}

.ossn-reaction-picker {
    position: absolute;
    bottom: 100%;
    left: -4px;
    /* Tiny visual alignment so it covers the thumb exactly */
    margin-bottom: 8px;
    background: #ffffff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99;
    white-space: nowrap;
}

/* Invisible bridge so mouse doesn't lose hover */
.ossn-reaction-picker::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.ossn-react-wrap:hover .ossn-reaction-picker {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Child comments (indented) — anchor to RIGHT so it grows LEFT */
.ossn-reply-actions-bar .ossn-react-wrap .ossn-reaction-picker {
    left: auto;
}



.ossn-react-icon {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.ossn-react-icon:hover {
    transform: scale(1.35) translateY(-6px);
    z-index: 2;
    position: relative;
}


.ossn-action-btn.delete-btn:hover {
    color: #e41e3f;
}


/* ── INLINE REPLY FORM (inside card, below action bar) ── */
.ossn-reply-form-wrap {
    display: flex !important;
    flex-direction: column;
    margin-top: 10px;
    border-top: 1px solid #f0f2f5;
    padding-top: 12px;
}

.ossn-reply-row-wrapper {
    width: 100%;
}

.ossn-reply-input-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align bottom bar elements like "Post" to right */
    transition: all 0.2s ease;
    background: #f0f2f5;
    border-radius: 20px;
}

.ossn-reply-input-pill {
    display: flex;
    align-items: flex-end;
    /* Icon menempel di bagian bawah */
    background: #f0f2f5;
    border-radius: 20px;
    padding: 6px 12px;
    width: 100%;
}

.ossn-reply-input-pill textarea {
    flex: 1;
    /* Ambil sisa tempat */
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    color: #1c1e21;
    line-height: 1.4;
    min-height: 20px;
    overflow-y: hidden;
    padding: 2px 0;
    width: 100%;
}

.ossn-reply-bottom-bar {
    display: flex;
    align-items: center;
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    justify-content: space-between;
}

.ossn-reply-post-wrap {
    display: flex;
}

.ossn-reply-input-pill textarea::placeholder {
    color: #8a8d91;
}

.ossn-reply-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.ossn-reply-icon-btn,
.ossn-reply-camera {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #8a8d91;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    height: 30px;
    width: 30px;
    transition: background 0.15s, color 0.15s;
}

.ossn-reply-icon-btn:hover,
.ossn-reply-camera:hover,
.ossn-reply-post-btn:hover {
    background: #e4e6e9;
    color: #444;
}

.ossn-reply-icon-btn span {
    color: #8a8d91;
    border-color: #8a8d91 !important;
}

.ossn-reply-icon-btn svg,
.ossn-reply-camera svg {
    width: 18px;
    height: 18px;
}

.ossn-reply-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    width: 100%;
}

.ossn-reply-post-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    color: #1877f2;
}

.ossn-reply-post-btn:active {
    transform: scale(0.95);
}

.ossn-reply-post-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}


/* ── REPLIES LIST (flush left) ── */
.ossn-replies-list {
    margin-top: 0;
    padding-top: 8px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ossn-reply-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.ossn-comment-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ossn-reply-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 14px;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

.ossn-reply-bubble .ossn-comment-author {
    display: block;
    margin-bottom: 2px;
}

.ossn-reply-bubble .ossn-comment-text {
    font-size: 14px;
    color: #050505;
    display: block;
}

.ossn-reply-actions-bar {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 0 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #65676b;
    overflow: visible;
    /* NO position:relative here — lets .ossn-react-wrap control picker placement */
}

/* ============================================
   GUEST FIELDS
   ============================================ */
.ossn-guest-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ebedf0;
}

.ossn-guest-fields input {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccd0d5;
    background: #f0f2f5;
    font-size: 14px;
    color: #050505;
    transition: all 0.2s ease;
}

.ossn-guest-fields input:focus {
    background: #ffffff;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
    outline: none;
}

/* ============================================
   HIDDEN UTILITY
   ============================================ */
.ossn-hidden {
    display: none !important;
}

/* ============================================
   LIGHTBOX
   ============================================ */
#ossn-photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#ossn-photo-lightbox.active {
    display: flex;
}

#ossn-photo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================
   LOAD MORE BUTTON
   ============================================ */
.ossn-load-more-btn {
    display: block;
    width: 100%;
    border: 1px solid #dce4ec;
    background: #ffffff;
    color: #34495e;
    padding: 12px;
    margin-top: 24px;
    margin-bottom: 8px;
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.ossn-load-more-btn:hover:not(:disabled) {
    border-color: #3498db;
    color: #3498db;
    background: #fdfdfe;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.ossn-load-more-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1);
}

.ossn-load-more-btn:disabled {
    background: #f8f9fa;
    color: #bcc0c4;
    border-color: #eef2f5;
    box-shadow: none;
    cursor: not-allowed;
}

/* ============================================
   GAMIFICATION BADGES
   ============================================ */
.ossn-author-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ossn-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ossn-badge {
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    line-height: 1;
    user-select: none;
}

/* ============================================
   TAG COLOR RULES — inside comment text body
   ============================================ */

/* Merah untuk tag <b> (bold) */
.ossn-comment-text b {
    color: #e53935;
    font-weight: 700;
}

/* Biru untuk tag <u> (underline) */
.ossn-comment-text u {
    color: #1565c0;
    text-decoration: none;
    font-weight: 700;
}

/* Hijau untuk tag <i> (italic) */
.ossn-comment-text i {
    color: #43a047;
    font-style: normal;
    font-weight: 700;
}

/* Oranye/Cokelat untuk tag <em> (emphasis) */
.ossn-comment-text em {
    color: #d84315;
    font-style: normal;
    font-weight: 700;
}

/* Ungu Gelap untuk tag <strong> */
.ossn-comment-text strong {
    color: #6a1b9a;
    font-weight: 700;
}

/* ============================================
   STICKER / GIF PICKER
   ============================================ */
.ossn-insert-sticker:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border-color: #bbb !important;
    z-index: 1;
    position: relative;
}

#ossn-sticker-results::-webkit-scrollbar {
    width: 4px;
}

#ossn-sticker-results::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

#ossn-sticker-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}