/* Wrapper */
.cff-wrapper {
    background: transparent;
}

/* Card layout */
.cff-post-card {
    margin-bottom: 20px;
}

.cff-post-card-inner {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

/* Header */
.cff-post-header {
    padding: 16px 20px 8px;
}

.cff-header-left {
    display: flex;
    align-items: center;
}

/* Avatar */
.cff-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
}

.cff-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.cff-post-header-text {
    margin-left: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cff-post-author {
    font-weight: 600;
    font-size: 16px;
}

.cff-post-meta {
    font-size: 13px;
    color: #7b809a;
}

/* Pin */
.cff-pin-icon,
.cff-pin-toggle {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    color: #f7c948;
    text-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.cff-pin-toggle {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

/* default pin look when not pinned */
.cff-pin-toggle {
    color: #cfd3df;
    opacity: 0.6;
}

.cff-pin-toggle.is-pinned {
    transform: translateY(-1px);
}

/* Pinned posts highlight */
.cff-post-card.cff-post-pinned .cff-pin-toggle,
.cff-post-card.cff-post-pinned .cff-pin-icon {
    color: #f7c948;
    opacity: 1;
    transform: translateY(-1px);
}

.cff-post-card.cff-post-pinned .cff-post-card-inner {
    border: 1px solid rgba(247, 201, 72, 0.7);
    box-shadow: 0 10px 26px rgba(247, 201, 72, 0.25);
}

/* Body */
.cff-post-body {
    padding: 0 20px 8px;
}

.cff-post-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}

/* Vimeo / iframe wrapper */
.cff-post-embed {
    margin: 10px 0;
    line-height: 0;          /* kills extra line-height around inline iframe */
}

/* Normalize all embeds (Vimeo, YouTube, etc.) */
.cff-post-embed iframe {
    display: block;          /* no inline whitespace */
    width: 100%;             /* fill the card width */
    max-width: 100%;
    height: auto;            /* ignore the big fixed height from the embed code */
    aspect-ratio: 16 / 9;    /* keep nice video shape */
}


/* Media (image/video) */
.cff-post-media {
    margin: 10px 0;
}

.cff-post-media-img,
.cff-post-media-video {
    width: 100%;
    max-height: 420px;
    border-radius: 12px;
    display: block;
    object-fit: cover;
}

.cff-post-media-video {
    background: #000;
}

.cff-post-media-link {
    display: inline-block;
    font-size: 13px;
    color: #2155ff;
    text-decoration: underline;
}

/* Post text content */
.cff-post-content {
    font-size: 14px;
    line-height: 1.5;
    transition: max-height 0.25s ease;
}

/* Footer */
.cff-post-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #f0f0f4;
}

.cff-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Likes heart button */
.cff-like-btn,
.cff-actions .cff-like-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 2px 2px;
}

.cff-like-icon {
    display: inline-block;
    /* Default: not liked yet = soft grey */
    color: #cbd5e1;
    transition: color 0.2s ease, transform 0.15s ease;
}


/* Likes + comments pills */
.cff-stats-pill,
.cff-stats-pill.badge,
.cff-comment-pill,
.cff-comment-pill.badge {
    display: inline-flex;
    align-items: center;
    padding: 6 4px;
    border-radius: 999px;
    font-size: 13px;
    background: transparent !important;
    color: #2155ff !important;
    text-decoration: none;
    border: none !important;
    cursor: pointer;
}

/* Tip button */
.cff-tip-btn {
    margin-left: 1px;
    border-radius: 999px;
    border: 1px solid #2155ff;
    background: #fff;
    color: #2155ff;
    padding: 2px 2px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.cff-tip-icon {
    font-size: 21px;
}

.cff-tip-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* "View comments" row */
.cff-view-comments-row {
    margin-top: 8px;
}

.cff-view-comments-link {
    font-size: 13px;
    color: #2155ff;
    text-decoration: underline;
}

/* CATEGORY BAR */
.cff-category-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}

.cff-cats-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cff-cat-filter-btn {
    border-radius: 999px;
    padding: 4px 12px;
    border: none;
    background: #f1f5fb;
    color: #2155ff;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cff-cat-filter-btn .cff-cat-icon {
    font-size: 14px;
}

.cff-cat-filter-btn.cff-cat-active {
    background: #2155ff;
    color: #ffffff;
}

/* Hamburger (more) button */
.cff-cat-more-btn {
    margin-left: auto;
    border-radius: 999px;
    padding: 4px 10px;
    border: none;
    background: #f2f6fc;
    color: #000000;
    cursor: pointer;
    display: none; /* JS / media query will turn this on when needed */
}

.cff-hamburger-icon {
    font-size: 16px;
}

/* Clean full background + black text for overflow menu */
.cff-cat-more-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #000000;
    border-radius: 14px;
    padding: 6px 0;
    min-width: 180px;
    display: none;
    z-index: 50;
}

/* Make sure the dropdown buttons inside are fully black text */
.cff-cat-more-menu .cff-cat-filter-btn {
    background: transparent !important;
    color: #ffffff !important;
}


/* Buttons inside dropdown */
.cff-cat-more-menu .cff-cat-filter-btn {
    display: block;
    width: 100%;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    text-align: left;
    justify-content: flex-start;
    padding: 8px 16px;
    font-weight: 500;
}

/* Hover / active state in dropdown */
.cff-cat-more-menu .cff-cat-filter-btn:hover,
.cff-cat-more-menu .cff-cat-filter-btn.cff-cat-active {
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
}

/* FORM ELEMENTS */
.cff-input,
.cff-textarea,
.cff-select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e2ee;
    padding: 8px 10px;
    font-size: 14px;
}

.cff-form-row {
    margin-top: 10px;
}

.cff-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cff-form-footer {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
}

.cff-btn {
    border-radius: 999px;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    font-size: 14px;
}

.cff-btn-primary {
    background: #2155ff;
    color: #fff;
}

.cff-btn-secondary {
    background: #f5f5f9;
    color: #333;
}

.cff-btn-danger {
    background: #ffebee;
    color: #c62828;
}

.cff-form-status {
    font-size: 13px;
    color: #7b809a;
}

/* Edit indicator */
.cff-edit-indicator {
    font-size: 13px;
    background: #fff7e0;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Admin actions */
.cff-admin-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.cff-admin-edit,
.cff-admin-delete {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #e2e2ee;
    background: #f9f9fc;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

/* Like state */
.cff-like-btn.cff-liked .cff-like-icon {
    transform: scale(1.2);
    font-weight: bold;
    color: #ff4b5c; /* full red when liked */
}

.cff-like-btn.cff-liked {
    opacity: 0.9;
}


/* ---------- CATEGORY MANAGER (ADMIN) ---------- */

.cff-cat-manager {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.cff-cat-manager-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.cff-cat-manager-status {
    font-size: 12px;
    color: #64748b;
}

.cff-cat-manager-advanced {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 8px 10px;
}

.cff-cat-manager-toggle {
    width: 100%;
    border: none;
    background: transparent;
    padding: 6px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.cff-cat-manager-toggle-arrow {
    font-size: 14px;
    transition: transform 0.15s ease;
}

.cff-cat-manager-body {
    display: none;
    margin-top: 8px;
}

.cff-cat-manager-advanced.is-open .cff-cat-manager-body {
    display: block;
}

.cff-cat-manager-item {
    display: grid;
    grid-template-columns:
        auto
        minmax(0, 1.6fr)
        minmax(0, 1.1fr)
        minmax(0, 1.4fr)
        minmax(0, 1.8fr)
        auto
        auto;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.cff-cat-manager-empty {
    font-size: 13px;
    color: #7b809a;
    padding: 4px 0;
}

.cff-cat-sort-handle {
    cursor: grab;
    font-size: 16px;
    padding: 0 4px;
    color: #7b809a;
}

.cff-cat-font-input {
    font-size: 12px;
}

.cff-cat-color-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.cff-cat-color-row {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border-radius: 999px;
    border: 1px solid #e2e2ee;
    padding: 3px 6px;
}

.cff-cat-color-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
}

.cff-cat-color-input {
    width: 30px;
    height: 28px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.cff-cat-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 999px;
}

.cff-cat-color-input::-webkit-color-swatch {
    border-radius: 999px;
    border: none;
}

.cff-cat-color-hex,
.cff-cat-text-color-hex {
    border: none;
    box-shadow: none;
    padding: 3px 4px;
    width: 90px;
    font-size: 12px;
}

.cff-cat-color-row .cff-input:focus {
    outline: none;
}

.cff-cat-manager-status-global {
    margin-top: 6px;
    font-size: 12px;
    color: #7b809a;
}

/* ---------- DESKTOP EXTRA ---------- */

/* On desktop, make comment pill ~25% larger than likes text */
@media (min-width: 768px) {
    .cff-comment-pill,
    .cff-comment-pill.badge {
        font-size: 16px;
    }
}

/* ---------- DESKTOP MEDIA OVERRIDE ----------
   Ensure full image is visible on desktop (no cropping) */
@media (min-width: 768px) {
    .cff-post-media-img,
    .cff-media-slider .cff-post-media-img,
    .cff-post-media-video {
        max-height: none;
        height: auto;
        object-fit: contain;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
    .cff-post-card-inner {
        border-radius: 14px;
    }

    .cff-post-header,
    .cff-post-body,
    .cff-post-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    /* icons + text 25% bigger on mobile (heart, likes pill, comment pill) */
    .cff-like-btn,
    .cff-actions .cff-like-btn {
        font-size: 25px !important;
    }

    .cff-stats-pill,
    .cff-stats-pill.badge,
    .cff-comment-pill,
    .cff-comment-pill.badge {
        font-size: 16px !important;
        padding: 0 4px !important;
    }

    .cff-form-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .cff-cat-more-btn {
        display: inline-flex;
    }
}

/* ---------- TIP MODAL (Authorize.Net Simple Checkout) ---------- */

.cff-tip-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cff-tip-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* FULL-SCREEN dialog on all devices */
.cff-tip-modal {
    position: relative;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cff-tip-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: #6b7280;
    z-index: 2;
}

/* Body holds the iframe and gives space for the close button */
.cff-tip-modal-body {
    flex: 1;
    padding: 40px 10px 10px;
    display: flex;
    flex-direction: column;
}

/* Iframe fills remaining space */
.cff-tip-iframe {
    width: 100%;
    flex: 1;
    height: 100%;
    border: none;
}

/* Remove the PINNED badge next to the name */
.cff-post-card.cff-post-pinned .cff-post-header-text::after {
    display: none !important;
    content: none !important;
}

/* --------------------------------------------------
   Drafts & Private Notes (creator-only UI)
   -------------------------------------------------- */

/* Optional subtle border style for draft cards */
.cff-post-card.cff-post-draft .cff-post-card-inner {
    border-style: dashed;
    border-width: 1px;
    border-color: #eab308;
}

.cff-post-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cff-post-status-draft {
    background: #fef3c7;
    color: #92400e;
}

.cff-post-status-scheduled {
    background: #e0f2fe;
    color: #075985;
}

.cff-private-notes-block {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
}

.cff-private-notes-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 4px;
}

.cff-private-notes-body {
    font-size: 13px;
    color: #374151;
    white-space: pre-wrap;
}

.cff-form-private-notes {
    margin-top: 12px;
}

@media (max-width: 600px) {
    .cff-actions {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .cff-actions {
        flex-wrap: wrap;
        row-gap: 6px;
    }
}


/* Read more / Close button */
.cff-read-more-btn {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cff-read-more-btn:hover {
    background: rgba(148,163,184,0.2);
}

/* Hide the old separate Read more button completely */
.cff-read-more-btn {
    display: none !important;
}

/* Inline "… Read more" link */
.cff-read-more-inline {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: inherit;
    color: #2155ff; /* link blue */
    text-decoration: underline;
}

/* tiny spacing before ellipsis if you want */
.cff-inline-ellipsis {
    /* optional styles; can leave empty */
}
