/* frontend-cred-blue/src/components/Verifier/Verifier.css */

/* General container */
.verifier-container {
  font-family: "articulat-cf", sans-serif;
  max-width: 450px; /* Adjust as needed */
  margin: 20px auto;
  padding: 20px;
  color: var(--text);
  background-color: var(--background);
}

.verifier-container h1,
.verifier-container h2 {
  color: var(--button-bg); /* Match heading color */
  text-align: left;
  margin-bottom: 15px;
}

.verifier-container h1 {
  font-size: 2em; /* Adjust */
}
.verifier-intro-container {
  margin-bottom: 20px;
}

/* Apply consistent styles ONLY to h2 elements within verifier sections */
.verifier-section h2 {
  margin-top: 0;
}

.verifier-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 10px;
}

.verifier-list {
  margin-top: 10px;
}

.verifier-user-info {
  font-size: 0.9em;
  color: var(--text-muted, var(--text));
  margin: 0; /* Remove default paragraph margin */
}

/* Buttons */
.verifier-sign-out-button,
.verifier-submit-button,
.verifier-action-button,
.verifier-revoke-button {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 6px;
  padding: 8px 15px; /* Slightly smaller padding */
  font-weight: 700;
  font-size: 0.9em;
  margin: 0px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.verifier-sign-out-button:hover,
.verifier-submit-button:hover,
.verifier-action-button:hover,
.verifier-revoke-button:hover {
  background: var(--button-hover-bg, #0056b3); /* Use main hover color */
}

.verifier-sign-out-button:disabled,
.verifier-submit-button:disabled,
.verifier-action-button:disabled,
.verifier-revoke-button:disabled {
  background-color: var(--button-disabled-bg, #cccccc); /* Add disabled style */
  cursor: not-allowed;
  opacity: 0.7;
}

/* Form Styles */
.verifier-section {
  background: var(--navbar-bg);
  border: 5px solid var(--card-border); /* Match alt-card border */
  border-radius: 12px; /* Match alt-card radius */
  box-shadow: none; /* Match alt-card shadow */
  padding: 40px 30px; /* Keep increased padding or adjust if alt-card is different */
  margin: 30px auto; /* Match alt-card margin */
  max-width: 95%; /* Match alt-card max-width */
  /* margin-bottom: 20px; */ /* Remove specific margin-bottom */
}

.verifier-input-container {
  position: relative; /* Needed for autocomplete positioning */
  max-width: 400px;
  border: none; /* Remove any potential border */
  outline: none; /* Remove outline on focus */
  padding: 0; /* Remove padding if any was added */
  margin: 0; /* Remove margin if any was added */
}

.verifier-form-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* Allow wrapping */
  padding: 0px;
  border: 0px;
}

.verifier-input-field {
  flex-grow: 1; /* Take available space */
  border: 2px solid var(--card-border);
  border-radius: 6px;
  padding: 9px;
  font-size: 1em;
  background-color: var(--navbar-bg);
  color: var(--text);
  transition: all 0.3s ease;
  font-family: inherit; /* Use main font */
  min-width: 200px; /* Ensure minimum width */
  margin: 0px;
}

.verifier-input-field:hover,
.verifier-input-field:focus {
  border-color: var(--button-bg);
  background-color: var(--background); /* Match main app focus */
  outline: none;
}

/* Autocomplete Styles */
.verifier-suggestions-list {
  position: absolute;
  top: 100%; /* Position below input */
  left: 0;
  right: 0;
  background-color: var(--navbar-bg);
  border: 1px solid var(--card-border);
  border-top: none; /* Avoid double border */
  border-radius: 0 0 6px 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.verifier-suggestion-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--card-border);
}
.verifier-suggestion-item:last-child {
  border-bottom: none;
}

.verifier-suggestion-item:hover {
  background-color: var(--background); /* Use main background for hover */
}

.verifier-suggestion-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.verifier-suggestion-text {
  display: flex;
  flex-direction: column;
}

.verifier-suggestion-display-name {
  font-weight: bold;
  color: var(--text);
}

.verifier-suggestion-handle {
  font-size: 0.9em;
  color: var(--text-muted, var(--text));
}

/* Status Box */
.verifier-status-box {
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  margin-bottom: 15px;
  text-align: center;
  border: 1px solid transparent; /* Base border */
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.verifier-status-box-success {
  background-color: var(--success-bg, #d4edda);
  color: var(--success-text, #155724);
  border-color: var(--success-border, #c3e6cb);
}
.verifier-status-box-error {
  background-color: var(--error-bg, #f8d7da);
  color: var(--error-text, #721c24);
  border-color: var(--error-border, #f5c6cb);
}
.verifier-status-box .verifier-intent-link { /* Renamed class */
  color: var(--success-text, #155724);
  font-weight: bold;
  text-decoration: underline;
}

.verifier-status-box p {
  margin:
0px;
}

/* Dark Mode Status Box Styles */
.dark-mode .verifier-status-box-success {
  background-color: var(--success-bg-dark, #1a3a24); /* Example dark variable */
  color: var(--success-text-dark, #a3e9a4);
  border-color: var(--success-border-dark, #2a5a34);
}
.dark-mode .verifier-status-box-error {
  background-color: var(--error-bg-dark, #4d1f24); /* Example dark variable */
  color: var(--error-text-dark, #f5c6cb);
  border-color: var(--error-border-dark, #721c24);
}
.dark-mode .verifier-status-box .verifier-intent-link {
  color: var(--success-text-dark, #a3e9a4);
}

.verifier-list-header h2 {
  margin: 0;
  padding: 0;
  border-bottom: none; /* Explicitly remove border here */
}

.verifier-list {
  margin-top: 15px;
}

.verifier-list,
.verifier-verifier-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.verifier-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align items to top */
  background-color: var(--navbar-bg); /* Match form background */
  padding: 15px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap; /* Allow actions to wrap */
  gap: 10px;
}
.verifier-list-item-content {
  flex-grow: 1;
}
.verifier-list-item-handle {
  font-size: 0.9em;
  color: var(--text-muted, var(--text));
  margin: 2px 0;
}
.verifier-list-item-date {
  font-size: 0.8em;
  color: var(--text-muted, var(--text));
  margin-top: 5px;
}

.verifier-list-item-actions {
  flex-shrink: 0; /* Prevent button shrinking */
}

.verifier-list-item-invalid {
  border-left: 5px solid var(--warning-border, orange); /* Highlight invalid items */
}

/* New styles for verification list profile links */
.verifier-profile-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 5px;
}

.verifier-profile-link:hover {
  text-decoration: underline;
}

.verifier-display-name {
  font-weight: bold;
  font-size: 1.05em;
  margin-right: 5px;
}

/* Validity status indicators */
.verifier-validity-status {
  display: inline-block;
  font-size: 0.9em;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 5px;
}

.verifier-list {
  margin-top: 15px;
}

.verifier-validity-status.valid {
  background-color: var(--success-bg, rgba(0, 128, 0, 0.1));
  color: var(--success-text, green);
}

.verifier-validity-status.invalid {
  background-color: var(--error-bg, rgba(255, 0, 0, 0.1));
  color: var(--error-text, red);
}

.verifier-validity-status.checking {
  background-color: var(--warning-bg, rgba(255, 165, 0, 0.1));
  color: var(--warning-text, orange);
}

/* Dark mode compatibility */
.dark-mode .verifier-validity-status.valid {
  background-color: var(--success-bg-dark, rgba(0, 128, 0, 0.3));
  color: var(--success-text-dark, #a3e9a4);
}

.dark-mode .verifier-validity-status.invalid {
  background-color: var(--error-bg-dark, rgba(255, 0, 0, 0.2));
  color: var(--error-text-dark, #f5c6cb);
}

.dark-mode .verifier-validity-status.checking {
  background-color: var(--warning-bg-dark, rgba(255, 165, 0, 0.2));
  color: var(--warning-text-dark, #ffe4b5);
}

/* Remove the now-unused validity warning box styles */
.verifier-validity-warning {
  display: none;
}

/* Media query for mobile optimization */
@media (max-width: 480px) {
  .verifier-list-item {
    flex-direction: column;
  }
  
  .verifier-list-item-content {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .verifier-list-item-actions {
    align-self: flex-end;
  }
}

/* Network Verifications */
.verifier-check-network-button {
  font-size: .9em;
  margin: 0px;
  margin-top: 16.4px;
}

.verifier-action-button.verifier-refresh-button {
  margin: 0px;
}

.verifier-network-status {
  font-style: italic;
  color: var(--text-muted, var(--text));
  margin: 10px 0;
}
.verifier-network-results {
  margin-top: 0px;
}
.verifier-network-results .verifier-verifier-list {
  margin-bottom: 15px; /* Space between lists */
}

.verifier-additional-context p {
  margin-top: 0px;
}

.verifier-additional-context {
  font-size: 0.9em;
  color: var(--text-muted, var(--text));
  margin-top: 15px;
  border-top: 1px dashed var(--card-border);
  padding-top: 17px;
}
.verifier-share-stats-link {
  display: inline-block;
  margin-top: 15px;
  font-size: 0.9em;
  font-weight: bold;
}

.verifier-official-verifier-note {
  font-size: 0.9em;
  margin: 5px 0;
  padding-left: 5px; /* Indent slightly */
}

.verifier-verified-status { color: var(--success-text, green); }
.verifier-not-verified-status { color: var(--text-muted, grey); }
.verifier-error-status { color: var(--error-text, red); }
.verifier-checking-status, .verifier-idle-status { color: var(--text-muted, grey); } 