/* ================================================================
   Wed Community — Create Conversation Page
================================================================ */
#wcc-app *, #wcc-app *::before, #wcc-app *::after { box-sizing: border-box; }
#wcc-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; color: #1a1a2e; line-height: 1.5;
     margin: 0 auto; padding: 0 16px;
}

/* ---- Loading overlay ---- */
#wcc-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9000; align-items: center; justify-content: center; }
#wcc-overlay.active { display: flex !important; }
.wcc-spinner { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,.3); border-top-color: #FFD700; border-radius: 50%; animation: wcc-spin .7s linear infinite; }
@keyframes wcc-spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
#wcc-toast-wrap { position: fixed; top: 28px; right: 28px; z-index: 9100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.wcc-toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,.2); animation: wcc-toast-in .3s ease; min-width: 220px; }
.wcc-toast.success { background: #10b981; }
.wcc-toast.error   { background: #ef4444; }
@keyframes wcc-toast-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }

/* ================================================================
   TWO-COLUMN LAYOUT
================================================================ */
#wcc-app .wcc-layout {
    display: grid !important;
    grid-template-columns: 1fr 444px;
    gap: 30px;
    align-items: start;
    padding: 0px 0px;
    margin-bottom: 35px;
}

/* ================================================================
   LEFT COLUMN — FORM
================================================================ */
.wcc-page-title {
    font-size: 20px; font-weight: 500; color: #212529;
    margin: 0 0 24px;
}

.wcc-field { margin-bottom: 16px; }
.wcc-label {
    display: block; font-size: 14px; color: #212529;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.wcc-label strong { font-weight: 700; }

/* Title input */
#wcc-title {
    width: 100% !important; border: 1px solid #ced4da !important; border-radius: 6px;
    padding: 10px 14px !important; font-size: 14px; color: #212529;
    font-family: inherit; background: #fff !important; outline: none !important;
    box-shadow: none !important;
    transition: border-color .18s;
}
#wcc-title:focus { border-color: #aaa !important; }
#wcc-title::placeholder { color: #9ca3af; }

/* Topic select */
#wcc-topic {
    width: 100% !important; border: 1px solid #ced4da !important; border-radius: 6px;
    padding: 5px 14px !important; font-size: 14px; color: #374151;
    font-family: inherit; background: #fff !important; cursor: pointer;
    outline: none !important;
}
#wcc-topic:focus { border-color: #aaa !important; }

/* ---- Rich Text Editor ---- */
.wcc-editor-wrap {
    border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden;
    background: #fff;
}
.wcc-editor-toolbar {
    display: flex !important; align-items: center; gap: 2px;
    padding: 6px 10px; border-bottom: 1px solid #ced4da;
    background: #f9fafb;
}
.wcc-tb-btn {
    background: none !important; border: 1px solid transparent !important;
    border-radius: 4px; padding: 4px 10px; font-size: 14px; cursor: pointer;
    color: #374151 !important; transition: background .15s, border-color .15s;
    font-family: inherit;
}
.wcc-tb-btn:hover { background: #e5e7eb !important; border-color: #d1d5db !important; }
.wcc-tb-btn.active { background: #e5e7eb !important; border-color: #aaa !important; }
.wcc-editor {
    min-height: 140px; padding: 12px 14px; font-size: 14px; color: #374151;
    outline: none; line-height: 1.6; overflow-y: auto;
}
.wcc-editor:empty::before {
    content: attr(data-placeholder); color: #9ca3af; pointer-events: none;
}

/* ---- Upload ---- */
.wcc-upload-btn {
    display: inline-flex !important; align-items: center; gap: 8px;
    background: #fff !important; color: #374151 !important;
    border: 1px solid #d1d5db !important; border-radius: 6px;
    padding: 9px 18px; font-size: 14px; font-family: inherit; cursor: pointer;
    transition: border-color .18s;
}
.wcc-upload-btn i { font-size: 15px; }
.wcc-preview-grid {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.wcc-preview-item {
    position: relative; width: 175px; height: 150px; border-radius: 0px;
    overflow: hidden; border: 1px solid #e5e7eb; background: #0000001a;
}
.wcc-preview-item img,
.wcc-preview-item video { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.wcc-preview-check {
    position: absolute; top: 5px; left: 7px; width: 14px; height: 14px;
    cursor: pointer; z-index: 3;
}
.wcc-btn-remove-selected {
    background: #ef4444 !important; color: #fff !important; border: none !important;
    border-radius: 0px; padding: 10px 17px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.wcc-btn-remove-selected:hover { background: #dc2626 !important; }
.wcc-btn-cancel-del {
    background: #f3f4f6 !important; color: #374151 !important; border: none !important;
    border-radius: 8px; padding: 9px 24px; font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.wcc-preview-remove {
    position: absolute; top: 5px; right:7px; width: 25px; height: 25px;
    border-radius: 50%; background: white; color: #dc3545! important;
    border: none !important; font-size: 11px; cursor: pointer;
    display: flex !important; align-items: center; justify-content: center;
    font-family: inherit; line-height: 1;
}

/* ---- Post button ---- */
.wcc-actions { margin-top: 28px; }
.wcc-btn-post {
    background: #ffd700 !important; color: #1a1a2e !important;
    border: none !important; border-radius: 8px;
    padding: 10px 40px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background .18s; font-family: inherit;
    display: block; margin: 0 auto;
}
.wcc-btn-post:hover { background: #ffd700 !important; }

/* ================================================================
   RIGHT COLUMN — GUIDELINES
================================================================ */
.wcc-guidelines-box {
    border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden;
    background: #fff;
}
.wcc-guidelines-header {
    background: white; padding: 20px 20px 16px 20px;
}
.wcc-guidelines-header p {
    margin: 0; font-size: 18px; font-weight: 400; color: #212529; line-height: 1.4;
}
.wcc-guidelines-body { padding: 0px 20px 20px; }
.wcc-note-label { font-size: 14px; color: #212529; margin: 0 0 12px; font-weight: 600; text-transform: uppercase; }

/* Accordion */
.wcc-acc-item { border: 1px solid #ccc; border-radius: 6px; margin-bottom: 6px; overflow: hidden; }
.wcc-acc-head {
    display: flex !important; align-items: center; justify-content: space-between;
    width: 100%; background: white !important; border: none !important;
    padding: 10px 10px; font-size: 15px; font-weight: 400; color: #444 !important;
    cursor: pointer; text-align: left; font-family: inherit;
    transition: background .15s;
}
.wcc-acc-head:hover { background: #ccc !important; }
.wcc-acc-item.open .wcc-acc-head { background: #ffffff !important; }
.wcc-acc-head i { font-size: 12px; flex-shrink: 0; color: #6b7280 !important; }
.wcc-acc-body { padding: 10px; background: #fff; }
.wcc-acc-body p { margin: 0; font-size: 14px; color: #212529; line-height: 1.6; }

/* Read guidelines link */
.wcc-read-guidelines {
    display: inline-block; margin-top: 16px;
    font-size: 14px; color: #007bff !important; font-weight: 400;
    text-decoration: none !important;
}
.wcc-read-guidelines:hover { text-decoration: underline !important; }

/* ================================================================
   SUCCESS MODAL
================================================================ */
.wcc-modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 9500;
    align-items: center; justify-content: center; padding: 16px;
}
.wcc-modal-backdrop.open { display: flex !important; animation: wcc-bd-in .2s ease; }
@keyframes wcc-bd-in { from { opacity: 0; } to { opacity: 1; } }

.wcc-success-modal-box {
    background: #fff; border-radius: 3px; width: 100%; max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: wcc-m-in .22s ease;
    overflow: hidden;
}
@keyframes wcc-m-in { from { opacity: 0; transform: scale(.95) translateY(-10px); } to { opacity: 1; transform: none; } }

.wcc-success-modal-head {
    display: flex !important; align-items: center; justify-content: space-between;
    background: #ffd700; padding: 16px 20px;
}
.wcc-success-modal-head span {
    font-size: 18px; font-weight: 600; color: #212529;
}
.wcc-success-modal-x {
    background: none !important; border: none !important; font-size: 22px;
    color: #1a1a2e !important; cursor: pointer; line-height: 1; padding: 0 4px;
    font-family: inherit;
}
.wcc-success-modal-x:hover { color: #000 !important; }

.wcc-success-modal-body {
    padding: 28px 24px 10px; text-align: center;
}
.wcc-success-modal-body p {
    margin: 0; font-size: 14px; color: #212529; line-height: 1.6;
}

.wcc-success-modal-foot {
    padding: 20px 24px 28px; display: flex; justify-content: center;
}
a.wcc-btn-view-now {
    display: inline-block !important;
    background: #ffd700 !important; color: #1a1a2e !important;
    border: none !important; border-radius: 8px;
    padding: 10px 40px; font-size: 15px; font-weight: 700 !important;
    cursor: pointer; text-decoration: none !important; transition: background .18s;
}
a.wcc-btn-view-now:hover { background: #ffd700 !important; text-decoration: none !important; }

/* ---- Sort toggle button ---- */
.wcc-btn-sort {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 6px;
    padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
    color: #374151; transition: background .15s;
}
.wcc-btn-sort:hover { background: #e5e7eb; }
.wcc-sort-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.4); z-index: 4; pointer-events: none;
    border-radius: 8px;
}
.wcc-drag-icon { color: #fff; font-size: 22px; }
.wcc-sort-placeholder {
    float: left; margin: 0 8px 8px 0;
    width: 90px; height: 72px; border-radius: 8px;
    background: #e5e7eb; border: 2px dashed #9ca3af;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 767px) {
    #wcc-app .wcc-layout { grid-template-columns: 1fr !important; }
    .wcc-guidelines-col { order: 1; }
}
