/* ============================================================
   forum/create.css — Trang đăng bài cộng đồng
   Palette: navy #0a2d6e | blue #0d5db5 | cyan #29b6f6 | red #e53935
   ============================================================ */

.rtm-fcreate {
    background: #f0f7ff;
    min-height: 80vh;
    padding: 28px 0 60px;
}

.rtm-fcreate__wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Card ────────────────────────────────────────────────── */
.rtm-fcreate__card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #c5d8f0;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(13, 93, 181, 0.08);
}

.rtm-fcreate__title {
    font-size: 22px;
    font-weight: 800;
    color: #0a2d6e;
    margin: 0 0 22px;
}

/* ── Pending note ────────────────────────────────────────── */
.rtm-fcreate__pending-note {
    background: #e8f4fd;
    border: 1px solid #c5d8f0;
    border-left: 3px solid #29b6f6;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #0a2d6e;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ── Field ───────────────────────────────────────────────── */
.rtm-fcreate__field {
    margin-bottom: 18px;
}

.rtm-fcreate__field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0a2d6e;
    margin-bottom: 7px;
}

.rtm-fcreate__field input,
.rtm-fcreate__field select,
.rtm-fcreate__field textarea {
    width: 100%;
    border: 1.5px solid #c5d8f0;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    color: #374151;
    background: #f8fbff;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.rtm-fcreate__field input:focus,
.rtm-fcreate__field select:focus,
.rtm-fcreate__field textarea:focus {
    border-color: #29b6f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.12);
}

.rtm-fcreate__field input::placeholder,
.rtm-fcreate__field textarea::placeholder {
    color: #9ca3af;
}

.rtm-fcreate__field textarea {
    resize: vertical;
    min-height: 200px;
}

/* Select arrow */
.rtm-fcreate__field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'><path d='M1 1L8 8L15 1' stroke='%2329b6f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

/* Row 2 columns */
.rtm-fcreate__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Image upload ────────────────────────────────────────── */
.rtm-fcreate__images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.rtm-fcreate__img-preview {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #c5d8f0;
}

.rtm-fcreate__img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rtm-fcreate__img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    min-height: 20px !important;
    padding: 0 !important;
    background: rgba(10, 45, 110, 0.7) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

.rtm-fcreate__img-remove:hover {
    background: #e53935 !important;
}

.rtm-fcreate__upload-btn {
    width: 84px;
    height: 84px;
    min-height: 84px !important;
    border: 2px dashed #90c4e8 !important;
    border-radius: 10px !important;
    background: #f0f7ff !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5a6a8a !important;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.rtm-fcreate__upload-btn:hover {
    border-color: #0d5db5 !important;
    color: #0d5db5 !important;
    background: #e8f4fd !important;
    transform: none !important;
}

/* ── Submit — RED ────────────────────────────────────────── */
.rtm-fcreate__submit {
    background: #e53935 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    width: 100%;
    padding: 14px !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.35) !important;
    transition: background 0.2s, transform 0.2s !important;
    min-height: auto !important;
}

.rtm-fcreate__submit:hover {
    background: #c62828 !important;
    transform: translateY(-1px) !important;
}

.rtm-fcreate__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Editor (TinyMCE / Quicktags) ───────────────────────── */
.rtm-fcreate__editor-wrap {
    border: 1.5px solid #c5d8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rtm-fcreate__editor-wrap:focus-within {
    border-color: #29b6f6;
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.12);
}

.rtm-fcreate__editor-wrap .wp-editor-container { border: 0 !important; }

.rtm-fcreate__editor-wrap .mce-toolbar-grp,
.rtm-fcreate__editor-wrap .quicktags-toolbar {
    border-bottom: 1px solid #e8f4fd !important;
    background: #f8fbff !important;
}

.rtm-fcreate__editor-wrap .mce-top-part::before { box-shadow: none !important; }
.rtm-fcreate__editor-wrap .mce-tinymce { border: 0 !important; box-shadow: none !important; }
.rtm-fcreate__editor-wrap iframe { min-height: 360px !important; background: #fff; }
.rtm-fcreate__editor-wrap textarea.wp-editor-area {
    min-height: 360px;
    border: 0 !important;
    padding: 16px !important;
    background: #fff !important;
}

/* Insert image button */
.rtm-editor-insert-image-btn {
    margin: 8px 0 8px 8px !important;
    height: 30px !important;
    padding: 0 12px !important;
    border-radius: 6px !important;
    border: 1px solid #c5d8f0 !important;
    background: #fff !important;
    color: #0d5db5 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: border-color 0.15s, background 0.15s !important;
}

.rtm-editor-insert-image-btn:hover {
    border-color: #0d5db5 !important;
    background: #e8f4fd !important;
    color: #0a2d6e !important;
}

/* ── Tags input ──────────────────────────────────────────── */
.rtm-fcreate__tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid #c5d8f0;
    border-radius: 12px;
    background: #f8fbff;
    min-height: 46px;
    align-items: center;
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rtm-fcreate__tags-wrap:focus-within {
    border-color: #29b6f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.12);
}

.rtm-fcreate__tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f4fd;
    color: #0d5db5;
    border: 1px solid #c5d8f0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.rtm-fcreate__tag-remove {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    min-height: auto !important;
    color: #0d5db5 !important;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex !important;
    align-items: center;
    box-shadow: none !important;
    transform: none !important;
}

.rtm-fcreate__tag-remove:hover { color: #e53935 !important; }

.rtm-fcreate__tags-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 14px;
    color: #374151 !important;
    min-width: 120px;
    flex: 1;
    padding: 2px 4px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* ── Notice / Alert ──────────────────────────────────────── */
.rtm-fcreate__alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.rtm-fcreate__alert--error {
    background: #fdecea;
    border: 1px solid #f9baba;
    color: #c62828;
}

.rtm-fcreate__alert--success {
    background: #e8f4fd;
    border: 1px solid #c5d8f0;
    color: #0a2d6e;
}

/* ── Login required ──────────────────────────────────────── */
.rtm-fcreate__login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    gap: 14px;
}

.rtm-fcreate__login-required__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f4fd, #c5d8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.rtm-fcreate__login-required h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0a2d6e;
}

.rtm-fcreate__login-required p {
    margin: 0;
    font-size: 14px;
    color: #5a6a8a;
    line-height: 1.7;
}

.rtm-fcreate__login-required a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 28px;
    border-radius: 12px;
    background: #e53935;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.rtm-fcreate__login-required a:hover {
    background: #c62828;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .rtm-fcreate__row { grid-template-columns: 1fr; }
    .rtm-fcreate__card { padding: 20px 16px; border-radius: 16px; }
    .rtm-fcreate__title { font-size: 20px; }
}