

/* ---- متغیرهای CSS ---- */
:root {
  --primary-color: #156c5f;
  --primary-color-dark: #0e5a4e;
  --error-color: #e74c3c;
  --text-color: #333;
  --text-muted: #666;
  --bg-color: #ffffff;
  --bg-light: #f5f5f5;
  --bg-notification: #fff;
  --border-radius: 8px;
  --border-radius-large: 16px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-notification: 0 -2px 10px rgba(0, 0, 0, 0.1);
  --animation-speed: 0.3s;
}

/* ---- استایل‌های عمومی و صفحه آفلاین ---- */


.offline-page {
  background-color: var(--bg-light);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.offline-container {
  background: var(--bg-color);
  border-radius: var(--border-radius-large);
  padding: 30px;
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 400px;
}

.offline-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  color: var(--error-color);
}

.offline-container h1 {
  color: var(--text-color);
  margin: 0 0 20px 0;
  font-size: 22px;
}

.offline-container p {
  color: var(--text-muted);
  margin: 0 0 20px 0;
  line-height: 1.6;
}

.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}


.logo {
  width: 120px;
  height: auto;
  margin-bottom: 30px;
}

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

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

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

/* ---- استایل‌های نوتیفیکیشن ---- */
.pwa-notification {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background-color: var(--bg-notification);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-notification);
  overflow: hidden;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: slideIn var(--animation-speed) ease-out forwards;
  direction: rtl;
}

.pwa-notification.closing {
  animation: slideOut var(--animation-speed) ease-in forwards;
}

.pwa-notification-handle {
  width: 36px;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  margin: 8px auto;
}

.pwa-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px 16px;
}

.pwa-notification-title {
  font-weight: bold;
  font-size: 16px;
  margin: 0;
  color: var(--primary-color);
}

.pwa-notification-close {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-notification-body {
  padding: 0 16px 16px 16px;
  display: flex;
  align-items: center;
}

.pwa-notification-icon {
  width: 36px;
  height: 36px;
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.pwa-notification-content {
  flex: 1;
}

.pwa-notification-message {
  margin: 0 0 12px 0;
  line-height: 1.4;
  font-size: 14px;
  color: var(--text-color);
}

.pwa-notification-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pwa-notification-btn {
  padding: 8px 16px;
  border-radius: var(--border-radius);
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.pwa-notification-btn-primary {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

.pwa-notification-btn-primary:hover {
  background-color: var(--primary-color-dark);
  animation: subtle-pulse 0.4s ease-in-out;
}

.pwa-notification-btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-color);
}

.pwa-notification-btn-secondary:hover {
  background-color: #e8e8e8;
}

/* ---- رنگ‌های آیکون‌ها ---- */
.install-icon {
  fill: var(--primary-color);
}

.offline-icon {
  fill: var(--error-color);
}

/* ---- پاسخگویی رسپانسیو ---- */
@media (min-width: 768px) {
  .pwa-notification {
    bottom: 15px;
    right: 15px;
    left: auto;
    width: 320px;
    max-width: none;
    margin: 0;
    border-radius: 12px;
  }

  .pwa-notification-handle {
    display: none;
  }
}
