/* 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);
}

.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;
  /* position: relative; */ /* Removed - no longer needed */
}

.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;
  text-align: left;
}

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

/* 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 {
  list-style: none;
  padding: 0;
  margin: 0; /* Reset default ul margins */
  margin-top: 15px;
  width: 100%; /* Added */
  box-sizing: border-box; /* Added */
}

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

.verifier-list-item {
  display: flex;
  align-items: center;
  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;
  width: 100%; /* Added */
  box-sizing: border-box; /* Added */
}
.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 */
  margin-left: auto; /* Added to push button right */
}

.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;
}

/* Add dark mode color for display name */
.dark-mode .verifier-display-name {
  color: #3b9af8; /* Light blue for dark mode */
}

.verifier-network-results p {
  margin: 0px;
}

/* 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-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-network-results {
  margin-top: 20px;
}

.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); }

/* Styles for Typeahead/Autocomplete Suggestions */
.verifier-input-wrapper {
  position: relative; /* Required for absolute positioning of suggestions */
}

.verifier-suggestions-list {
  list-style: none;
  padding: 0;
  margin: 10px 0px 0px 0px;
  position: absolute;
  top: 100%; /* Position below the input */
  left: 0;
  right: 0;
  background-color: var(--navbar-bg); /* Match nearby elements */
  border: 2px solid var(--card-border);
  border-radius: 6px; /* Round bottom corners */
  max-height: 275px; /* Limit height and allow scroll */
  overflow: clip;
  z-index: 1000; /* Ensure it appears above other content */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.verifier-suggestion-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.verifier-suggestion-item.loading,
.verifier-suggestion-item.none {
  font-style: italic;
  color: var(--text-muted);
  cursor: default;
}

.verifier-suggestion-item:hover.loading,
.verifier-suggestion-item:hover.none {
  background-color: transparent; /* Don't highlight loading/none items */
  color: var(--text-muted);
}

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

.verifier-suggestion-text {
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent long text overflow */
  white-space: nowrap;
}

.verifier-suggestion-name {
  font-weight: bold;
  text-overflow: ellipsis;
  overflow: hidden;
}

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

/* Styles for List Verification */
.verifier-mode-toggle {
  display: flex;
  gap: 20px; /* Space between radio buttons */
  margin-bottom: 15px; /* Space below the toggle */
  margin-top: 15px;
  padding-bottom: 15px; /* More space */
  border-bottom: 1px solid var(--card-border); /* Separator line */
}

.verifier-mode-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px; /* Space between radio and text */
  color: var(--text);
}

.verifier-mode-toggle input[type="radio"] {
  cursor: pointer;
  /* Optional: style the radio button itself */
}

.verifier-list-select {
  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-list-select:hover,
.verifier-list-select:focus {
  border-color: var(--button-bg);
  background-color: var(--background); /* Match main app focus */
  outline: none;
}

.verifier-list-select:disabled {
  background-color: var(--button-disabled-bg, #cccccc);
  cursor: not-allowed;
  opacity: 0.7;
}

.verifier-status-box-progress p {
  margin-top: 5px; /* Space between main status and progress */
  margin-bottom: 0;
}

.verifier-bulk-progress {
  font-style: italic;
  font-size: 0.9em;
  color: var(--text-muted);
}

/* Styles for Verification Options (like Skip Duplicates checkbox) */
.verifier-options {
    margin-top: 10px; /* Space above the options */
    margin-bottom: 15px; /* Space below the options */
}

.verifier-options label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between checkbox and text */
    color: var(--text);
    font-size: 0.95em;
}

.verifier-options input[type="checkbox"] {
    cursor: pointer;
    margin: 0px;
}

/* Styles for Time-Based Revocation */
.verifier-time-revoke-wrapper {
    margin-top: 15px; /* Add some space above the time controls */
}

.verifier-time-revoke-wrapper p {
    margin-bottom: 10px; /* Space between description and radios */
    color: var(--text);
}

.verifier-time-range-selector {
    display: flex;
    flex-direction: column; /* Stack radio buttons vertically */
    gap: 10px; /* Space between radio buttons */
    margin-bottom: 15px; /* Space below the radio group */
}

.verifier-time-range-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between radio and text */
    color: var(--text);
}

.verifier-time-range-selector input[type="radio"] {
    cursor: pointer;
    margin: 0;
}

.verifier-time-revoke-wrapper .verifier-revoke-button {
     margin-top: 5px; /* Adjust if needed */
}