/* XironConnect branding for Fider (feedback.xironconnect.ir) */

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/assets/fonts/vazirmatn-arabic-100-900.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
    U+FE76-FEFC;
}

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/assets/fonts/vazirmatn-latin-100-900.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --xc-magenta: #ff4fd8;
  --xc-magenta-dark: #c2189a;
  --xc-magenta-light: #ff8ae6;
  --xc-cyan: #3ee6ff;
  --xc-bg: #150e22;
  --xc-bg-raised: #1c142c;
  --xc-ink: #f4eef8;
  --primary-color: var(--xc-magenta);
  --primary-color-light: var(--xc-magenta-light);
  --primary-color-dark: var(--xc-magenta-dark);
}

html {
  direction: rtl;
}

html,
body,
button,
input,
textarea,
select {
  font-family: Vazirmatn, Inter, "Segoe UI", Tahoma, sans-serif !important;
}

body[data-theme="dark"] {
  --colors-gray-50: #120a1c;
  --colors-gray-100: #1c142c;
  --colors-gray-200: #2a1f3d;
  --colors-gray-300: #3a2c52;
  --colors-gray-900: #f4eef8;
  --colors-white: #150e22;
  --colors-black: #f4eef8;
  --colors-primary-base: var(--xc-magenta);
  --colors-primary-light: var(--xc-magenta-light);
  --colors-primary-dark: var(--xc-magenta-dark);
  background: var(--xc-bg);
  color: var(--xc-ink);
}

body[data-theme="light"] {
  --colors-primary-base: var(--xc-magenta);
  --colors-primary-light: var(--xc-magenta-light);
  --colors-primary-dark: var(--xc-magenta-dark);
}

#c-header {
  background: var(--xc-bg-raised) !important;
  border-bottom: 1px solid rgba(255, 79, 216, 0.22) !important;
}

body[data-theme="light"] #c-header {
  background: #fff !important;
}

#c-header .c-header__actions {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

#c-header .c-header__nav-link--active {
  box-shadow: 0 2px 0 0 var(--xc-magenta);
}

.c-button--primary,
button.c-button.m-primary,
.bg-primary-base {
  background: linear-gradient(90deg, var(--xc-magenta), var(--xc-cyan)) !important;
  border-color: transparent !important;
  color: #1c0b26 !important;
}

a {
  text-underline-offset: 0.18em;
}

/* Hide Fider branding */
.c-powered,
.c-powered-by,
.p-show-post__powered-by-mobile {
  display: none !important;
}

/* Logical alignment instead of physical left/right */
html[dir="rtl"] .text-left,
html[dir="rtl"] .l-text-left,
html[dir="rtl"] .c-modal-window,
html[dir="rtl"] .c-modal-window .c-modal-footer--left,
html[dir="rtl"] .c-dropdown__handle,
html[dir="rtl"] .c-hint,
html[dir="rtl"] .c-mention-list {
  text-align: start !important;
}

html[dir="rtl"] .p-home__add-idea-btn {
  text-align: start !important;
}

html[dir="rtl"] .p-home__welcome-col {
  padding-right: 0;
  padding-inline-end: 1rem;
}

html[dir="rtl"] .c-posts-container__post-comments,
html[dir="rtl"] .p-show-post .c-post-details,
html[dir="rtl"] .c-post-details {
  margin-left: 0;
}

html[dir="rtl"] .c-posts-container__post-comments {
  margin-inline-start: 1rem;
}

html[dir="rtl"] .ml-auto {
  margin-left: 0;
  margin-inline-start: auto;
}

html[dir="rtl"] .c-dropdown__list--left {
  right: auto;
  left: 0;
}

html[dir="rtl"] .c-signin-social-button img {
  padding-right: 0;
  padding-inline-end: 0.75rem;
}

html[dir="rtl"] .c-tags-select__selected-item {
  padding-left: 0;
  padding-inline-start: 0.5rem;
}

html[dir="rtl"] .c-comment-editor-counter {
  text-align: start;
}

/* Idea composer: Fider's modal is text-align:left and TipTap floats the
   placeholder left, so the first box types LTR even when html is rtl. */
html[dir="rtl"] .c-share-feedback,
html[dir="rtl"] .c-share-feedback-form,
html[dir="rtl"] .c-form-field,
html[dir="rtl"] .c-form-field label {
  text-align: start;
  direction: rtl;
}

html[dir="rtl"] .c-input,
html[dir="rtl"] input.c-input,
html[dir="rtl"] textarea,
html[dir="rtl"] textarea.c-markdown-textarea {
  direction: rtl;
  text-align: start;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .fider-tiptap-editor,
html[dir="rtl"] .fider-tiptap-editor .tiptap,
html[dir="rtl"] .fider-tiptap-editor .ProseMirror {
  direction: rtl;
  text-align: start;
  unicode-bidi: isolate;
}

html[dir="rtl"] .fider-tiptap-editor .tiptap p.tiptap-is-empty:first-child::before {
  float: right;
  text-align: start;
}

html[dir="rtl"] .p-home__add-idea-btn .flex-x {
  flex-direction: row;
}

#p-signin {
  padding-top: 2rem;
}

#p-signin .text-title {
  line-height: 1.7;
}

body[data-theme="dark"] .c-vote-counter__button {
  background-color: rgba(255, 79, 216, 0.12);
  border-color: rgba(255, 79, 216, 0.35);
  color: var(--xc-magenta-light);
}

body[data-theme="dark"] .c-vote-counter__button .c-vote-counter__icon {
  color: var(--xc-magenta-light);
}

body[data-theme="dark"] .c-vote-counter__button:hover,
body[data-theme="dark"] .c-vote-counter__button--voted {
  background-color: rgba(255, 79, 216, 0.22);
  border-color: var(--xc-magenta);
  color: var(--xc-magenta-light);
}
