/* Mobil Helsedata PWA Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.version-badge {
  position: absolute;
  top: 10px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.app-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.app-header p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Main Content */
.main-content {
  padding: 1.5rem;
}

/* Login Section */
.login-section {
  margin-bottom: 2rem;
}

.login-card {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.login-card h2 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.login-card p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* User Section */
.user-section {
  margin-bottom: 2rem;
}

.user-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-info h3 {
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.user-info p {
  color: #64748b;
  margin: 0;
}

.user-email {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Welcome Section */
.welcome-section {
  margin-bottom: 2rem;
}

.welcome-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.welcome-card h2 {
  color: #1e293b;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.welcome-card p {
  color: #64748b;
  line-height: 1.6;
}

/* Permissions Section */
.permissions-section {
  margin-bottom: 2rem;
}

.permission-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.permission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.permission-header h3 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
}

.permission-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-indicator.pending {
  background: #f59e0b;
}

.status-indicator.granted {
  background: #10b981;
}

.status-indicator.denied {
  background: #ef4444;
}

.status-text {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.permission-card p {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.permission-btn {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.permission-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.permission-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.permission-btn:active {
  transform: translateY(0);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  color: #1e293b;
  font-size: 1.2rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: #f1f5f9;
}

.modal-body {
  padding: 1.5rem;
}

.data-categories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category h4 {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.data-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.data-option:hover {
  background-color: #f8fafc;
}

.data-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.data-option span {
  color: #374151;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.btn-primary {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Data Summary */
.data-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.data-summary h3 {
  color: #1e293b;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.summary-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.summary-card h4 {
  color: #374151;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.summary-card p {
  color: #64748b;
  font-size: 0.85rem;
}

/* Install Prompt - removed for now */

/* Responsive Design */
@media (max-width: 480px) {
  .app-container {
    box-shadow: none;
  }
  
  .app-header {
    padding: 1.5rem 1rem;
  }
  
  .app-header h1 {
    font-size: 1.5rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* Animation for status changes */
@keyframes statusChange {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.status-indicator.granted,
.status-indicator.denied {
  animation: statusChange 0.3s ease;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
