@import url("./_variables.css");
@import url("./_typography.css");
@import url("./_bootstrap_override.css");
@import url("./_utility.css");
@import url("./_reset.css");
@import url("./_animation.css");
@import url("./components/index.css");

body {
  min-height: 100vh;
  direction: rtl;
  font-family: var(--font-family-frutiger-arabic);
  color: var(--color-gray-700);
}

/* Content Styles */

/* Section Styles */

.dashboard-section {
  border-radius: 8px;
  padding: 5px 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 5px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stats Grid */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Stat Card Styles */

.stat-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  position: relative;
  height: 60px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  right: 0;
  width: 6px;
  border-radius: 0 4px 4px 0;
  height: 100%;
}

.stat-card.purple::before {
  background-color: #5e35b1;
}

.stat-card.orange::before {
  background-color: #ff9800;
}

.stat-card.green::before {
  background-color: #4caf50;
}

.stat-card.teal::before {
  background-color: #009688;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.stat-label {
  font-size: 14px;
  color: #666;
  text-align: right;
  line-height: 1.2;
  width: 100%;
}

/* Chart box custom styles */

.chart-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0;
  gap: 15px;
  width: 100%;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  justify-content: center;
  margin-right: 0;
  text-align: right;
  font-size: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
  font-size: 10px;
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-label {
  font-size: 10px;
  color: #666;
}

.legend-value {
  font-size: 10px;
  font-weight: bold;
  color: #333;
  margin-right: 3px;
}

/* Responsive styles */

@media screen and (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Section Headers */

.section-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Average Degrees Page Styles */

.average-degrees-wrapper {
  margin: 10px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.page-header {
  margin-bottom: 20px;
  text-align: right;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.arrow-icon {
  margin-right: 5px;
  transform: rotate(180deg);
}

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

.diplomas-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.diploma-card {
  flex: 1;
  background-color: #fff;
  border: 1px solid #e6f3ef;
  border-radius: 10px;
  padding: 10px 15px;
  position: relative;
}

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

.details-button {
  background-color: #20c997;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.details-button:hover {
  background-color: #19a37e;
}

.arrow-right-icon {
  margin-left: 5px;
  font-size: 14px;
}

.diploma-score {
  color: #20c997;
  font-weight: bold;
  font-size: 16px;
}

.diploma-content {
  text-align: right;
}

.diploma-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.diploma-description {
  font-size: 12px;
  color: #777;
}

.chart-section {
  flex: 1;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background-color: #fff;
  padding: 15px;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-align: right;
  margin-bottom: 15px;
}

.chart-container {
  position: relative;
  display: flex;
}

.chart-scales {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  color: #666;
  padding-right: 10px;
}

.scale-item {
  font-size: 10px;
  color: #666;
  line-height: 1;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  position: absolute;
  bottom: 30px;
  left: 40px;
  right: 10px;
  gap: 5px;
  overflow-x: auto;
  height: calc(100% - 30px);
}

.chart-bar {
  width: 30px;
  border-radius: 5px;
  transition: opacity 0.2s;
}

.chart-bar:hover {
  opacity: 0.8;
}

@media screen and (max-width: 900px) {
  .diplomas-row {
    flex-direction: column;
  }

  .chart-section {
    width: 100%;
  }
}

.ceo-dashboard-header {
  background-color: #212529;
  color: white;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 4px 4px 0 0;
}

.page-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #212529;
  margin-bottom: 20px;
  text-align: right;
}

/* New Styles for Average Degrees Without Bootstrap */

.average-degrees-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.content-container {
  padding: 20px;
}

.page-header {
  margin-bottom: 25px;
  text-align: right;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.arrow-icon {
  margin-right: 10px;
  font-size: 20px;
  transform: rotate(180deg);
}

.diplomas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.diploma-card {
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #e5f2ed;
  background-color: #ffffff;
}

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

.details-button {
  background-color: #20c997;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.details-button:hover {
  background-color: #19a37e;
}

.arrow-right-icon {
  margin-right: 5px;
  font-size: 14px;
  transform: rotate(180deg);
}

.diploma-score {
  color: #20c997;
  font-weight: bold;
  font-size: 18px;
}

.diploma-content {
  text-align: right;
}

.diploma-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.diploma-description {
  font-size: 12px;
  color: #777;
}

.chart-card {
  grid-column: span 3;
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
}

.chart-header {
  text-align: right;
  margin-bottom: 15px;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.chart-container {
  position: relative;
  display: flex;
  direction: ltr;
}

.chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50px;
  padding-right: 10px;
  height: 250px;
}

.scale-value {
  font-size: 12px;
  color: #666;
}

.chart-visual {
  display: flex;
  align-items: flex-end;
  flex-grow: 1;
  height: 250px;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 30px;
}

.chart-bar {
  min-width: 30px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.chart-bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.chart-labels {
  position: absolute;
  bottom: 0;
  left: 50px;
  right: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  direction: rtl;
}

.label-item {
  min-width: 30px;
  font-size: 8px;
  color: #666;
  text-align: center;
  transform: rotate(-45deg);
  transform-origin: top left;
  white-space: nowrap;
  margin-right: 5px;
}

@media screen and (max-width: 1000px) {
  .diplomas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-card {
    grid-column: span 2;
  }
}

@media screen and (max-width: 600px) {
  .diplomas-grid {
    grid-template-columns: 1fr;
  }

  .chart-card {
    grid-column: span 1;
  }
}

/* Dashboard Styles for Average Degrees Page */

.dashboard-container {
  max-width: 100%;
  direction: rtl;
}

.dashboard-header {
  margin-bottom: 25px;
}

.dashboard-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  align-items: stretch;
}

.diploma-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 300px;
  min-height: 150px;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
  padding: 20px 20px 0;
  display: flex;
  justify-content: flex-end;
}

.score {
  color: #20c997;
  font-weight: bold;
  font-size: 20px;
}

.card-content {
  padding: 15px 20px;
  text-align: right;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.course-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}

.course-subtitle {
  font-size: 14px;
  color: #777;
  margin: 0;
}

.card-footer {
  padding: 15px 20px 20px;
  display: flex;
  justify-content: flex-end;
}

.details-button {
  background-color: #20c997;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  width: 100%;
  justify-content: center;
}

.details-button:hover {
  background-color: #19a37e;
}

.arrow-icon {
  font-size: 14px;
}

.chart-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 20px;
  grid-column: 1 / -1;
  margin-top: 15px;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: right;
  margin: 0 0 20px 0;
}

.chart-container {
  display: flex;
  position: relative;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 50px;
  font-size: 12px;
  color: #666;
}

.chart-content {
  flex: 1;
  position: relative;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 100%;
  padding-bottom: 30px;
  /* Space for labels */
  overflow-x: auto;
}

.chart-bar {
  width: 35px;
  background-color: #20c997;
  border-radius: 4px 4px 0 0;
  position: relative;
  min-width: 35px;
}

.chart-bar.bar-purple {
  background-color: #6f42c1;
}

.bar-label {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  transform-origin: left;
}

/* Responsive adjustments */

@media screen and (max-width: 1200px) {
  .cards-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media screen and (max-width: 992px) {
  .cards-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .chart-card {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
  }

  .chart-card {
    grid-column: 1;
  }
}

@media screen and (max-width: 576px) {
  .dashboard-container {
    padding: 10px;
  }

  .card-header,
  .card-content,
  .card-footer {
    padding: 10px 15px;
  }
}

/* Average Specific Course Page Styles */

.diplomas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.diploma-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

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

.diploma-score {
  color: #0ea5e9;
  font-weight: bold;
  font-size: 18px;
}

.diploma-content {
  flex: 1;
}

.diploma-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-align: right;
}

.diploma-mini-chart {
  height: 50px;
  margin-bottom: 10px;
}

.score-indicators {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.high-score {
  color: #4ade80;
  display: flex;
  align-items: center;
}

.high-score::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4ade80;
  margin-left: 4px;
}

.low-score {
  color: #f87171;
  display: flex;
  align-items: center;
}

.low-score::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f87171;
  margin-left: 4px;
}

.chart-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  grid-column: span 3;
  margin-top: 10px;
}

.chart-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filter-item {
  background-color: #f3f4f6;
  color: #374151;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.filter-item.active {
  background-color: #0ea5e9;
  color: white;
}

.filter-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #4b5563;
}

.legend-item.high::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4ade80;
  margin-left: 4px;
}

.legend-item.low::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #fcd34d;
  margin-left: 4px;
}

.chart-container {
  position: relative;
}

@media screen and (max-width: 1200px) {
  .diplomas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-card {
    grid-column: span 2;
  }
}

@media screen and (max-width: 768px) {
  .diplomas-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .chart-card {
    grid-column: span 1;
    padding: 15px;
  }

  .dashboard-container {
    padding: 15px;
  }

  .page-header {
    margin-bottom: 15px;
  }

  .page-title {
    font-size: 20px;
    flex-direction: column;
    gap: 10px;
  }

  .diploma-card {
    padding: 12px;
  }

  .diploma-title {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .diploma-mini-chart {
    height: 40px;
    margin-bottom: 8px;
  }

  .score-indicators {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .high-score,
  .low-score {
    font-size: 11px;
  }

  .chart-title {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .chart-container {
    height: 300px;
  }
}

@media screen and (max-width: 480px) {
  .dashboard-container {
    padding: 10px;
  }

  .page-header {
    margin-bottom: 10px;
  }

  .page-title {
    font-size: 18px;
    gap: 8px;
  }

  .arrow-icon {
    font-size: 16px;
  }

  .diplomas-grid {
    gap: 10px;
  }

  .diploma-card {
    padding: 10px;
    border-radius: 6px;
  }

  .diploma-title {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.3;
  }

  .diploma-mini-chart {
    height: 35px;
    margin-bottom: 6px;
  }

  .score-indicators {
    gap: 3px;
  }

  .high-score,
  .low-score {
    font-size: 10px;
  }

  .high-score::before,
  .low-score::before {
    width: 6px;
    height: 6px;
    margin-left: 3px;
  }

  .chart-card {
    padding: 12px;
    margin-top: 8px;
  }

  .chart-title {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .chart-container {
    height: 250px;
  }
}

@media screen and (max-width: 360px) {
  .dashboard-container {
    padding: 8px;
  }

  .page-title {
    font-size: 16px;
    gap: 6px;
  }

  .arrow-icon {
    font-size: 14px;
  }

  .diplomas-grid {
    gap: 8px;
  }

  .diploma-card {
    padding: 8px;
    border-radius: 4px;
  }

  .diploma-title {
    font-size: 12px;
    margin-bottom: 5px;
    line-height: 1.2;
  }

  .diploma-mini-chart {
    height: 30px;
    margin-bottom: 5px;
  }

  .score-indicators {
    gap: 2px;
  }

  .high-score,
  .low-score {
    font-size: 9px;
  }

  .high-score::before,
  .low-score::before {
    width: 5px;
    height: 5px;
    margin-left: 2px;
  }

  .chart-card {
    padding: 10px;
    margin-top: 6px;
  }

  .chart-title {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .chart-container {
    height: 220px;
  }
}
