/* استایل‌های مودال دریافت برنامه - با قابلیت کشیدن */
.getapp-modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
}

.getapp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10000;
}

.getapp-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.getapp-modal {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 85%;
  background: white;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 10001;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
  touch-action: pan-y;
}

.getapp-modal.active {
  transform: translateY(0);
  pointer-events: all;
}

.getapp-modal.dragging {
  transition: none;
}

.getapp-modal-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  min-height: 60px;
  background: white;
  border-radius: 20px 20px 0 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.getapp-modal-header:active {
  cursor: grabbing;
}

.getapp-drag-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.getapp-modal-header:hover .getapp-drag-handle {
  background: #aaa;
}

.getapp-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: auto;
}

.getapp-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.getapp-header-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0 1rem;
}

.getapp-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.getapp-header-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.getapp-header-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.getapp-body-wrapper {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.getapp-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f8f9fa;
  -webkit-overflow-scrolling: touch;
}

/* استایل دکمه دریافت برنامه */
#getAppBtn {
    display: flex !important;
}

/* مخفی کردن دکمه دریافت برنامه وقتی PWA نصب شده */
.pwa-installed #getAppBtn {
    display: none !important;
}

/* بخش اطلاعات برنامه */
.getapp-info-section {
  display: flex;
  align-items: center;
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  gap: 1rem;
}

.getapp-icon-large {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  flex-shrink: 0;
}

.getapp-details {
  flex: 1;
  min-width: 0;
}

.getapp-name {
  margin: 0 0 0.5rem 0;
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.getapp-description {
  margin: 0 0 0.8rem 0;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.getapp-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.getapp-rating i {
  color: #ffd700;
  font-size: 14px;
}

.getapp-rating span {
  font-size: 14px;
  margin-right: 0.5rem;
  font-weight: 600;
  color: #333;
}

/* گزینه‌های دانلود */
.getapp-download-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.getapp-download-option-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 1rem;
  text-align: right;
  touch-action: manipulation;
}

.getapp-download-option-btn:hover {
  border-color: #6a11cb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 17, 203, 0.15);
}

.getapp-download-option-btn:active {
  transform: translateY(0);
}

.getapp-store-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.getapp-store-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.getapp-store-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.2rem;
}

.getapp-store-description {
  font-size: 13px;
  color: #666;
}

.getapp-download-option-btn i:last-child {
  color: #999;
  font-size: 14px;
  flex-shrink: 0;
}

/* ویژگی‌های برنامه */
.getapp-features {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.getapp-features h4 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.getapp-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.getapp-features li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 14px;
  color: #555;
}

.getapp-features li:last-child {
  margin-bottom: 0;
}

.getapp-features li i {
  color: #4caf50;
  font-size: 14px;
  flex-shrink: 0;
}

/* استایل‌های مربوط به کشیدن */
.getapp-modal.drag-up {
  transform: translateY(0);
}

.getapp-modal.drag-down {
  transform: translateY(calc(100% - 100px));
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
  .getapp-modal-header {
    padding: 1rem;
  }
  
  .getapp-modal-body {
    padding: 1rem;
  }
  
  .getapp-info-section {
    padding: 1.2rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .getapp-icon-large {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  
  .getapp-download-option-btn {
    padding: 0.9rem 1rem;
  }
  
  .getapp-features {
    padding: 1.2rem;
  }
}

@media (max-width: 480px) {
  .getapp-modal {
    height: 90%;
  }
  
  .getapp-info-section {
    padding: 1rem;
  }
  
  .getapp-icon-large {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
  
  .getapp-download-option-btn {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .getapp-store-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .getapp-store-name {
    font-size: 15px;
  }
  
  .getapp-store-description {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .getapp-modal-header {
    padding: 0.8rem;
    min-height: 55px;
  }
  
  .getapp-header-title {
    font-size: 16px;
  }
  
  .getapp-modal-body {
    padding: 0.8rem;
  }
  
  .getapp-info-section {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .getapp-icon-large {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .getapp-name {
    font-size: 16px;
  }
  
  .getapp-description {
    font-size: 13px;
  }
  
  .getapp-download-option-btn {
    padding: 0.7rem;
    gap: 0.7rem;
  }
  
  .getapp-store-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .getapp-store-name {
    font-size: 14px;
  }
  
  .getapp-features {
    padding: 1rem;
  }
  
  .getapp-features li {
    font-size: 13px;
  }
}

/* حالت landscape در موبایل */
@media (max-height: 500px) and (orientation: landscape) {
  .getapp-modal {
    height: 95%;
  }
  
  .getapp-modal-body {
    padding: 1rem;
  }
  
  .getapp-info-section {
    padding: 1rem;
    flex-direction: row;
    text-align: right;
  }
  
  .getapp-download-option-btn {
    padding: 0.7rem 1rem;
  }
}

/* انیمیشن‌های نوتیفیکیشن */
@keyframes getapp-notification-slide-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes getapp-notification-slide-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
    visibility: hidden;
  }
}

.getapp-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 10002;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: getapp-notification-slide-in 0.3s, getapp-notification-slide-out 0.3s 2.7s forwards;
  font-family: 'Vazirmatn', sans-serif;
  text-align: center;
  max-width: 90%;
}

.getapp-notification.success {
  background: #2ecc71;
  color: white;
}

.getapp-notification.error {
  background: #e74c3c;
  color: white;
}

.getapp-notification.info {
  background: #3498db;
  color: white;
}

.getapp-notification.warning {
  background: #f39c12;
  color: white;
}
