/* Amit Aharoni aa5471 */

body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

header {
  background-color: #0d6efd;
  color: white;
  padding: 10px 0;
  text-align: center;
}

.container {
  width: 80%;
  margin: auto;
  overflow: hidden;
}

.review-card {
  background: white;
  margin: 20px 0;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
}

.review-card h2 {
  margin-top: 0;
  color: #0d6efd;
}

.review-card p {
  line-height: 1.6;
}

.review-card .rating {
  color: #ffc107;
  font-size: 1.2em;
}

footer {
  background-color: #343a40;
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: auto;
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.list-group-item {
  transition: background-color 0.3s ease;
}

.list-group-item:hover {
  background-color: #f0f8ff;
}

/* Autocomplete Styling */
.ui-autocomplete {
  max-height: 300px;
  overflow-y: auto;
  z-index: 1050 !important; /* Higher z-index to prevent bootstrap overlay issues */
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
}

.ui-autocomplete .ui-menu-item {
  padding: 0;
  border: none;
}

.ui-autocomplete .ui-menu-item-wrapper {
  padding: 8px 15px;
  border: none;
  cursor: pointer;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active {
  background-color: #f0f8ff;
  color: #0d6efd;
  border: none;
  margin: 0;
}

.ui-autocomplete-category {
  padding: 8px 15px;
  font-weight: bold;
  color: #0d6efd;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  margin-top: 5px;
}

/* For better mobile experience */
@media (max-width: 768px) {
  .ui-autocomplete {
    width: calc(100% - 30px) !important;
    left: 15px !important;
  }
}

.cover-image-container {
  position: relative;
  overflow: hidden;
}

.cover-image-container img {
  transition: transform 0.3s ease;
}

.cover-image-container:hover img {
  transform: scale(1.02);
}

.review-item {
  border: 1px solid #e0e0e0;
  transition: box-shadow 0.3s ease;
}

.review-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stars-display {
  font-size: 1.2rem;
  padding: 5px 0;
}

.rating-select {
  font-weight: 500;
}

.rating-select option[value="5"] {
  background-color: rgba(40, 167, 69, 0.1);
}

.rating-select option[value="4"] {
  background-color: rgba(0, 123, 255, 0.1);
}

.rating-select option[value="3"] {
  background-color: rgba(255, 193, 7, 0.1);
}

.rating-select option[value="2"] {
  background-color: rgba(255, 153, 0, 0.1);
}

.rating-select option[value="1"] {
  background-color: rgba(220, 53, 69, 0.1);
}

.remove-review-btn {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.remove-review-btn:hover {
  opacity: 1;
}

#add-review-btn {
  transition: all 0.3s ease;
}

#add-review-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Make the Edit button more subtle on view page */
#edit-professor-btn {
  /* bottom: 10px; */
  /* right: 10px; */
  opacity: 0.6;
  transition: opacity 0.3s ease;
  color: gray;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

#edit-professor-btn:hover {
  opacity: 1;
  background-color: #f8f9fa;
}

/* Apply white-space: pre-line to preserve line breaks in text */
.preserve-linebreaks {
  white-space: pre-line;
}

/* Specific styles for professor descriptions */
.professor-description {
  white-space: pre-line;
  line-height: 1.6;
}

/* Specific styles for review comments */
.review-comment {
  white-space: pre-line;
  line-height: 1.5;
}

/* Highlight for search matches */
.highlight {
  background-color: #ffd54f;
  font-weight: bold;
  padding: 1px 3px;
  border-radius: 2px;
  color: #000;
}

/* Make sure highlights work properly in list items */
.list-group-item .highlight {
  display: inline-block;
}
