/**
 * GoToTask — PWA "Add to Home Screen" CSS Styles
 * Responsive styling for PWA CTA sections, benefit cards, and iOS Safari guide modal.
 */

/* Landing Page PWA Section */
.gtt-pwa-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  color: #ffffff;
  padding: clamp(2.5rem, 5vw, 4.5rem) 1rem;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.gtt-pwa-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(129, 140, 248, 0.15), transparent 50%);
  pointer-events: none;
}

.gtt-pwa-container {
  max-width: min(1100px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.gtt-pwa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0e7ff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.gtt-pwa-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.gtt-pwa-hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #c7d2fe;
  line-height: 1.65;
  max-width: 44rem;
  margin-bottom: 2rem;
}

/* Benefits Grid */
.gtt-pwa-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.gtt-pwa-benefit-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.35rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gtt-pwa-benefit-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.gtt-pwa-benefit-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.gtt-pwa-benefit-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.gtt-pwa-benefit-card p {
  font-size: 0.9rem;
  color: #e0e7ff;
  line-height: 1.5;
  margin: 0;
}

/* Action Area */
.gtt-pwa-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
}

.gtt-pwa-btn-add {
  background: #6366f1;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.gtt-pwa-btn-add:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.gtt-pwa-btn-add:disabled {
  background: #475569;
  cursor: default;
  box-shadow: none;
  opacity: 0.8;
}

.gtt-pwa-action-note {
  font-size: 0.875rem;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* iOS Safari Instruction Modal */
.gtt-ios-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gtt-ios-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.gtt-ios-modal-card {
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  position: relative;
}

.gtt-ios-modal-backdrop.active .gtt-ios-modal-card {
  transform: translateY(0);
}

.gtt-ios-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gtt-ios-modal-header img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.gtt-ios-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 0.2rem 0;
  color: #0f172a;
}

.gtt-ios-modal-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.gtt-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gtt-ios-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.gtt-ios-step-num {
  width: 26px;
  height: 26px;
  background: #4f46e5;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gtt-ios-step-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.45;
}

.gtt-ios-step-text strong {
  color: #0f172a;
}

.gtt-ios-close-btn {
  width: 100%;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
}

.gtt-ios-close-btn:hover {
  background: #e2e8f0;
}

/* === PWA Section Mobile Responsive === */
@media (max-width: 767px) {
  .gtt-pwa-section {
    padding: 2rem 0.75rem;
  }
  .gtt-pwa-container {
    max-width: 100%;
  }
  .gtt-pwa-badge {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
    white-space: normal;
    word-break: break-word;
  }
  .gtt-pwa-hero-title {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
    line-height: 1.25;
  }
  .gtt-pwa-hero-lead {
    font-size: 0.9rem;
    max-width: 100%;
  }
  .gtt-pwa-action-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;
  }
  .gtt-pwa-btn-add {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }
  .gtt-pwa-action-note {
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
  }
  .gtt-pwa-benefits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
@media (max-width: 479px) {
  .gtt-pwa-hero-title {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }
  .gtt-pwa-btn-add {
    font-size: 0.875rem;
    padding: 0.7rem 1rem;
  }
}
