/* ملف CSS لدعم تعدد اللغات في مشروع W Pay Fintech */

/* تنسيقات عامة */
body {
  transition: all 0.3s ease;
  font-family: 'Roboto', 'Cairo', sans-serif;
}

/* تنسيقات للغة العربية (RTL) */
html[dir="rtl"] {
  font-family: 'Cairo', 'Roboto', sans-serif;
}

html[dir="rtl"] .form-control {
  text-align: right;
}

html[dir="rtl"] .input-group .input-group-text {
  border-radius: 0 0.25rem 0.25rem 0;
}

html[dir="rtl"] .input-group .form-control {
  border-radius: 0.25rem 0 0 0.25rem;
}

html[dir="rtl"] .dropdown-menu {
  text-align: right;
}

html[dir="rtl"] .dropdown-item {
  text-align: right;
}

html[dir="rtl"] .nav {
  padding-right: 0;
}

html[dir="rtl"] .navbar-nav .nav-link {
  padding-right: 0.5rem;
  padding-left: 0;
}

html[dir="rtl"] .ml-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

html[dir="rtl"] .mr-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

html[dir="rtl"] .text-left {
  text-align: right !important;
}

html[dir="rtl"] .text-right {
  text-align: left !important;
}

html[dir="rtl"] .float-left {
  float: right !important;
}

html[dir="rtl"] .float-right {
  float: left !important;
}

html[dir="rtl"] .modal-header .close {
  margin: -1rem auto -1rem -1rem;
}

html[dir="rtl"] .list-group {
  padding-right: 0;
}

html[dir="rtl"] .list-unstyled {
  padding-right: 0;
}

html[dir="rtl"] .alert-dismissible {
  padding-right: 1.25rem;
  padding-left: 4rem;
}

html[dir="rtl"] .alert-dismissible .close {
  left: 0;
  right: auto;
}

html[dir="rtl"] .custom-control {
  padding-right: 1.5rem;
  padding-left: 0;
}

html[dir="rtl"] .custom-control-label::before,
html[dir="rtl"] .custom-control-label::after {
  right: -1.5rem;
  left: auto;
}

html[dir="rtl"] .custom-select {
  padding: 0.375rem 0.75rem 0.375rem 1.75rem;
  background-position: left 0.75rem center;
}

html[dir="rtl"] .input-group > .input-group-prepend > .btn,
html[dir="rtl"] .input-group > .input-group-prepend > .input-group-text,
html[dir="rtl"] .input-group > .input-group-append:not(:last-child) > .btn,
html[dir="rtl"] .input-group > .input-group-append:not(:last-child) > .input-group-text,
html[dir="rtl"] .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
html[dir="rtl"] .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

html[dir="rtl"] .input-group > .input-group-append > .btn,
html[dir="rtl"] .input-group > .input-group-append > .input-group-text,
html[dir="rtl"] .input-group > .input-group-prepend:not(:first-child) > .btn,
html[dir="rtl"] .input-group > .input-group-prepend:not(:first-child) > .input-group-text,
html[dir="rtl"] .input-group > .input-group-prepend:first-child > .btn:not(:first-child),
html[dir="rtl"] .input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

/* تنسيقات للغة الإنجليزية (LTR) */
html[dir="ltr"] {
  font-family: 'Roboto', 'Cairo', sans-serif;
}

html[dir="ltr"] .form-control {
  text-align: left;
}

html[dir="ltr"] .input-group .input-group-text {
  border-radius: 0.25rem 0 0 0.25rem;
}

html[dir="ltr"] .input-group .form-control {
  border-radius: 0 0.25rem 0.25rem 0;
}

/* تنسيقات للتحول بين اللغات */
.language-transition {
  transition: all 0.3s ease;
}

/* تنسيقات لزر تبديل اللغة */
.language-toggle {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.language-toggle:hover {
  background-color: #e9ecef;
}

/* تنسيقات لقائمة اللغات */
.language-dropdown {
  min-width: 120px;
}

.language-option {
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.language-option:hover {
  background-color: #f8f9fa;
}

/* تنسيقات لصفحة تسجيل الدخول والتسجيل */
.auth-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: #fff;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo img {
  max-width: 150px;
  height: auto;
}

.auth-title {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.auth-form .form-control {
  padding: 0.75rem 1rem;
  height: auto;
}

.auth-form .btn-primary {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
}

.auth-footer a {
  color: #007bff;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* تنسيقات لحقول التسجيل الديناميكية */
.dynamic-fields {
  display: none;
}

.dynamic-fields.active {
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تنسيقات لرفع المستندات */
.document-upload {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.document-upload:hover {
  border-color: #adb5bd;
}

.document-upload.has-file {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
}

.document-upload .upload-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #6c757d;
}

.document-upload.has-file .upload-icon {
  color: #28a745;
}

.document-upload .file-name {
  margin-top: 1rem;
  font-weight: 600;
}

/* تنسيقات لحالة التقييم الائتماني */
.assessment-status {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.assessment-status.pending {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
}

.assessment-status.approved {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
}

.assessment-status.rejected {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
}

.assessment-status .status-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.assessment-status.pending .status-icon {
  color: #ffc107;
}

.assessment-status.approved .status-icon {
  color: #28a745;
}

.assessment-status.rejected .status-icon {
  color: #dc3545;
}

/* تنسيقات لنتيجة التقييم الائتماني */
.credit-score {
  text-align: center;
  margin-bottom: 2rem;
}

.credit-score .score-value {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.credit-score .score-label {
  font-size: 1.25rem;
  color: #6c757d;
}

.card-recommendation {
  text-align: center;
  margin-bottom: 2rem;
}

.card-recommendation .card-type {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-recommendation .credit-limit {
  font-size: 1.25rem;
  color: #28a745;
  font-weight: 600;
}

/* تنسيقات للتحول بين أنواع المستخدمين */
.user-type-selector {
  margin-bottom: 2rem;
}

.user-type-option {
  display: inline-block;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  margin-right: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 120px;
}

html[dir="rtl"] .user-type-option {
  margin-right: 0;
  margin-left: 1rem;
}

.user-type-option:hover {
  border-color: #007bff;
}

.user-type-option.active {
  border-color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

.user-type-option .option-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #6c757d;
}

.user-type-option.active .option-icon {
  color: #007bff;
}

.user-type-option .option-label {
  font-weight: 600;
}

/* تنسيقات للرسائل */
.alert {
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
  color: #155724;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  color: #721c24;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid #ffc107;
  color: #856404;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border: 1px solid #17a2b8;
  color: #0c5460;
}

/* تنسيقات للأزرار */
.btn {
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

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

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

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

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
  color: #212529;
}

.btn-info {
  background-color: #17a2b8;
  border-color: #17a2b8;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
}

.btn-light {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
  color: #212529;
}

.btn-light:hover {
  background-color: #e2e6ea;
  border-color: #dae0e5;
  color: #212529;
}

.btn-dark {
  background-color: #343a40;
  border-color: #343a40;
}

.btn-dark:hover {
  background-color: #23272b;
  border-color: #1d2124;
}

.btn-outline-primary {
  color: #007bff;
  border-color: #007bff;
}

.btn-outline-primary:hover {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}

.btn-link {
  color: #007bff;
  text-decoration: none;
}

.btn-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* تنسيقات للنماذج */
.form-control {
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* تنسيقات للتحميل */
.loading {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 0.25rem solid rgba(0, 123, 255, 0.3);
  border-radius: 50%;
  border-top-color: #007bff;
  animation: spin 1s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay .loading {
  width: 3rem;
  height: 3rem;
  border-width: 0.5rem;
}

.loading-overlay .loading-text {
  margin-left: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

html[dir="rtl"] .loading-overlay .loading-text {
  margin-left: 0;
  margin-right: 1rem;
}

/* تنسيقات للشاشات الصغيرة */
@media (max-width: 767.98px) {
  .auth-container {
    margin: 1rem;
    padding: 1.5rem;
  }

  .user-type-option {
    width: calc(50% - 0.5rem);
    margin-right: 0.5rem;
  }

  html[dir="rtl"] .user-type-option {
    margin-right: 0;
    margin-left: 0.5rem;
  }

  .user-type-option:nth-child(2n) {
    margin-right: 0;
  }

  html[dir="rtl"] .user-type-option:nth-child(2n) {
    margin-left: 0;
  }
}

/* تنسيقات للشاشات الصغيرة جدًا */
@media (max-width: 575.98px) {
  .user-type-option {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  html[dir="rtl"] .user-type-option {
    margin-right: 0;
    margin-left: 0;
  }
}
