/* 
 * Single Area Page Widgets stylesheet
 * Path: assets/css/single-area-widgets.css
 * Max-visual excellence, custom dashboard styling.
 */

:root {
  --primary-orange: #E96E28;
  --primary-orange-dim: rgba(233, 110, 40, 0.06);
  --primary-orange-light: rgba(233, 110, 40, 0.12);
  --primary-orange-hover: #d25a17;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-light: rgba(0, 0, 0, 0.06);
  --card-bg-white: #ffffff;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-sm: 8px;
}

/* Tab contents and transitions */
.price-tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease-in-out;
}

.price-tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Investment Scoreboard Layout */
.investment-scoreboard-card {
  background: var(--card-bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  margin-bottom: 40px;
}

.score-main-flex {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .score-main-flex {
    flex-direction: column;
    text-align: center;
  }
}

/* Circular gauge simulation */
.score-gauge-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 60%, var(--primary-orange-dim) 61%, var(--primary-orange-light) 100%);
  border: 4px solid var(--primary-orange-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(233, 110, 40, 0.1);
  position: relative;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.score-gauge-ring:hover {
  transform: scale(1.05);
}

.score-gauge-ring .score-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-orange);
  line-height: 1;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.score-gauge-ring .score-den {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.score-meta-block {
  flex: 1;
}

.score-risk-pill {
  display: inline-block;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.score-risk-pill.low {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.score-risk-pill.medium {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.score-risk-pill.high {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.score-tags-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.score-tag-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-tag-pill i {
  font-size: 9px;
  color: var(--primary-orange);
}

/* Category Scores Section */
.score-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 30px;
  margin-bottom: 25px;
  border-top: 1px solid var(--border-light);
  padding-top: 25px;
}

@media (max-width: 768px) {
  .score-categories-grid {
    grid-template-columns: 1fr;
  }
}

.score-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 500;
}

.score-bar-label {
  color: var(--text-dark);
}

.score-bar-val {
  color: var(--primary-orange);
  font-weight: 600;
}

.score-bar-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-orange), #ff8c4b);
  border-radius: 10px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI Analysis text block */
.score-ai-analysis {
  background: var(--primary-orange-dim);
  border: 1px solid var(--primary-orange-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 15px;
}

.score-ai-analysis i {
  color: var(--primary-orange);
  font-size: 20px;
  margin-top: 3px;
  flex-shrink: 0;
}

.score-ai-text {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
  text-align: justify;
}

/* Development Graph Card */
.graph-widget-card {
  background: var(--card-bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  margin-bottom: 40px;
  position: relative;
}

.graph-canvas-container {
  position: relative;
  width: 100%;
  height: 320px;
}

/* Autocomplete suggestion UI in Area Search */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 5px;
}

.search-suggestions.active {
  display: block;
}

.search-suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: #f8fafc;
}

.search-suggestion-item .suggestion-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dark);
}

.search-suggestion-item .suggestion-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Jantri comparisons styling */
.nav-link.jantri-rate-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-sm) !important;
  margin-bottom: 10px;
  background: #ffffff !important;
  color: var(--text-dark) !important;
  transition: all 0.3s ease !important;
  text-align: left;
}

.nav-link.jantri-rate-tab:hover {
  border-color: var(--primary-orange) !important;
  background: var(--primary-orange-dim) !important;
}

.nav-link.jantri-rate-tab .price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-orange);
}

.jantri-rate-tab label {
  cursor: pointer;
  margin-bottom: 0;
  flex: 1;
}

.jantri-rate-tab label strong {
  display: block;
  font-size: 14px;
}

.jantri-rate-tab label .text {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.jantri-rate-tab label p {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

/* Compare table animation */
.table-style2 tbody tr {
  transition: background-color 0.2s ease;
}

.table-style2 tbody tr:hover {
  background-color: var(--primary-orange-dim) !important;
}

.table-style2 tbody td, .table-style2 tbody th {
  vertical-align: middle;
  padding: 15px 20px;
}

/* Custom Fields Panel */
.custom-fields-panel h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.custom-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

@media (max-width: 992px) {
  .custom-fields-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .custom-fields-grid {
    grid-template-columns: 1fr;
  }
}

.custom-field-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.custom-field-box:hover {
  border-color: var(--primary-orange);
  background: var(--primary-orange-dim);
  transform: translateY(-2px);
}

.custom-field-box i {
  font-size: 20px;
  color: var(--primary-orange);
  flex-shrink: 0;
}

.custom-field-meta {
  display: flex;
  flex-direction: column;
}

.custom-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-field-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 2px;
}

/* FAQs Accordion styling */
.faqs-panel h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: #f8fafc;
}

.faq-question i {
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open {
  border-color: var(--primary-orange);
}

.faq-item.open .faq-question {
  background: var(--primary-orange-dim);
  color: var(--primary-orange);
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
  color: var(--primary-orange);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.faq-answer p {
  padding: 16px 20px;
  margin: 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  text-align: justify;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  border-top: 1px solid #e2e8f0;
}
