/* تنسيقات صفحة تسجيل خدمة الرسائل
--------------------------------------------------- */

/* === المتغيرات الأساسية === */
:root {
  --primary-color: #4a6cf7;
  --primary-dark: #24007c;
  --success-color: #28a745;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --animation-timing: 0.3s ease;
  --border-radius: 10px;
  --border-radius-sm: 8px;
  --border-radius-lg: 15px;
}

/* === التنسيقات العامة === */
body {
  font-family: 'Tajawal', sans-serif;
}

.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.opacity-15 { opacity: 0.15; }
.opacity-10 { opacity: 0.1; }
.z-1 { z-index: 1; }

/* === تنسيقات الأقسام === */
.section-subtitle {
  font-size: 0.85rem;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
  display: inline-block;
}

.section-title {
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

/* === قسم الترحيب (Hero Section) === */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow-lg);
  overflow: hidden;
  position: relative;
}

.hero-bg-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjEiLz48L3N2Zz4=');
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: inline-block;
  color: #fff;
  backdrop-filter: blur(10px);
  transition: var(--animation-timing);
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.animated-badge {
  animation: pulse 2s infinite;
}

.hero-floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0.5;
}

.floating-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  animation-duration: 6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.floating-icon-1 { top: 20%; left: 15%; animation-name: float1; }
.floating-icon-2 { top: 60%; left: 20%; animation-name: float2; animation-delay: 1s; }
.floating-icon-3 { top: 30%; right: 20%; animation-name: float3; animation-delay: 2s; }
.floating-icon-4 { top: 70%; right: 15%; animation-name: float4; animation-delay: 3s; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, 15px); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-15px, 10px); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-15px, -15px); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -10px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* === قسم الخطوات === */
.step-icon {
  width: 60px;
  height: 60px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0 auto 1rem;
}

.step-card {
  position: relative;
  overflow: hidden;
  transition: transform var(--animation-timing), box-shadow var(--animation-timing);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg) !important;
}

.step-number {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 0 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

/* === قسم المميزات === */
.feature-card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--box-shadow);
  transition: all var(--animation-timing);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #f0f5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* === نموذج التسجيل === */
.form-card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
}

/* === حقل رقم الهاتف (intl-tel-input) === */
.iti {
  width: 100%;
  direction: rtl; /* الحاوية يمين لليسار لتناسب العربية */
}

.iti input[type="tel"],
.iti input.form-control {
  direction: ltr !important; /* الحقل نفسه يسار لليمين لسهولة إدخال الأرقام */
  text-align: left !important;
  height: 48px !important;
  font-size: 1.15rem !important;
  padding-left: 90px !important;
  padding-right: 16px !important;
  border-radius: 8px !important;
}

/* ضبط ارتفاع الحقل مع input-group-lg */
.input-group-lg .iti input[type="tel"] {
  height: 54px !important;
  font-size: 1.25rem !important;
}

/* ضبط قائمة الدول لتظهر بشكل متناسق */
.iti__country-list {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  z-index: 9999;
}

.iti__country {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.iti__country:hover {
  background: #f3f3f3;
}

.iti__country-name {
  flex: 1;
  color: #222;
  font-size: 1rem;
  text-align: right;
  direction: rtl;
  white-space: normal;
  margin-right: 8px;
}



.country-list-backdrop {
  display: none !important;
}

@media (max-width: 380px) {
  .iti__country-list {
    max-height: 70vh !important;
    max-width: 100% !important;
    width: auto !important;
    font-size: 0.8rem !important;
  }
  
  .iti__country {
    padding: 6px 8px !important;
    min-height: 36px !important;
  }
  
  .iti__country-name {
  white-space: normal !important;
  word-break: break-word !important;
  font-size: 1rem !important;
  margin-right: 6px !important;
  text-align: right !important;
  line-height: 1.2 !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* === نافذة التحقق === */
.verification-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(37, 211, 102, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.verification-code-container {
  display: flex;
  direction: ltr;
  gap: 8px;
  justify-content: center;
}

.verification-input {
  width: 50px;
  height: 60px;
  font-size: 24px;
  font-weight: bold;
  border: 2px solid var(--border-color);
}

.verification-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(74, 108, 247, 0.25);
}

.verification-input:not(:placeholder-shown) {
  border-color: var(--primary-color);
}

/* === تأثير النجاح === */
.success-animation {
  margin: 20px auto;
}

.checkmark-circle {
  width: 100px;
  height: 100px;
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin-left: auto;
  margin-right: auto;
}

.checkmark-circle-bg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--success-color);
  position: absolute;
}

.checkmark {
  border-radius: 5px;
}

.checkmark.draw:after {
  animation-delay: 100ms;
  animation-duration: 1s;
  animation-timing-function: ease;
  animation-name: checkmark;
  transform: scaleX(-1) rotate(135deg);
  animation-fill-mode: forwards;
  opacity: 0;
  transform-origin: left top;
  border-right: 8px solid #fff;
  border-top: 8px solid #fff;
  content: '';
  height: 50px;
  position: absolute;
  width: 25px;
  top: 30px;
  left: 35px;
}

@keyframes checkmark {
  0% { height: 0; width: 0; opacity: 1; }
  20% { height: 0; width: 25px; opacity: 1; }
  40% { height: 50px; width: 25px; opacity: 1; }
  100% { height: 50px; width: 25px; opacity: 1; }
}

/* === تحسينات صفحة النجاح === */
.account-info .list-group-item {
  padding: 0.75rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.api-card {
  margin-left: -1px;
  margin-right: -1px;
}

/* === استجابة الشاشات الصغيرة === */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .floating-icon {
    display: none;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-badge {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .step-icon, .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  
  .verification-input {
    width: 45px;
    height: 50px;
    font-size: 22px;
  }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 576px) {
  /* تنسيقات رئيسية */
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.5rem;
  }

  .hero-badges {
    gap: 8px;
  }
  
  /* تقليل الهوامش */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .card {
    border-radius: var(--border-radius-sm);
  }
  
  .card-body {
    padding: 1rem 0.75rem;
  }
  
  .row {
    margin-left: -5px;
    margin-right: -5px;
  }
  
  .col, .col-sm-12, .col-md-6, [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  /* تصغير أحجام عناصر الإدخال */
  .input-group-lg > .form-control,
  .input-group-lg > .input-group-text,
  .form-control-lg,
  .form-select-lg {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    height: auto;
  }
  
  .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
  }
  
  small {
    font-size: 0.75rem;
  }
  
  /* تحسين عناصر القائمة على الشاشات الصغيرة */
  .iti__selected-flag {
    margin-left: 0 !important;
    margin-right: 8px !important;
    padding: 0 8px 0 10px;
  }
  
  .iti__country-name {
  white-space: normal !important;
  word-break: break-word !important;
  font-size: 1rem !important;
  margin-right: 6px !important;
  text-align: right !important;
  line-height: 1.2 !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

  .iti__dial-code {
  margin-left: 8px !important;
  margin-right: 0 !important;
  font-weight: bold;
  font-size: 0.95rem !important;

    font-size: 0.8rem;
  }
  
  /* تحسين صفحة النجاح */
  .account-info .list-group-item {
    padding: 0.5rem 0.3rem;
    font-size: 0.9rem;
  }
  
  .list-group-item {
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .api-key-container {
    margin: 0 -5px;
  }
  
  .token-field {
    font-size: 10px !important;
    padding: 0.4rem;
    letter-spacing: -0.3px;
  }
  
  .btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
  }
  
  h4, h5 {
    font-size: 1.1rem;
  }
  
  .mt-5 {
    margin-top: 2rem !important;
  }
  
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
}
}