@import 'variables.css';
@import 'sidebar.css';

:root {
  --primary-color: #004d4d; /* Adjust this to match your theme's primary color */
  --secondary-color: #006666; /* Adjust this to match your theme's secondary color */
  --bg-color: #e6f2f2; /* Lighter shade of the primary color */
  --text-color: #333;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --chart-card-bg: linear-gradient(135deg, #ffffff 0%, #f0f7f7 100%);
  --content-bg: #f0f7f7; /* Very light shade of the primary color */
}

body {
  font-size: 0.875rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-y: hidden; /* Prevent vertical scrolling */
}

.navbar {
  background: linear-gradient(
    180deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05);
  min-height: 70px; /* Increased header height */
}

@media (max-width: 767.98px) {
  main {
    height: 100vh;
    padding-top: 0;
  }
}

.form-control-dark {
  color: var(--text-color);
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

main {
  padding-top: 4px;
  overflow-y: auto;
  height: 100vh;
  position: relative;
  background: linear-gradient(
      135deg,
      rgba(255, 233, 186, 0.95) 0%,
      rgba(255, 228, 196, 0.95) 100%
    ),
    repeating-linear-gradient(
      45deg,
      var(--primary-color) 0px,
      var(--primary-color) 1px,
      transparent 1px,
      transparent 10px
    ),
    repeating-linear-gradient(
      -45deg,
      var(--secondary-color) 0px,
      var(--secondary-color) 1px,
      transparent 1px,
      transparent 10px
    );
  background-attachment: fixed;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(255, 223, 186, 0.15) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(255, 228, 196, 0.15) 0%,
      transparent 20%
    );
  pointer-events: none;
}

.content-area {
  position: relative;
  z-index: 1;
}

.card {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-5px);
}

.info-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 248, 248, 0.9) 100%
  );
  text-align: center; /* Center all text in info cards */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.info-card .card-body {
  padding: 0.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.info-card .card-title {
  font-size: 0.8rem;
  margin-bottom: 0.1rem;
}

.info-card .card-text {
  font-size: 1.2rem;
}

.chart-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(240, 247, 247, 0.9) 100%
  );
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  height: 225px; /* Ensure all chart cards have the same height */
}

.chart-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 150px;
  padding: 0.5rem;
}

.chart-card .card-title {
  font-size: 18px;
  font-weight: bold;
  color: #263238;
  margin-bottom: 0.5rem;
  text-align: center;
}

#salesDistributionChart,
#salesByFormChart,
#monthlySalesChart {
  flex-grow: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.5rem;
  padding: 1rem;
}

footer {
  background-color: var(--card-bg);
  color: #333;
  padding: 1rem 0;
  margin-top: 2rem;
  box-shadow: 0 -2px 5px 0 rgba(0, 0, 0, 0.05);
}

/* Adjustments for info cards */
.card .card-body.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.card .card-body.py-2 h3 {
  font-size: 1.5rem;
}

/* Add styles for trend indicators */
.trend-indicator {
  display: inline-block;
  margin-right: 0.25rem;
}

.trend-indicator.up::before {
  content: '▲';
  color: var(--bs-success);
}

.trend-indicator.down::before {
  content: '▼';
  color: var(--bs-danger);
}

/* Ensure chart containers have sufficient height */
#salesDistributionChart,
#salesByFormChart,
#monthlySalesChart {
  min-height: 300px;
}

.user-profile {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile img {
  border: 2px solid white;
}

/* Header styles */
.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

.navbar-nav .nav-link {
  padding-right: 0.5rem;
  font-size: 1rem; /* Slightly increased font size */
}

.navbar-nav img {
  border: 2px solid white;
}

/* New styles for dropdown positioning */

.navbar-nav .dropdown {
  position: relative;
}

/* Updated styles for dropdown positioning and appearance */
.navbar-nav .dropdown-menu {
  position: absolute;
  top: calc(50% + 40px);
  right: 0;
  margin-top: 0;
  background-color: rgba(
    255,
    255,
    255,
    0.7
  ); /* Semi-transparent white background */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari support */
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.navbar-nav .dropdown-menu .dropdown-item {
  color: var(--primary-color); /* Use the primary color for text */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-nav .dropdown-menu .dropdown-item:focus {
  background-color: rgba(0, 77, 77, 0.1);
  color: var(--secondary-color); /* Use the secondary color for text on hover */
}

.navbar-nav .dropdown-menu .dropdown-divider {
  border-top-color: rgba(0, 77, 77, 0.1);
}

/* Add this new style for the main content area */
.content-area {
  position: relative;
  z-index: 1;
}

#salesByTypeChart {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Add these new styles for the filter icon */
.filter-container {
  position: relative;
}

.filter-icon-button {
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgb(255, 255, 255);
  color: #ffffff;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-icon-button:hover {
  transform: scale(1.05);
}

.filter-icon-button:focus {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-icon-button i {
  display: block;
  transition: transform 0.3s ease;
}

.filter-dropdown {
  min-width: 200px;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--primary-color);
  color: white !important;
}

.btn-light.filter-clear {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.btn-light.filter-clear:hover {
  background-color: #c82333;
  border-color: #bd2130;
  color: #fff;
}

/* Theme color for apply button */
.btn-primary.filter-apply {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.btn-primary.filter-apply:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.select-container .btn-group {
  height: 2rem;
}

.select-container .btn-group > .btn:hover {
  background-color: var(--primary-color);
}

.multiselect-container .multiselect-all {
  padding: 5px 0 0 0 !important;
}
