/* =========================================================
   AluminiumGlass
   User Reviews Module
   ========================================================= */

.reviews-page {
  min-height: calc(100vh - 70px);
  background: #f7f8fa;
  padding: 40px 16px 70px;
}

.reviews-container {
  width: min(1050px, 100%);
  margin: 0 auto;
}


/* Header */

.reviews-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.reviews-header-inner {
  width: min(1200px, 100%);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.reviews-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: #111827;
  text-decoration: none;
  font-weight: 800;
}

.reviews-logo {
  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;
  background: #111827;
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;
}

.reviews-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.reviews-nav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}

.reviews-nav a:hover {
  color: #111827;
}


/* Heading */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 30px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;

  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-heading h1 {
  margin: 0 0 8px;

  color: #111827;
  font-size: 34px;
  line-height: 1.2;
}

.page-heading p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}


/* Buttons */

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 10px 17px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  font-size: 14px;
  font-weight: 700;
  text-decoration: none;

  cursor: pointer;
  transition: .2s ease;
}

.primary-button {
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
}

.primary-button:hover {
  background: #1f2937;
}

.secondary-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.secondary-button:hover {
  background: #f3f4f6;
}


/* Stats */

.review-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}

.stat-card {
  min-height: 100px;
  padding: 20px;

  display: flex;
  align-items: center;
  gap: 15px;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.stat-icon {
  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: #f3f4f6;

  color: #111827;
  font-size: 20px;
}

.stat-card strong {
  display: block;
  margin-bottom: 3px;

  color: #111827;
  font-size: 24px;
}

.stat-card span:last-child {
  color: #6b7280;
  font-size: 13px;
}


/* Toolbar */

.reviews-toolbar {
  margin-bottom: 16px;
  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.reviews-toolbar h2 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 20px;
}

.reviews-toolbar p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-control span {
  color: #6b7280;
  font-size: 13px;
}

.filter-control select,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.filter-control select {
  width: auto;
  min-width: 160px;
  padding: 9px 11px;
}

.filter-control select:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #6b7280;
}


/* Review List */

.reviews-list {
  display: grid;
  gap: 14px;
}

.review-card {
  padding: 20px;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.review-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.business-info h3 {
  margin: 0 0 5px;
  color: #111827;
  font-size: 18px;
}

.business-info a {
  color: #111827;
  text-decoration: none;
}

.business-info a:hover {
  text-decoration: underline;
}

.review-date {
  color: #9ca3af;
  font-size: 12px;
}

.review-rating {
  margin: 13px 0;

  color: #d97706;
  font-size: 17px;
  letter-spacing: 1px;
}

.review-text {
  margin: 0;

  color: #4b5563;
  line-height: 1.7;
  white-space: pre-wrap;
}

.review-footer {
  margin-top: 18px;
  padding-top: 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  border-top: 1px solid #f0f0f0;
}

.review-status {
  display: inline-flex;
  align-items: center;

  padding: 5px 9px;
  border-radius: 999px;

  background: #f3f4f6;
  color: #4b5563;

  font-size: 12px;
  font-weight: 700;
}

.review-status.published {
  background: #ecfdf5;
  color: #047857;
}

.review-status.pending {
  background: #fffbeb;
  color: #b45309;
}

.review-status.rejected {
  background: #fef2f2;
  color: #b91c1c;
}


/* Loading */

.loading-state {
  padding: 50px 20px;
  text-align: center;
  color: #6b7280;
}

.loading-spinner {
  width: 28px;
  height: 28px;

  display: inline-block;

  border: 3px solid #e5e7eb;
  border-top-color: #374151;
  border-radius: 50%;

  animation: reviewSpin .8s linear infinite;
}

@keyframes reviewSpin {
  to {
    transform: rotate(360deg);
  }
}


/* Empty / Login / Error */

.reviews-panel,
.empty-state {
  padding: 55px 25px;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;

  text-align: center;
}

.empty-icon {
  width: 55px;
  height: 55px;

  margin: 0 auto 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #f3f4f6;

  color: #374151;
  font-size: 22px;
  font-weight: 800;
}

.reviews-panel h2,
.empty-state h3 {
  margin: 0 0 8px;
  color: #111827;
}

.reviews-panel p,
.empty-state p {
  max-width: 560px;
  margin: 0 auto 20px;

  color: #6b7280;
  line-height: 1.6;
}

.error-panel {
  border-color: #fecaca;
}


/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(17, 24, 39, .55);
}

.review-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.modal-header {
  padding: 20px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;

  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  color: #111827;
}

.modal-close {
  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 7px;

  background: #f3f4f6;
  color: #374151;

  font-size: 22px;
  cursor: pointer;
}

.modal-close:hover {
  background: #e5e7eb;
}

#reviewForm {
  padding: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;

  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.form-group select {
  padding: 11px;
}

.form-group textarea {
  display: block;
  padding: 12px;

  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #9ca3af;
}

.form-message {
  margin-bottom: 15px;
  padding: 11px 13px;

  border-radius: 7px;

  font-size: 14px;
}

.form-message.success {
  background: #ecfdf5;
  color: #047857;
}

.form-message.error {
  background: #fef2f2;
  color: #b91c1c;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding-top: 5px;
}


/* Footer */

.reviews-footer {
  padding: 28px 16px;

  border-top: 1px solid #e5e7eb;
  background: #ffffff;

  text-align: center;
}

.reviews-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.reviews-footer a {
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
}

.reviews-footer a:hover {
  color: #111827;
}

.reviews-footer p {
  margin: 0;
  color: #9ca3af;
  font-size: 12px;
}


/* Mobile */

@media (max-width: 700px) {

  .reviews-header-inner {
    min-height: auto;
    padding: 14px 16px;

    flex-direction: column;
    align-items: flex-start;
  }

  .reviews-nav {
    width: 100%;
    overflow-x: auto;
    gap: 15px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 28px;
  }

  .review-stats {
    grid-template-columns: 1fr;
  }

  .reviews-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-control {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-control select {
    width: 100%;
  }

  .review-card-header {
    flex-direction: column;
  }

  .review-footer {
    align-items: flex-start;
    flex-direction: column;
  }

}