@import 'bulma/css/bulma.min.css';

@font-face {
    font-family: 'iransans';
    font-style: normal;
    font-weight: normal;
    /*src:  url('/font/IranianSans.ttf') format('truetype');*/
    src: url('/assets/font/yekanbakh.ttf');
}

* {
    box-sizing: border-box;
    font-family: iransans;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    background-color: #333 !important;

}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #000;
    background-color: #111111 !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 14px;
}

body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    min-height: 100vh;
    width: 100vw;
}

.app-container {
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #111111;
}

.app-header {
    position: -webkit-sticky;
    /* برای iOS */
    position: sticky;
    z-index: 2;
}

.app-footer {
    position: -webkit-sticky;
    position: sticky;
}

@supports (padding: max(0px)) {
    body {
        padding-bottom: max(env(safe-area-inset-bottom), 0px);
    }
}

.app-main {
    flex: 1;
    overflow-y: hidden;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    /* اسکرول نرم iOS */
    width: 100%;
}

h1 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

h2 {
    font-size: 1.125rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

p {
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.1s;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.form-group {
    margin-bottom: 0.5rem;
}

.input,
.textarea {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    /* ضد zoom iOS */
    outline: none;
    min-height: 44px;
    width: 100%;
    font-size: 14px;
}

.input:focus,
.textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: #495057;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-bar {
    display: flex;
    justify-content: space-around;
    padding: 0.25rem;
    background-color: white;
    border-top: 1px solid #e9ecef;
    min-height: 50px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem;
    min-width: 50px;
    font-size: 0.75rem;
    transition: color 0.1s;
}

.nav-item.active {
    color: #3b82f6;
}

.loading,
.empty-state {
    text-align: center;
    padding: 1rem 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.btn:focus,
.input:focus {
    outline: 1px solid #3b82f6;
    outline-offset: 1px;
}

.chat-header {
    padding: 1rem;
    background: #f0f0f0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.to-user-input {
    padding: 0.5rem;
    margin: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 150px;
}

:root {
    --main-color: #4c2c67;
}

/* header */

.modal-card,
.modal-content {
    max-height: 100% !important;
}

header nav {
    background-color: var(--main-color) !important;
    height: 50px !important;
    display: flex;
    align-items: center;
    position: relative !important;
    border: none !important;
}

.modal.is-rtl {
    direction: rtl !important;
}

.modal-content.is-sidebar-content {
    width: 80vw;
    max-width: 400px;

    position: fixed;
    top: 0;
    right: 0;
    margin: 0;

    height: 100vh;
    border-radius: 0;
    background-color: #111;
    z-index: 2001;

    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.is-active .modal-content.is-sidebar-content {
    transform: translateX(0);
}

.modal-background {
    background-color: rgba(0, 0, 0, 0.5);
}


.has-text-purple {
    color: #800080 !important;
}

.is-profile-photo {
    overflow: hidden;
}

.media.is-flex-direction-column {
    display: flex;
    flex-direction: column !important;
    align-items: center;
}

header .menu .box {
    box-shadow: none;
}

/* header end */

/* home */

.tabs ul li {
    border-radius: 0;
}


.tabs.is-boxed li.is-active a {
    color: white !important;
    font-weight: bold;
    background-color: transparent;
    border-bottom-color: var(--main-color) !important;
    border-bottom: 3px solid var(--main-color);
}

.floating-action-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;

    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #55acee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 50%;
}

.floating-action-button:hover {
    background-color: #4992cc;
}

.chat-list-container {
    height: 100%;
    overflow-y: scroll;
}

/* home end */

/* chat screen */

.epr_q53mwh.epr_vl50xg.epr_-3yva2a.epr_c90x4z {
    display: none;
}

.epr-main.EmojiPickerReact {
    background-color: #111;
    position: fixed;
    bottom: 5rem;
}

.epr-emoji-category-label.epr_vl50xg.epr_-ufflr1.epr_-99lr9q {
    background-color: var(--main-color);
    display: none;
}

.epr-skin-tones.epr_-v86i3b.epr_q53mwh.epr_vl50xg.epr_vwruzc.epr_zeg9on.epr_qyh4cg {
    display: none;
}

.loading {
    color: white !important;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--main-color);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.chat-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-screen .chat-input {
    position: fixed;
    width: 100%;
    bottom: 0;
    right: 0;
    background-color: #333;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.chat-screen .chat-header {
    background-color: var(--main-color);
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: fixed;
    border: none;
    top: 0;
    right: 0;
    z-index: 100;
}


.chat-screen .chat-header .dropdown-menu .dropdown-content {
    left: 10rem;
    position: relative;
    background-color: #111111;
}

.chat-screen .chat-header .dropdown-menu .dropdown-content a {
    padding: 12px 10px;
    font-size: 14px;
}

.chat-screen .chat-header .media {
    align-items: center;
    display: flex;
    margin-bottom: 0;
}

.chat-screen .chat-header .media .media-content {
    /* align-items: center; 
    flex-direction: column; 
    display: flex; */
    overflow: hidden;
    display: block;
    text-align: right;
}

.chat-screen .chat-header .is-profile-chat-avatar {
    width: 50px;
}

.chat-screen .chat-input input {
    border: none;
    background-color: transparent;
    /* padding-right: 3rem; */
    box-shadow: none;
    color: #999;
    font-weight: bold;
    width: 250px;
    max-width: 100%;
}

.image-message img {
    max-height: 200px !important;
    max-width: 200px;
    object-fit: cover;
}


.chat-screen .chat-body {
    flex-grow: 1;
    max-width: 100%;
    padding-top: 20px;
    padding-bottom: 60px;
    background-color: transparent;
    display: flex;
    height: auto ;
    min-height: 100vh;
    flex-direction: column;
}

.chat-container {
    height: 100%;
}

.chat-screen .message-list {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    
    padding-bottom: 10px;
    justify-content: flex-end;
    height: 100%;
}

.message-container {
    display: flex;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.message-container .is-me {
    background-color: var(--main-color);
}

.message-container.me {
    justify-content: flex-start;
}

.message-container.them {
    justify-content: flex-end;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
}

.message-footer {
    margin-top: 2px;
    width: fit-content;
    align-self: flex-end;
}

.message-footer .checks {
    position: relative;
}

/* CallModal.css */

.call-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeInOverlay 0.3s ease forwards;
}

.call-modal-container {
  background: #111;
  border-radius: 25px;
  padding: 40px 30px;
  width: 320px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  animation: scaleIn 0.3s ease forwards;
}

.call-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--main-color);
  margin-bottom: 20px;
  object-fit: cover;
}

.call-caller-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: white;
}

.call-status-text {
  font-size: 1rem;
  color: white;
  margin-bottom: 25px;
}

.call-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  
}

.btn {
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-accept {
  background-color: #28a745;
  color: #fff;
}

.btn-accept:hover {
  background-color: #218838;
}

.btn-reject {
  background-color: #dc3545;
  color: #fff;
}

.btn-reject:hover {
  background-color: #c82333;
}

/* انیمیشن ها */
@keyframes fadeInOverlay {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}



/* login page */

.login_page input {
    background-color: transparent;
    border: 1px solid white;
    text-align: center;
    color: white;
    width: 100%;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #202020;
    /* پس‌زمینه تیره */
    direction: rtl;
    font-family: 'Inter', sans-serif;
}

.login-form {
    background: #2c2c2c;
    /* پس‌زمینه فرم تیره */
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    /* گردتر */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.login-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    /* متن سفید */
}

.login-form .subtitle {
    margin-bottom: 1.5rem;
    color: #b0b0b0;
    /* متن خاکستری روشن */
    font-size: 0.95rem;
    line-height: 1.6;
}

/* استایل‌های مشترک برای ورودی‌ها */
.input-group {
    margin-bottom: 1rem;
    background: #3a3a3a;
    /* پس‌زمینه ورودی تیره */
    border-radius: 10px;
    display: flex;
    align-items: center;
    height: 50px;
}

.login-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    text-align: right;
    outline: none;
}

.login-input::placeholder {
    color: #888;
}

/* آیکون در گروه ورودی (برای حفظ ساختار مشابه تصویر) */
.input-icon {
    padding: 0 10px;
    color: #b0b0b0;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background-color: #6a1b9a;
    /* بنفش عمیق شبیه تصویر */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(106, 27, 154, 0.4);
}

.login-btn:hover:not(:disabled) {
    background-color: #7b1fa2;
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* استایل برای پیام‌های سیستمی */
.message-box {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: right;
}

.message-box.error {
    background-color: #4a1e1e;
    color: #ffbaba;
    border: 1px solid #7c2d2d;
}

.message-box.success {
    background-color: #1e4a2c;
    color: #b8f2c8;
    border: 1px solid #2f5f3e;
}

.message-box .icon-box {
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.message-box svg {
    width: 1.2rem;
    height: 1.2rem;
}

.message-box.error svg {
    color: #ffbaba;
}

.message-box.success svg {
    color: #b8f2c8;
}

/* استایل دکمه بازگشت در مرحله ۲ */
.back-btn {
    background-color: #4a4a4a !important;
    box-shadow: none !important;
    margin-top: 0.75rem;
}

.back-btn:hover:not(:disabled) {
    background-color: #5a5a5a !important;
    transform: none !important;
}

/* استایل برای Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 44, 44, 0.85);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-spinner.loading {
    opacity: 1;
    visibility: visible;
}

.loader {
    border: 4px solid #5a5a5a;
    border-top: 4px solid #6a1b9a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* استایل کلید قوانین و مقررات */
.terms-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    gap: 10px;
}

.terms-link {
    color: #4a90e2;
    /* آبی روشن برای لینک */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

/* کلید Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 25px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #5a5a5a;
    /* Off background */
    transition: .4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3.5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #6a1b9a;
    /* On background */
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.role_page p {
    font-size: 14px !important;
    text-align: justify;
}

.role_page h4 {
    margin-top: 2rem !important;

}