/* ============================================================
   شمس حلب - Shams Halab
   Component Styles - Cards, Buttons, Badges, Forms
   ============================================================ */

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  transition: all var(--transition-base);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 48px;
  min-width: 48px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
  background: var(--solar-amber-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover:not(:disabled) {
  background: #0284c7;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover:not(:disabled) {
  background: #128c7e;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fef9c3;
  color: #a16207;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-amber {
  background: #fef3c7;
  color: #b45309;
}

/* Alert Banner */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.alert-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-clean {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.alert-clean .alert-icon {
  background: #ffffff;
  color: #22c55e;
}

.alert-light {
  background: #fef9c3;
  border-color: #fde047;
  color: #a16207;
}

.alert-light .alert-icon {
  background: #ffffff;
  color: #eab308;
}

.alert-storm {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.alert-storm .alert-icon {
  background: #ffffff;
  color: #ef4444;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--foreground);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: var(--text-base);
  background: var(--background);
  color: var(--foreground);
  transition: border-color var(--transition-fast);
  min-height: 48px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Gauge */
.gauge {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.gauge-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--solar-amber) var(--gauge-value, 0%),
    #e2e8f0 var(--gauge-value, 0%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-solar 2s ease-in-out infinite;
}

.gauge-inner {
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}

.gauge-unit {
  font-size: var(--text-xl);
  color: var(--muted-foreground);
}

@keyframes pulse-solar {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(245, 158, 11, 0);
  }
}

/* Stat Card */
.stat-card {
  text-align: center;
  padding: var(--space-6);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.stat-icon-amber {
  background: #fef3c7;
  color: var(--solar-amber);
}

.stat-icon-green {
  background: #dcfce7;
  color: var(--solar-clean);
}

.stat-icon-sky {
  background: #e0f2fe;
  color: var(--solar-sky);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-base);
  color: var(--muted-foreground);
}

/* Savings Calculator */
.calculator-shell {
  background: linear-gradient(135deg, #fff 0%, #fff8eb 100%);
  border: 1px solid #e9edf5;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-6);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.result-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  padding: var(--space-4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.result-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.result-label {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  margin-bottom: 4px;
}

.result-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--foreground);
}

.result-sub {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--solar-amber) 0%, var(--solar-amber-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.navbar-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--foreground);
}

.navbar-subtitle {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.navbar-nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.navbar-nav a:hover {
  color: var(--primary);
}

/* Footer */
.footer {
  background: var(--solar-dark);
  color: var(--muted-foreground);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-title {
  color: white;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--solar-amber);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-6);
  border-top: 1px solid #334155;
}

@media (max-width: 768px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .calculator-shell {
    padding: var(--space-4);
  }

  .result-value {
    font-size: var(--text-base);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-brand {
    justify-content: center;
  }
  
  .footer-link {
    justify-content: center;
  }
}

/* Table */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--foreground);
  background: var(--muted);
}

.table tr:hover {
  background: var(--muted);
}

/* Chart Container */
.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

/* Partnership Section */
.partnership {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  padding: var(--space-12) 0;
}

.partnership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.partnership-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
}

.partnership-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--solar-amber);
}

.partnership-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.partnership-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .partnership-grid {
    grid-template-columns: 1fr;
  }
}
