/* =====================================================
   BookedUp Channel — Front-end styles
   ===================================================== */

/* ── Channel feed ──────────────────────────────────── */
.buc-channel-feed {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.buc-channel-feed > * {
    min-width: 0;
    max-width: 100%;
}
@media (max-width: 900px) {
    .buc-channel-feed { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
    .buc-channel-feed { grid-template-columns: 1fr !important; }
}
.buc-empty, .buc-gallery-empty { color: #aaa; font-size: 14px; text-align: center; padding: 40px 0; }

.buc-post-card {
    background: #fff;
    border: 1.5px solid #EDE0E8;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(230,180,200,.07);
    transition: box-shadow .18s;
    display: flex;
    flex-direction: column;
    height: 100%;
    grid-column: span 1 !important;
    width: 100%;
}
.buc-post-card:hover { box-shadow: 0 6px 24px rgba(230,180,200,.15); }
.buc-post-locked { opacity: .8; }

.buc-cover-blurred { filter: blur(8px); }
.buc-lock-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,.6);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
}
.buc-lock-icon { font-size: 28px; }
.buc-lock-label { font-size: 13px; font-weight: 600; color: #b07090; }

.buc-post-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; }

.buc-vis-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; margin-bottom: 8px;
}
.buc-vis-members { background: #E8F0FD; color: #3a5ca0; }
.buc-vis-tiered  { background: #FDE8EF; color: #b07090; }
.buc-vis-public  { background: #E8FAF0; color: #1a6640; }

.buc-post-title { font-size: 19px; font-weight: 700; color: #1a1a2e; margin: 0 0 8px; line-height: 1.3; }
.buc-post-title a { text-decoration: none; color: inherit; }
.buc-post-title a:hover { color: #b07090; }
.buc-post-excerpt { font-size: 14px; color: #666; line-height: 1.7; margin-bottom: 14px; }
.buc-excerpt-locked { color: #b07090; font-style: italic; }

.buc-post-footer {
    display: flex; align-items: center; gap: 16px;
    font-size: 12px; color: #bbb;
    border-top: 1px solid #f5eff3; padding-top: 12px; margin-top: auto;
}
.buc-comment-count {
    display: inline-flex; align-items: center; gap: 4px;
    color: #aaa; text-decoration: none;
}
.buc-comment-count:hover { color: #b07090; }
.buc-read-more { margin-left: auto; color: #b07090; text-decoration: none; font-weight: 600; }
.buc-read-more:hover { text-decoration: underline; }

/* ── Gallery grid ──────────────────────────────────── */
.buc-gallery-grid {
    display: grid;
    gap: 12px;
}
.buc-gallery-cols-2 { grid-template-columns: repeat(2,1fr); }
.buc-gallery-cols-3 { grid-template-columns: repeat(3,1fr); }
.buc-gallery-cols-4 { grid-template-columns: repeat(4,1fr); }
.buc-gallery-cols-5 { grid-template-columns: repeat(5,1fr); }
.buc-gallery-cols-6 { grid-template-columns: repeat(6,1fr); }

@media (max-width:640px) {
    .buc-gallery-cols-3,
    .buc-gallery-cols-4,
    .buc-gallery-cols-5,
    .buc-gallery-cols-6 { grid-template-columns: repeat(2,1fr); }
}

.buc-gallery-item { display: block; text-decoration: none; }
.buc-gallery-img-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f0eaf2;
}
.buc-gallery-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s ease;
}
.buc-gallery-item:hover .buc-gallery-img-wrap img { transform: scale(1.06); }

.buc-gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(30,10,20,.75) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .25s ease;
    display: flex; flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    color: #fff;
}
.buc-gallery-item:hover .buc-gallery-overlay { opacity: 1; }
.buc-gallery-caption { font-size: 13px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.buc-gallery-date    { font-size: 11px; opacity: .8; margin: 0 0 4px; }
.buc-gallery-cta     { font-size: 11px; font-weight: 600; color: #fde8ef; }

/* ── Single post ───────────────────────────────────── */
.buc-single-wrap { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.buc-single-post { background:#fff; border-radius:18px; padding:36px 40px; border:1.5px solid #EDE0E8; }
@media(max-width:640px){ .buc-single-post { padding:24px 20px; } }

.buc-single-cover {
    margin-bottom: 24px;
    border-radius: 14px;
    overflow: hidden;
    background: #f0eaf2;
}
.buc-single-cover img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: none;
}

.buc-back-link { font-size:13px; color:#b07090; text-decoration:none; display:inline-block; margin-bottom:16px; }
.buc-back-link:hover { text-decoration:underline; }

/* Feed card cover — fixed height crop in card list */
.buc-post-cover {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}
.buc-post-cover a {
    display: block;
    width: 100%;
    height: 100%;
}
.buc-post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.buc-post-card:hover .buc-post-cover img { transform: scale(1.03); }

.buc-single-title { font-size:26px; font-weight:700; color:#1a1a2e; margin:0 0 6px; line-height:1.3; }
.buc-single-date  { font-size:13px; color:#bbb; margin:0 0 24px; }

.buc-single-content { font-size:15px; line-height:1.8; color:#333; }
.buc-single-content p { margin:0 0 16px; }
.buc-single-content img { max-width:100%; border-radius:8px; }

.buc-single-media {
    display:flex; flex-wrap:wrap; gap:10px; margin-top:24px;
    padding-top:20px; border-top:1.5px solid #f5eff3;
}
.buc-single-media-item img {
    width:120px; height:120px; object-fit:cover;
    border-radius:10px; border:1.5px solid #EDE0E8; display:block;
    transition:transform .15s;
}
.buc-single-media-item:hover img { transform:scale(1.04); }

/* ── Comments ──────────────────────────────────────── */
.buc-comments-section {
    margin-top:36px; padding-top:28px;
    border-top:2px solid #FDE8EF;
}
.buc-comments-title { font-size:18px; font-weight:700; margin:0 0 20px; }
.buc-comments-list  { display:flex; flex-direction:column; gap:16px; margin-bottom:24px; }
.buc-no-comments    { color:#bbb; font-size:14px; }

.buc-comment {
    display:flex; gap:12px; align-items:flex-start;
}
.buc-reply { margin-left:40px; }
.buc-comment-avatar {
    width:36px; height:36px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg,#FDE8EF,#E8F0FD);
    display:flex; align-items:center; justify-content:center;
    font-size:14px; font-weight:700; color:#b07090;
}
.buc-comment-body { flex:1; }
.buc-comment-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:4px; }
.buc-comment-author { font-size:13px; font-weight:700; color:#1a1a2e; }
.buc-comment-date   { font-size:11px; color:#bbb; }
.buc-comment-text   { font-size:14px; color:#333; line-height:1.6; white-space:pre-wrap; }
.buc-comment-actions{ margin-top:6px; display:flex; gap:12px; }
.buc-reply-btn, .buc-delete-comment-btn {
    background:none; border:none; font-size:12px; color:#b07090; cursor:pointer; padding:0; font-family:inherit;
}
.buc-reply-btn:hover         { text-decoration:underline; }
.buc-delete-comment-btn      { color:#e05070; }
.buc-delete-comment-btn:hover{ text-decoration:underline; }

.buc-tier-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: #FDE8EF;
    color: #b07090;
    border: 1px solid #e8a0b8;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.6;
}
/* Override BUD_Tier::badge() size when rendered inside comments */
.buc-comment-meta .bud-tier-badge,
.buc-comment-meta .bud-tier-badge--lg {
    padding: 1px 7px !important;
    font-size: 10px !important;
    border-radius: 20px !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
}

/* Reply input */
.buc-reply-form { margin-top:10px; margin-left:48px; }
.buc-reply-form textarea {
    width:100%; border:1.5px solid #EDE0E8; border-radius:8px;
    padding:8px 12px; font-size:13px; font-family:inherit; resize:none;
}
.buc-reply-form textarea:focus { outline:none; border-color:#e8a0b8; }

/* Comment input */
.buc-comment-form { margin-top:20px; }
#buc-comment-input {
    width:100%; border:1.5px solid #EDE0E8; border-radius:12px;
    padding:12px 16px; font-size:14px; font-family:inherit;
    resize:vertical; box-sizing:border-box; transition:border-color .15s;
}
#buc-comment-input:focus { outline:none; border-color:#e8a0b8; box-shadow:0 0 0 3px rgba(232,160,184,.15); }
.buc-comment-submit {
    margin-top:10px; background:#e8a0b8; color:#fff; border:none;
    border-radius:10px; padding:10px 28px; font-size:14px; font-weight:700;
    cursor:pointer; font-family:inherit; transition:background .15s;
}
.buc-comment-submit:hover { background:#d4809a; }
#buc-comment-msg { font-size:13px; margin-top:8px; }

/* Locked page */
.buc-locked-page { text-align:center; padding:60px 20px; }
.buc-lock-icon-lg { font-size:48px; margin-bottom:16px; }
.buc-lock-msg { color:#888; font-size:15px; }
.buc-btn-primary {
    display:inline-block; background:#e8a0b8; color:#fff; border-radius:10px;
    padding:12px 28px; font-size:14px; font-weight:700; text-decoration:none; margin-top:16px;
}
.buc-btn-primary:hover { background:#d4809a; }
.buc-login-notice { font-size:14px; color:#aaa; }
.buc-login-notice a { color:#b07090; }

/* ── Standalone single post page (own HTML, not theme) ── */
.buc-single-page {
    margin: 0;
    padding: 0;
    background: #fdf6f9;
    font-family: 'Geist',system-ui,sans-serif;
    color: #2d2d2d;
    -webkit-font-smoothing: antialiased;
}
.buc-standalone-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Top bar with back button and site name */
.buc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 24px;
    border-bottom: 1px solid #f0e0e8;
    margin-bottom: 28px;
}
.buc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b07090;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 16px;
    border: 1.5px solid #e8a0b8;
    border-radius: 20px;
    background: #fff;
    transition: background .15s;
}
.buc-back-btn:hover { background: #FDE8EF; color: #8c4060; }
.buc-home-link {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
}
.buc-home-link:hover { color: #b07090; }

/* Single post card */
.buc-single-page .buc-single-post {
    background: #fff;
    border: 1.5px solid #EDE0E8;
    border-radius: 18px;
    padding: 32px 36px;
}
@media (max-width: 640px) {
    .buc-single-page .buc-single-post { padding: 20px 16px; }
    .buc-standalone-wrap { padding: 0 12px 40px; }
}
