Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,6 +115,7 @@ body, .stApp, [data-testid="stAppViewContainer"] {
|
|
| 115 |
color: var(--text) !important;
|
| 116 |
}
|
| 117 |
|
|
|
|
| 118 |
/* هدر راهیار */
|
| 119 |
.rahyar-title {
|
| 120 |
color: var(--primary) !important;
|
|
@@ -127,7 +128,7 @@ body, .stApp, [data-testid="stAppViewContainer"] {
|
|
| 127 |
font-size: 14px !important;
|
| 128 |
}
|
| 129 |
|
| 130 |
-
/* توضیحات */
|
| 131 |
.explanation-title {
|
| 132 |
color: var(--primary) !important;
|
| 133 |
font-weight: bold !important;
|
|
@@ -143,7 +144,8 @@ body, .stApp, [data-testid="stAppViewContainer"] {
|
|
| 143 |
border-right: 3px solid var(--primary) !important;
|
| 144 |
}
|
| 145 |
|
| 146 |
-
/* استایلهای ورودی */
|
|
|
|
| 147 |
.stTextInput input,
|
| 148 |
.stNumberInput input,
|
| 149 |
.stSelectbox select,
|
|
@@ -178,7 +180,7 @@ div[data-baseweb="select"] > div:first-child {
|
|
| 178 |
border-color: var(--primary) !important;
|
| 179 |
box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.15) !important;
|
| 180 |
outline: none !important;
|
| 181 |
-
}
|
| 182 |
|
| 183 |
/* استایل لیبلها */
|
| 184 |
.stTextInput > label,
|
|
@@ -198,7 +200,7 @@ div[data-baseweb="select"] > div:first-child {
|
|
| 198 |
opacity: 0.5 !important;
|
| 199 |
}
|
| 200 |
|
| 201 |
-
/* استایلهای خاص Selectbox */
|
| 202 |
div[data-baseweb="select"] > div:first-child {
|
| 203 |
-webkit-appearance: none !important;
|
| 204 |
-moz-appearance: none !important;
|
|
@@ -222,12 +224,28 @@ div[data-baseweb="select"]::after {
|
|
| 222 |
top: 50%;
|
| 223 |
transform: translateY(-50%);
|
| 224 |
color: var(--primary);
|
| 225 |
-
background-color: white !important;
|
| 226 |
font-size: 14px;
|
| 227 |
pointer-events: none;
|
| 228 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
|
| 230 |
-
/* ا
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
.stNumberInput button {
|
| 232 |
color: var(--primary) !important;
|
| 233 |
background-color: transparent !important;
|
|
@@ -240,7 +258,26 @@ div[data-baseweb="select"]::after {
|
|
| 240 |
background-color: #f0e6ff !important;
|
| 241 |
}
|
| 242 |
|
| 243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
.stButton>button,
|
| 245 |
[data-testid="baseButton-primary"],
|
| 246 |
.accept-btn,
|
|
@@ -251,19 +288,42 @@ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div
|
|
| 251 |
border-radius: 8px !important;
|
| 252 |
padding: 10px 20px !important;
|
| 253 |
font-weight: bold !important;
|
| 254 |
-
transition: all 0.3s ease !important;
|
| 255 |
}
|
| 256 |
|
|
|
|
| 257 |
.stButton>button:hover,
|
| 258 |
[data-testid="baseButton-primary"]:hover,
|
| 259 |
.accept-btn:hover,
|
| 260 |
div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button:hover {
|
| 261 |
-
background-color: #5a0a96 !important;
|
| 262 |
-
transform: translateY(-1px) !important;
|
| 263 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
}
|
| 265 |
|
| 266 |
-
/* استایل تضمینی برای رادیو باتنها */
|
| 267 |
.stRadio > div > div > div > div > div > label,
|
| 268 |
.stRadio > div > div > div > div > label,
|
| 269 |
.stRadio > div > div > div > label,
|
|
@@ -271,13 +331,26 @@ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div
|
|
| 271 |
.stRadio > div > label,
|
| 272 |
.stRadio > label {
|
| 273 |
color: #000000 !important;
|
|
|
|
| 274 |
}
|
| 275 |
|
| 276 |
.stRadio span {
|
| 277 |
color: #000000 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
}
|
| 279 |
|
| 280 |
-
/* استایل برای هشدارها */
|
| 281 |
.stAlert .st-ae {
|
| 282 |
border-right: 4px solid #ffc107 !important;
|
| 283 |
background-color: #fff3cd !important;
|
|
@@ -286,11 +359,13 @@ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div
|
|
| 286 |
color: #856404 !important;
|
| 287 |
}
|
| 288 |
|
|
|
|
| 289 |
.stAlert .st-af {
|
| 290 |
color: #ffc107 !important;
|
| 291 |
font-size: 20px !important;
|
| 292 |
}
|
| 293 |
|
|
|
|
| 294 |
.stAlert .st-ag {
|
| 295 |
color: #856404 !important;
|
| 296 |
font-family: 'B Nazanin' !important;
|
|
@@ -298,6 +373,84 @@ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div
|
|
| 298 |
margin-right: 8px !important;
|
| 299 |
}
|
| 300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
</style>
|
| 302 |
""", unsafe_allow_html=True)
|
| 303 |
|
|
|
|
| 115 |
color: var(--text) !important;
|
| 116 |
}
|
| 117 |
|
| 118 |
+
|
| 119 |
/* هدر راهیار */
|
| 120 |
.rahyar-title {
|
| 121 |
color: var(--primary) !important;
|
|
|
|
| 128 |
font-size: 14px !important;
|
| 129 |
}
|
| 130 |
|
| 131 |
+
/* توضیحات */
|
| 132 |
.explanation-title {
|
| 133 |
color: var(--primary) !important;
|
| 134 |
font-weight: bold !important;
|
|
|
|
| 144 |
border-right: 3px solid var(--primary) !important;
|
| 145 |
}
|
| 146 |
|
| 147 |
+
/* ========== استایلهای ورودی یکپارچه ========== */
|
| 148 |
+
/* استایل پایه برای تمام عناصر ورودی */
|
| 149 |
.stTextInput input,
|
| 150 |
.stNumberInput input,
|
| 151 |
.stSelectbox select,
|
|
|
|
| 180 |
border-color: var(--primary) !important;
|
| 181 |
box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.15) !important;
|
| 182 |
outline: none !important;
|
| 183 |
+
}
|
| 184 |
|
| 185 |
/* استایل لیبلها */
|
| 186 |
.stTextInput > label,
|
|
|
|
| 200 |
opacity: 0.5 !important;
|
| 201 |
}
|
| 202 |
|
| 203 |
+
/* ========== استایلهای خاص Selectbox ========== */
|
| 204 |
div[data-baseweb="select"] > div:first-child {
|
| 205 |
-webkit-appearance: none !important;
|
| 206 |
-moz-appearance: none !important;
|
|
|
|
| 224 |
top: 50%;
|
| 225 |
transform: translateY(-50%);
|
| 226 |
color: var(--primary);
|
| 227 |
+
background-color: white !important; /* پسزمینه سفید برای پوشاندن فلش پیشفرض */
|
| 228 |
font-size: 14px;
|
| 229 |
pointer-events: none;
|
| 230 |
}
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
/* ===== راه حل تضمینی برای استایل dropdown ===== */
|
| 234 |
+
|
| 235 |
+
/* آیتمهای لیست */
|
| 236 |
+
div[data-baseweb="popover"] [role="option"] {
|
| 237 |
+
color: var(--text) !important;
|
| 238 |
+
background-color: white !important;
|
| 239 |
+
border: 1px var(--primary) !important;
|
| 240 |
+
}
|
| 241 |
|
| 242 |
+
/* آیتم انتخاب شده */
|
| 243 |
+
div[data-baseweb="popover"] [role="option"][aria-selected="true"] {
|
| 244 |
+
background-color: #f0e6ff !important;
|
| 245 |
+
color: black !important;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
/* ========== استایلهای Number Input ========== */
|
| 249 |
.stNumberInput button {
|
| 250 |
color: var(--primary) !important;
|
| 251 |
background-color: transparent !important;
|
|
|
|
| 258 |
background-color: #f0e6ff !important;
|
| 259 |
}
|
| 260 |
|
| 261 |
+
|
| 262 |
+
/* کامپوننتهای سفارشی */
|
| 263 |
+
.rahyar-header {
|
| 264 |
+
background-color: var(--primary) !important;
|
| 265 |
+
color: white !important;
|
| 266 |
+
padding: 15px !important;
|
| 267 |
+
border-radius: 10px !important;
|
| 268 |
+
margin-bottom: 20px !important;
|
| 269 |
+
text-align: center !important;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.price-container {
|
| 273 |
+
background-color: var(--secondary-bg) !important;
|
| 274 |
+
border-radius: 10px !important;
|
| 275 |
+
padding: 15px !important;
|
| 276 |
+
margin: 15px 0 !important;
|
| 277 |
+
border-right: 5px solid var(--primary) !important;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
/* دکمه اصلی (بنفش با متن سفید) */
|
| 281 |
.stButton>button,
|
| 282 |
[data-testid="baseButton-primary"],
|
| 283 |
.accept-btn,
|
|
|
|
| 288 |
border-radius: 8px !important;
|
| 289 |
padding: 10px 20px !important;
|
| 290 |
font-weight: bold !important;
|
| 291 |
+
transition: all 0.3s ease !important; /* افزودن transition برای انیمیشن نرم */
|
| 292 |
}
|
| 293 |
|
| 294 |
+
/* افکت hover برای دکمه اصلی */
|
| 295 |
.stButton>button:hover,
|
| 296 |
[data-testid="baseButton-primary"]:hover,
|
| 297 |
.accept-btn:hover,
|
| 298 |
div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button:hover {
|
| 299 |
+
background-color: #5a0a96 !important; /* بنفش تیرهتر */
|
| 300 |
+
transform: translateY(-1px) !important; /* حرکت جزئی به بالا */
|
| 301 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important; /* سایه بیشتر */
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
/* دکمه ثانویه (سفید با حاشیه بنفش) */
|
| 305 |
+
.stFormSubmitButton>button,
|
| 306 |
+
[data-testid="baseButton-secondary"],
|
| 307 |
+
.reject-btn {
|
| 308 |
+
background-color: var(--primary) !important;
|
| 309 |
+
color: white !important;
|
| 310 |
+
border: none !important;
|
| 311 |
+
border-radius: 8px !important;
|
| 312 |
+
padding: 10px 20px !important;
|
| 313 |
+
font-weight: bold !important;
|
| 314 |
+
transition: all 0.3s ease !important; /* افزودن transition برای انیمیشن نرم */
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
/* افکت hover برای دکمه ثانویه */
|
| 318 |
+
.stFormSubmitButton>button:hover,
|
| 319 |
+
[data-testid="baseButton-secondary"]:hover,
|
| 320 |
+
.reject-btn:hover {
|
| 321 |
+
background-color: #5a0a96 !important; /* بنفش تیرهتر */
|
| 322 |
+
transform: translateY(-1px) !important; /* حرکت جزئی به بالا */
|
| 323 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important; /* سایه بیشتر */
|
| 324 |
}
|
| 325 |
|
| 326 |
+
/* استایل تضمینی برای رادیو باتنها - نسخه نهایی */
|
| 327 |
.stRadio > div > div > div > div > div > label,
|
| 328 |
.stRadio > div > div > div > div > label,
|
| 329 |
.stRadio > div > div > div > label,
|
|
|
|
| 331 |
.stRadio > div > label,
|
| 332 |
.stRadio > label {
|
| 333 |
color: #000000 !important;
|
| 334 |
+
-webkit-text-fill-color: #000000 !important; /* برای مرورگرهای وبکیت */
|
| 335 |
}
|
| 336 |
|
| 337 |
.stRadio span {
|
| 338 |
color: #000000 !important;
|
| 339 |
+
-webkit-text-fill-color: #000000 !important;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
/* اگر باز هم مشکل داشت این را اضافه کنید */
|
| 343 |
+
.stRadio > div > div > div > div > div > label > div:first-child,
|
| 344 |
+
.stRadio > div > div > div > div > label > div:first-child,
|
| 345 |
+
.stRadio > div > div > div > label > div:first-child,
|
| 346 |
+
.stRadio > div > div > label > div:first-child,
|
| 347 |
+
.stRadio > div > label > div:first-child,
|
| 348 |
+
.stRadio > label > div:first-child {
|
| 349 |
+
color: #000000 !important;
|
| 350 |
+
-webkit-text-fill-color: #000000 !important;
|
| 351 |
}
|
| 352 |
|
| 353 |
+
/* استایل پایه برای هشدارها */
|
| 354 |
.stAlert .st-ae {
|
| 355 |
border-right: 4px solid #ffc107 !important;
|
| 356 |
background-color: #fff3cd !important;
|
|
|
|
| 359 |
color: #856404 !important;
|
| 360 |
}
|
| 361 |
|
| 362 |
+
/* آیکون هشدار */
|
| 363 |
.stAlert .st-af {
|
| 364 |
color: #ffc107 !important;
|
| 365 |
font-size: 20px !important;
|
| 366 |
}
|
| 367 |
|
| 368 |
+
/* متن هشدار */
|
| 369 |
.stAlert .st-ag {
|
| 370 |
color: #856404 !important;
|
| 371 |
font-family: 'B Nazanin' !important;
|
|
|
|
| 373 |
margin-right: 8px !important;
|
| 374 |
}
|
| 375 |
|
| 376 |
+
/* حالت hover برای هشدار */
|
| 377 |
+
.stAlert .st-ae:hover {
|
| 378 |
+
box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2) !important;
|
| 379 |
+
transform: translateX(2px);
|
| 380 |
+
transition: all 0.3s ease;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
/* استایل برای دکمه بستن هشدار */
|
| 384 |
+
.stAlert .st-ah {
|
| 385 |
+
color: #856404 !important;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
/* استایل مخصوص موبایل */
|
| 389 |
+
@media (max-width: 768px) {
|
| 390 |
+
.stAlert .st-ae {
|
| 391 |
+
padding: 12px !important;
|
| 392 |
+
font-size: 13px !important;
|
| 393 |
+
}
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
/* متن گزینهها */
|
| 398 |
+
.stRadio span {
|
| 399 |
+
color: #000000 !important; /* مشکی خالص */
|
| 400 |
+
font-size: 14px !important;
|
| 401 |
+
padding-right: 5px !important;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
/* حالت hover */
|
| 405 |
+
.stRadio label:hover span {
|
| 406 |
+
color: #333333 !important; /* مشکی کمی روشنتر */
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
/* کانتینر اصلی */
|
| 410 |
+
.stRadio > div {
|
| 411 |
+
margin-bottom: 10px !important;
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
/* تنظیمات مخصوص موبایل */
|
| 416 |
+
@media (max-width: 768px) {
|
| 417 |
+
.folium-map {
|
| 418 |
+
height: 300px !important;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
/* فرمها در موبایل */
|
| 422 |
+
.stTextInput>label,
|
| 423 |
+
.stNumberInput>label,
|
| 424 |
+
.stSelectbox>label {
|
| 425 |
+
font-size: 14px !important;
|
| 426 |
+
padding: 4px 0 !important;
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
.stTextInput input,
|
| 430 |
+
.stNumberInput input,
|
| 431 |
+
.stSelectbox select {
|
| 432 |
+
font-size: 16px !important;
|
| 433 |
+
padding: 12px !important;
|
| 434 |
+
height: auto !important;
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
.stButton>button {
|
| 438 |
+
font-size: 14px !important;
|
| 439 |
+
padding: 8px 16px !important;
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
.stMarkdown h3 {
|
| 443 |
+
font-size: 16px !important;
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
.stMarkdown p {
|
| 447 |
+
font-size: 13px !important;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
.stSelectbox [role="listbox"] {
|
| 451 |
+
font-size: 16px !important;
|
| 452 |
+
}
|
| 453 |
+
}
|
| 454 |
</style>
|
| 455 |
""", unsafe_allow_html=True)
|
| 456 |
|