/**
 * MyGP Survey Application - Styles
 * Author: Arman Azij
 * Description: Custom styles for MyGP survey application
 */

/* ============================================
   CSS VARIABLES & THEME COLORS
   ============================================ */
:root {
  --primary-color: #00b0f0;
  --gp-blue: #00b0f0;
  --bcl-green: #00a651;
  --secondary-color: #ff6b35;
  --dark-color: #2c3e50;
  --light-bg: #f8f9fa;
  --gradient: linear-gradient(135deg, #00b0f0 0%, #0088cc 100%);
  --bcl-gradient: linear-gradient(135deg, #00a651 0%, #00b0f0 100%);
}

/* ============================================
   GLOBAL RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "SolaimanLipi", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 20px 0;
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.glass-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 769px) {
  .glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  }
}

/* ============================================
   HEADER SECTION
   ============================================ */
.header-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #b0f3d1 0%, #d5f4ff 100%);
  border-radius: 20px;
  color: rgb(0, 0, 0);
  font-weight: bold;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo-left {
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

.header-logo-right {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}

.header-content {
  flex: 1;
  padding: 0 20px;
}

.header-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ============================================
   NAVIGATION TABS
   ============================================ */
.nav-tabs {
  border-bottom: 3px solid #e0e0e0;
  background: white;
  padding: 10px 10px 0;
}

.nav-tabs .nav-link {
  color: #333;
  background: #f5f5f5;
  font-weight: 600;
  padding: 12px 25px;
  border: none;
  border-radius: 10px 10px 0 0;
  margin-right: 5px;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #00b0f0 0%, #0088cc 100%);
  color: white;
  border: none;
}

.nav-tabs .nav-link:hover {
  background: rgba(0, 176, 240, 0.2);
  transform: translateY(-2px);
  color: #00b0f0;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control,
.form-select {
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 176, 240, 0.25);
}

/* ============================================
   RADIO BUTTON STYLE
   ============================================ */
.radio-button-group {
  display: flex;
  gap: 15px;
}

.radio-button-group input[type="radio"] {
  display: none;
}

.radio-button-group label {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  background: white;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.radio-button-group label::before {
  content: "✓";
  font-size: 1.3rem;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-right: -5px;
}

.radio-button-group input[type="radio"]:checked + label {
  background: var(--gradient);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 176, 240, 0.3);
}

.radio-button-group input[type="radio"]:checked + label::before {
  opacity: 1;
}

.radio-button-group label:hover {
  border-color: var(--primary-color);
  background: rgba(0, 176, 240, 0.05);
  transform: translateY(-2px);
}

.radio-button-group input[type="radio"]:checked + label:hover {
  background: linear-gradient(135deg, #00b0f0 0%, #0088cc 100%);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, #00b0f0 0%, #0088cc 100%);
  border: none;
  border-radius: 10px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 176, 240, 0.3);
  background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

/* ============================================
   STATISTICS CARDS
   ============================================ */
.stat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 5px solid var(--gp-blue);
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 176, 240, 0.1) 0%,
    rgba(0, 136, 204, 0.1) 100%
  );
}

.stat-card-content {
  flex: 1;
  text-align: left;
}

.stat-card-content small {
  display: block;
  color: #6c757d;
  font-weight: 600;
  margin-top: 3px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-card p {
  margin: 0;
}

/* ============================================
   PROFESSION CARDS
   ============================================ */
.profession-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

@media (min-width: 769px) {
  .profession-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
}

.profession-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.profession-header {
  background: var(--gradient);
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  margin: -20px -20px 20px -20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profession-header h4 {
  margin: 0;
}

.view-report-icon {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.view-report-icon:hover {
  transform: scale(1.2);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
  height: 25px;
  border-radius: 15px;
  background: #f0f0f0;
  overflow: visible;
}

.progress-bar {
  border-radius: 15px;
  background: var(--gradient);
  position: relative;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   PERCENTAGE CIRCLE
   ============================================ */
.percentage-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--gp-blue) 0deg,
    var(--bcl-green) 120deg,
    #ffd93d 240deg,
    #6bcf7f 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  position: relative;
}

.percentage-circle::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  background: white;
  border-radius: 50%;
}

.percentage-text {
  position: relative;
  z-index: 1;
  font-weight: bold;
  font-size: 1.2rem;
}

/* ============================================
   BADGES & ANIMATIONS
   ============================================ */
.reason-badge {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 20px;
  margin: 5px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
  position: relative;
  height: 300px;
  margin: 20px 0;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
}

.custom-toast {
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  background: #f8f9fa;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

.footer a {
  color: #00b0f0;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #0088cc;
  text-decoration: underline;
}

/* ============================================
   LOADER STYLES
   ============================================ */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loader-overlay.show {
  display: flex;
}

.loader-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #00b0f0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loader-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.loader-subtext {
  color: #666;
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */
@media (max-width: 768px) {
  .stat-card {
    margin-bottom: 15px;
    padding: 15px;
    gap: 15px;
  }

  .stat-card-icon {
    width: 50px;
    height: 50px;
  }

  .stat-card-icon i {
    font-size: 1.5rem !important;
  }

  .stat-number {
    font-size: 2rem !important;
  }

  .stat-card-content p {
    font-size: 0.75rem !important;
  }

  .stat-card-content small {
    font-size: 0.7rem !important;
  }

  .header-section {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 15px 10px;
    margin-bottom: 20px;
    gap: 10px;
  }

  .header-logo-left {
    width: 80px;
    margin-bottom: 0;
  }

  .header-logo-right {
    width: 50px;
    margin-bottom: 0;
  }

  .header-content {
    flex: 1;
    min-width: 100%;
    padding: 10px 0 0;
    order: 3;
  }

  .header-content h1 {
    font-size: 1.3rem;
    margin-bottom: 5px;
  }

  .header-content .lead {
    font-size: 0.85rem;
  }

  .glass-card {
    padding: 15px;
  }

  .nav-tabs {
    padding: 5px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs .nav-link {
    font-size: 0.85rem;
    padding: 10px 15px;
    display: inline-block;
  }

  .profession-card {
    padding: 15px;
  }

  .profession-header {
    flex-direction: row;
    padding: 15px;
  }

  .profession-header h4 {
    font-size: 1.1rem;
  }

  .percentage-circle {
    width: 80px;
    height: 80px;
  }

  .percentage-circle::before {
    width: 60px;
    height: 60px;
  }

  .percentage-text {
    font-size: 1rem;
  }

  .main-container {
    padding: 0 10px;
  }

  body {
    padding: 10px 0;
  }

  .radio-button-group {
    flex-direction: row;
    gap: 10px;
  }

  .radio-button-group label {
    padding: 10px 15px;
    font-size: 0.95rem;
  }

  .table-responsive {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .chart-container {
    height: 250px;
  }

  .modal-dialog {
    margin: 10px;
  }

  .table {
    font-size: 0.85rem;
  }

  .form-label {
    font-size: 0.9rem;
  }

  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 10px;
  }

  .btn-primary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}
