/* 
 * Copyright (c) Vencode. All rights reserved.
 */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #323130;
  background-color: #faf9f8;
}

/* Container */
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
}

/* Header */
.header {
  background: #ffffff;
  color: #323130;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #edebe9;
}

.title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #323130;
}

.subtitle {
  font-size: 12px;
  color: #605e5c;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px;
}

.state-container {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Info Box */
.info-box {
  background: white;
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #edebe9;
}

.info-text {
  color: #605e5c;
  text-align: center;
  line-height: 1.5;
  font-size: 13px;
}

/* Buttons */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 20px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: none;
}

.button-primary {
  background: #0078d4;
  color: white;
  border-color: #0078d4;
}

.button-primary:hover {
  background: #106ebe;
  border-color: #106ebe;
}

.button-primary:active {
  background: #005a9e;
  border-color: #005a9e;
}

.button-secondary {
  background: white;
  color: #323130;
  border: 1px solid #8a8886;
}

.button-secondary:hover {
  background: #f3f2f1;
  border-color: #8a8886;
}

.button-icon {
  margin-right: 8px;
  font-size: 18px;
}

.button-text {
  font-size: 15px;
}

/* Loading State */
.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 30px auto 20px;
  border: 3px solid #edebe9;
  border-top: 3px solid #0078d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: #323130;
  margin-bottom: 4px;
}

.loading-subtext {
  text-align: center;
  font-size: 12px;
  color: #605e5c;
}

/* Analyzed Domain Box */
.analyzed-domain-box {
  background: white;
  border: 1px solid #edebe9;
  border-radius: 2px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analyzed-domain-label {
  font-size: 11px;
  color: #605e5c;
  font-weight: 400;
}

.analyzed-domain-value {
  font-size: 13px;
  color: #0078d4;
  font-weight: 600;
  word-break: break-all;
}

/* Risk Banner */
.risk-banner {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 2px;
  margin-bottom: 16px;
  border: 1px solid;
  transition: all 0.1s ease;
}

.risk-banner.low {
  background: #fff4ce;
  border-color: #f2c812;
  color: #323130;
}

.risk-banner.medium {
  background: #f2c812;
  border-color: #ff8c00;
  color: #323130;
}

.risk-banner.high {
  background: #fde7e9;
  border-color: #d83b01;
  color: #323130;
}

.risk-icon {
  font-size: 32px;
  margin-right: 12px;
  line-height: 1;
}

.risk-content {
  flex: 1;
}

.risk-level {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.risk-score {
  font-size: 13px;
  color: #605e5c;
}

/* Cards */
.card {
  background: white;
  border-radius: 2px;
  margin-bottom: 12px;
  border: 1px solid #edebe9;
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid #edebe9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf9f8;
}

.card.collapsible .card-header {
  cursor: pointer;
  user-select: none;
}

.card.collapsible .card-header:hover {
  background: #f3f2f1;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #323130;
}

.expand-icon {
  color: #605e5c;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

.card-body {
  padding: 16px;
}

/* Message Text */
.message-text {
  color: #323130;
  line-height: 1.5;
  font-size: 14px;
}

.warning-text {
  color: #c50f1f;
  font-weight: 400;
  margin-bottom: 12px;
  font-size: 13px;
}

/* Logistics Indicator */
.logistics-indicator {
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 12px;
  text-align: center;
  border: 1px solid;
}

.logistics-indicator.positive {
  background: #dff6dd;
  border-color: #92c353;
  color: #323130;
}

.logistics-indicator.negative {
  background: #fde7e9;
  border-color: #d83b01;
  color: #323130;
}

/* Details List */
.details-list {
  margin-top: 8px;
}

.detail-item {
  display: flex;
  margin-bottom: 8px;
  font-size: 13px;
}

.detail-label {
  font-weight: 600;
  color: #605e5c;
  margin-right: 8px;
  min-width: 80px;
}

.detail-value {
  color: #323130;
}

/* Suggestions List */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-item {
  background: #fff4ce;
  border: 1px solid #f2c812;
  border-radius: 2px;
  padding: 10px 12px;
}

.domain {
  color: #0078d4;
  font-weight: 400;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  background: #f3f2f1;
  border-radius: 2px;
  word-break: break-all;
}

.suggestion-domain {
  font-size: 14px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 4px;
}

.suggestion-reason {
  font-size: 12px;
  color: #605e5c;
  margin-bottom: 4px;
}

.suggestion-similarity {
  font-size: 11px;
  color: #8a8886;
}

/* Risks List */
.risks-list {
  list-style: none;
}

.risk-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #f3f2f1;
  border-left: 2px solid #0078d4;
  border-radius: 0;
  font-size: 13px;
  color: #323130;
}

.risk-item.positive {
  background: #dff6dd;
  border-left-color: #92c353;
}

/* Score Breakdown */
.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edebe9;
}

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

.score-label {
  font-size: 13px;
  color: #605e5c;
}

.score-value {
  font-size: 14px;
  font-weight: 600;
  color: #323130;
}

/* Actions */
.actions {
  margin-top: 16px;
}

/* Error State */
.error-box {
  background: white;
  border-radius: 2px;
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid #edebe9;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.error-title {
  font-size: 16px;
  font-weight: 600;
  color: #c50f1f;
  margin-bottom: 8px;
}

.error-text {
  font-size: 13px;
  color: #605e5c;
  line-height: 1.5;
}

/* Feedback Section */
.feedback-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.feedback-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #edebe9;
  border-radius: 2px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #323130;
  resize: vertical;
  margin-bottom: 12px;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

.feedback-textarea::placeholder {
  color: #8a8886;
}

.feedback-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feedback-char-count {
  font-size: 12px;
  color: #605e5c;
}

.feedback-submit-button {
  width: auto;
  padding: 8px 16px;
  min-width: 80px;
}

.feedback-success-message {
  text-align: center;
  padding: 16px;
  background: #dff6dd;
  border: 1px solid #92c353;
  border-radius: 2px;
  color: #323130;
  font-size: 14px;
}

.feedback-success-message p {
  margin: 0;
  font-weight: 500;
}

.feedback-error-message {
  text-align: center;
  padding: 16px;
  background: #fde7e9;
  border: 1px solid #d83b01;
  border-radius: 2px;
  color: #323130;
  font-size: 14px;
  margin-top: 12px;
}

.feedback-error-message p {
  margin: 0;
  font-weight: 500;
  color: #c50f1f;
}

/* Footer */
.footer {
  padding: 12px 16px;
  text-align: center;
  background: #faf9f8;
  border-top: 1px solid #edebe9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-text {
  font-size: 11px;
  color: #8a8886;
}

.footer-link {
  color: #0078d4;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.1s ease;
}

.footer-link:hover {
  color: #106ebe;
  text-decoration: underline;
}

.footer-logo {
  height: 20px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.1s ease;
}

.footer-logo:hover {
  opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 400px) {
  .header {
    padding: 12px;
  }

  .title {
    font-size: 18px;
  }

  .main-content {
    padding: 12px;
  }

  .risk-banner {
    padding: 12px;
  }

  .risk-icon {
    font-size: 28px;
    margin-right: 10px;
  }

  .risk-level {
    font-size: 15px;
  }
}