/* 🔔 v175.8: Push Modal Styles */

.tpush-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 20, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tpush-modal-overlay.tpush-open {
  opacity: 1;
  pointer-events: all;
}

.tpush-modal {
  background: linear-gradient(135deg, #ffffff 0%, #fef9e7 100%);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(201, 168, 76, 0.15);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tpush-modal-overlay.tpush-open .tpush-modal {
  transform: scale(1) translateY(0);
}

.tpush-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #1a3d2b 0%, #c9a84c 50%, #2d6a4f 100%);
  border-radius: 24px 24px 0 0;
}

/* Close Button */
.tpush-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #666;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.tpush-close:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  transform: rotate(90deg);
}

/* Icon */
.tpush-icon-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 8px auto 20px;
}

.tpush-icon {
  position: relative;
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #c9a84c 0%, #e8c96a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.4);
  z-index: 2;
  animation: tpushFloat 3s ease-in-out infinite;
}

.tpush-icon-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.3);
  z-index: 1;
  animation: tpushPulse 2s ease-out infinite;
}

@keyframes tpushFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes tpushPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Title */
.tpush-title {
  font-family: 'Amiri', 'Tajawal', serif;
  font-size: 24px;
  font-weight: 800;
  color: #1a3d2b;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.3;
}

.tpush-desc {
  font-size: 14px;
  color: #4a5d52;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* Options */
.tpush-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.tpush-option {
  display: block;
  cursor: pointer;
  position: relative;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(201, 168, 76, 0.2);
  border-radius: 12px;
  transition: all 0.2s;
}

.tpush-option:hover {
  border-color: rgba(201, 168, 76, 0.5);
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(2px);
}

.tpush-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tpush-option-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding-right: 30px;
}

.tpush-option-content::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid #c9a84c;
  border-radius: 6px;
  transition: all 0.2s;
}

.tpush-option input:checked ~ .tpush-option-content::after {
  background: #2d6a4f;
  border-color: #2d6a4f;
}

.tpush-option-content::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tpush-option input:checked ~ .tpush-option-content::before {
  transform: translateY(-50%) scale(1);
}

.tpush-option-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.tpush-option-text {
  flex: 1;
  text-align: right;
}

.tpush-option-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a3d2b;
  margin-bottom: 2px;
}

.tpush-option-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* Promise */
.tpush-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: rgba(82, 183, 136, 0.08);
  border-radius: 10px;
  border: 1px dashed rgba(82, 183, 136, 0.3);
}

.tpush-promise-item {
  font-size: 11.5px;
  color: #166534;
  font-weight: 600;
}

/* Actions */
.tpush-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpush-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tpush-btn-primary {
  background: linear-gradient(135deg, #2d6a4f 0%, #1a3d2b 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.35);
  border: 1.5px solid #c9a84c;
}

.tpush-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(45, 106, 79, 0.5);
}

.tpush-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.tpush-btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 1.5px solid #e5e7eb;
}

.tpush-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #374151;
}

.tpush-btn-icon {
  font-size: 18px;
}

/* Spinner */
.tpush-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: tpushSpin 0.8s linear infinite;
}

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

/* Status Messages */
.tpush-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.tpush-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.tpush-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .tpush-modal {
    max-width: 100%;
    padding: 24px 20px 20px;
    border-radius: 20px;
  }
  
  .tpush-title {
    font-size: 20px;
  }
  
  .tpush-desc {
    font-size: 13px;
  }
  
  .tpush-icon, .tpush-icon-wrap {
    width: 72px;
    height: 72px;
  }
  
  .tpush-icon {
    font-size: 36px;
  }
  
  .tpush-option {
    padding: 10px 12px;
  }
  
  .tpush-option-icon {
    font-size: 24px;
  }
  
  .tpush-option-title {
    font-size: 13px;
  }
  
  .tpush-option-desc {
    font-size: 11px;
  }
}

/* ===========================================
   🔔 Header Notification Button
   =========================================== */

.header-push-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
}

.header-push-btn:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.6);
  color: #e8c96a;
  transform: scale(1.05);
}

.header-push-btn.subscribed {
  background: rgba(82, 183, 136, 0.15);
  border-color: rgba(82, 183, 136, 0.5);
  color: #52b788;
}

.header-push-btn-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #c9a84c;
  border-radius: 50%;
  border: 2px solid #1a3d2b;
  animation: tpushPulse 2s ease-out infinite;
}

.header-push-btn.subscribed .header-push-btn-dot {
  background: #52b788;
}
