/* Exam Results Frontend Styles */

.exam-results-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.exam-results-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 24px 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.exam-select {
  width: 100%;
  padding: 5px 2px 7px 14px;
  font-size: 17px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.exam-select:hover {
  border-color: #9ca3af;
}

.exam-select:focus {
  outline: none;
  border-color: #ec9ba5;
  box-shadow: 0 0 0 3px rgba(236, 155, 165, 0.1);
}

.search-input-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
}

.symbol-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: all 0.2s;
}

.symbol-input:focus {
  outline: none;
  border-color: #ec9ba5;
  box-shadow: 0 0 0 3px rgba(236, 155, 165, 0.1);
}

.symbol-input::placeholder {
  color: #9ca3af;
}

.search-button {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #015baa9c 0%, #015baab8 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(236, 155, 165, 0.3);
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(236, 155, 165, 0.4);
}

.search-button:active {
  transform: translateY(0);
}

.result-display {
  margin-top: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.result-display h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.result-content {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  color: #374151;
}

.result-value {
  color: #1f2937;
  font-weight: 500;
}

.top-performers-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.trophy-icon {
  font-size: 28px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.ribbon-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.empty-state-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.top-performers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.performer-item {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.performer-item:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

.performer-rank {
  font-size: 18px;
  font-weight: 700;
  color: #6b7280;
  min-width: 40px;
}

.performer-rank.rank-1 {
  color: #f59e0b;
}

.performer-rank.rank-2 {
  color: #9ca3af;
}

.performer-rank.rank-3 {
  color: #cd7f32;
}

.performer-details {
  display: flex;
  flex: 1;
  margin-left: 16px;
}

.performer-symbol {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.performer-marks {
  font-size: 20px;
  font-weight: 700;
  color: #10b981;
}

.error-message {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
}

.success-message {
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #16a34a;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 968px) {
  .exam-results-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .scholarship-badge {
    margin-left: 30px;
  }
}

@media (max-width: 640px) {
  .exam-results-card {
    padding: 20px;
  }

  .section-title {
    font-size: 20px;
  }

  .performer-item {
    padding: 12px;
  }
  .scholarship-badge {
    margin-left: 8px;
  }
}

.search-button.active {
  background: linear-gradient(135deg, #015baaf5 0%, #015baa 100%);
  font-weight: 700;
  box-shadow: 0 3px 6px rgba(217, 72, 91, 0.4);
}
/* Custom Select Dropdown Styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
  color: #333;
}

.custom-select-trigger:hover {
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.selected-value {
  flex: 1;
  color: #333;
}

.custom-select-trigger .selected-value:empty::before {
  content: "Select an exam";
  color: #999;
}

.dropdown-arrow {
  margin-left: 10px;
  color: #666;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 350px;
  overflow: hidden;
}

.search-box-wrapper {
  padding: 12px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.exam-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.exam-search-input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
.scholarship-badge {
  margin-left: 80px;
}

.exam-options-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 280px;
  overflow-y: auto;
}

.exam-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-size: 14px;
}

.exam-option:hover {
  background: #f0f7ff;
  color: #4a90e2;
}

.exam-option.active {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

.no-results {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
  font-style: italic;
}

/* Scrollbar styling for options list */
.exam-options-list::-webkit-scrollbar {
  width: 8px;
}

.exam-options-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.exam-options-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.exam-options-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Hide the original select if it still exists */
.exam-select {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .custom-select-dropdown {
    max-height: 300px;
  }

  .exam-options-list {
    max-height: 230px;
  }
  .scholarship-badge {
    margin-left: 8px;
  }
}
/* Add this CSS to your frontend-style.css file */

.result-details-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.rank-badge {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: slideInLeft 0.5s ease-out;
}

.rank-number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.rank-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.result-details-content {
  flex: 1;
}

/* Animation for rank badge */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
  .result-details-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .rank-badge {
    margin-bottom: 15px;
  }

  .result-details-content {
    width: 100%;
  }
}

/* Special styling for top 3 ranks */
.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
}
