/* Global Climate Solution - Main Styles */

/* Add Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
body {
  margin: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  transition: max-width 0.3s ease;
}

.container.expanded {
  max-width: 95%;
}

/* Top Navigation */
.top-nav {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid #4b5563;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Compliance Dropdown */
.compliance-dropdown {
  position: relative;
  display: inline-block;
}

.compliance-btn {
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.compliance-btn:hover {
  background: rgba(59, 130, 246, 1);
  transform: translateY(-1px);
}

/* Admin Dashboard Button */
.admin-dashboard-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.admin-dashboard-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1f2937;
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  border-radius: 6px;
  border: 1px solid #374151;
  z-index: 1000;
  overflow: hidden;
  margin-top: 4px;
}

.dropdown-content a {
  color: #d1d5db;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  transition: all 0.3s ease;
  border-bottom: 1px solid #374151;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: #374151;
  color: white;
}

.dropdown-content.show {
  display: block;
}

/* Subscribe Button */
.subscribe-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.subscribe-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

/* Subscription Modal */
.subscription-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.subscription-modal.show {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: 16px;
  padding: 30px;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #374151;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.modal-title {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin: 0 0 10px 0;
}

.modal-subtitle {
  color: #9ca3af;
  font-size: 16px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.pricing-card.featured {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.plan-name {
  font-size: 20px;
  font-weight: bold;
  color: white;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 24px;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 4px;
}

.plan-period {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 20px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.plan-features li {
  color: #d1d5db;
  padding: 6px 0;
  font-size: 14px;
}

.plan-features li:before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
  margin-right: 8px;
}

.plan-btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.plan-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.plan-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.plan-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid #374151;
}

.plan-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Quota Section */
.quota-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.quota-title {
  font-size: 18px;
  font-weight: bold;
  color: white;
  margin-bottom: 16px;
}

.quota-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #374151;
}

.quota-item:last-child {
  border-bottom: none;
}

.quota-label {
  color: #d1d5db;
  font-size: 14px;
}

.quota-value {
  color: #3b82f6;
  font-weight: bold;
  font-size: 14px;
}

/* Header Styles */
h1 {
  margin-bottom: 10px;
}

.description {
  font-size: 15px;
  color: #ccc;
  line-height: 1.6;
}

a {
  color: #4da6ff;
}

/* Button Styles */
.buttons {
  margin: 20px;
}

.buttons button {
  padding: 10px 20px;
  margin: 0 5px;
  font-weight: bold;
  cursor: pointer;
}

.login {
  background-color: #3366ff;
  color: white;
  border: none;
}

.register {
  background-color: #00cc66;
  color: white;
  border: none;
}

/* Submit Box */
.submit-box {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin-top: 30px;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.submit-box h2 {
  color: #e2e8f0;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-align: center;
}

/* Tab Buttons */
.tab-buttons {
  margin: 0 0 20px 0;
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.tab-buttons button {
  flex: 1;
  margin: 0;
  padding: 10px 16px;
  background: transparent;
  color: #94a3b8;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-buttons button:hover {
  color: white;
  background: rgba(59, 130, 246, 0.1);
}

.tab-buttons button.active {
  background: #3b82f6;
  color: white;
}

/* Info Icon Styles */
.tab-with-info {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.info-icon {
  font-size: 12px;
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Maintenance Tooltip */
.maintenance-tooltip {
  position: fixed;
  background: rgba(239, 68, 68, 0.95);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
  z-index: 10000;
  pointer-events: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  backdrop-filter: blur(8px);
  animation: tooltipFadeIn 0.2s ease-out;
}

.maintenance-tooltip::before {
  content: '🚧';
  margin-right: 8px;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Notification Animation */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Drop Zone */
.drop-zone {
  margin: 0 auto 20px auto;
  border: 2px dashed #475569;
  background: rgba(15, 23, 42, 0.4);
  padding: 32px 24px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-align: center;
}

.drop-zone:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
  color: #e2e8f0;
}

.drop-zone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drop-zone-icon {
  font-size: 32px;
  opacity: 0.7;
}

.drop-zone-text {
  font-size: 16px;
  font-weight: 500;
}

.drop-zone-subtext {
  font-size: 12px;
  opacity: 0.7;
}

/* Action Buttons */
.action-buttons {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons button {
  margin: 0;
  padding: 12px 20px;
  border: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  justify-content: center;
}

.action-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.example {
  background: #3b82f6;
  color: white;
}

.example:hover {
  background: #2563eb;
}

.clear {
  background: #ef4444;
  color: white;
}

.clear:hover {
  background: #dc2626;
}

.analyze {
  background: #10b981;
  color: white;
  font-weight: 600;
  padding: 14px 24px;
}

.analyze:hover {
  background: #059669;
}

/* Footer */
.footer {
  margin-top: 20px;
  font-size: 12px;
  color: #888;
}

/* Results Container */
.results-container {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  text-align: left;
  overflow-x: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.results-title {
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.results-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.results-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.view-map-btn {
  background: #6366f1;
  color: white;
}

.view-map-btn:hover {
  background: #4f46e5;
}

.download-btn {
  background: #f59e0b;
  color: white;
}

.download-btn:hover {
  background: #d97706;
}

.download-dropdown {
  position: relative;
  display: inline-block;
}

.download-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 180px;
  overflow: hidden;
}

.download-menu button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #ccc;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #444;
}

.download-menu button:last-child {
  border-bottom: none;
}

.download-menu button:hover {
  background-color: #3a3a3a;
  color: white;
}

/* Results Table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  font-size: 12px;
  min-width: 900px;
}

.results-table th,
.results-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #404040;
}

.results-table th {
  background-color: #3a3a3a;
  color: #ccc;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
}

.results-table td {
  color: #fff;
}

.results-table tr:hover {
  background-color: #333;
}

.results-table tr:nth-child(even) {
  background-color: #252525;
}

/* Badge Styles for API Response */
.risk-badge, .compliance-badge, .loss-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.risk-high, .loss-high {
  background-color: #dc2626;
  color: white;
}

.risk-medium {
  background-color: #f59e0b;
  color: white;
}

.risk-low, .loss-low {
  background-color: #10b981;
  color: white;
}

.compliance-compliant {
  background-color: #10b981;
  color: white;
}

.compliance-non_compliant {
  background-color: #dc2626;
  color: white;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 12px;
  color: #ccc;
}

.pagination-controls {
  display: flex;
  gap: 5px;
}

.pagination-controls button {
  padding: 4px 8px;
  background-color: #3a3a3a;
  color: #ccc;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.pagination-controls button:hover {
  background-color: #4a4a4a;
}

.pagination-controls button.active {
  background-color: #6366f1;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 15px;
    max-width: none;
  }
  
  .container.expanded {
    margin: 10px;
  }
  
  .results-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .results-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .results-table {
    font-size: 10px;
    min-width: 700px;
  }
  
  .results-table th,
  .results-table td {
    padding: 6px 8px;
  }
  
  .pagination {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
