/* Capmon Plugin Styles */

/* Loading spinner */
@keyframes capmon-spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

.capmon-spinner {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 3px solid transparent;
  border-top: 3px solid currentColor;
  border-radius: 50%;
  animation: capmon-spin 1s linear infinite;
  z-index: 1;
}

/* Interface container - light theme */
#capmon-interface {
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin-top: 12px !important;
}

/* Interface container - dark theme */
#capmon-interface.dark-theme {
  border: 1px solid #444 !important;
}

/* Select wrapper styles */
.capmon-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
  margin-bottom: 12px;
}

/* Custom select dropdown styles - light theme */
#capmon-interface .p-select-dropdown {
  width: 100% !important;
  padding: var(--p-select-padding-y, 8px) var(--p-select-padding-x, 12px) !important;
  border: 0 none !important;
  border-radius: 4px !important;
  background: var(--p-select-background) !important;
  color: var(--p-select-color, #333) !important;
  font-size: 1rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  outline: 0 none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 40px !important;
}

/* Select arrow styles */
.capmon-select-arrow {
  color: var(--p-select-color, #333);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.capmon-select-arrow svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

#capmon-interface .p-select-dropdown:focus {
  outline: none !important;
  border-color: #fd7e14 !important;
}

/* Custom select dropdown styles - dark theme */
#capmon-interface.dark-theme .p-select-dropdown {
  background: var(--p-select-background) !important;
  color: var(--p-select-color, #fff) !important;
}

/* Select arrow styles - dark theme */
#capmon-interface.dark-theme .capmon-select-arrow {
  color: var(--p-select-color, #fff);
}

#capmon-interface.dark-theme .capmon-select-arrow svg {
  fill: currentColor;
}

/* Dropdown options styles */
#capmon-interface .capmon-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--p-select-background);
  border: 1px solid var(--p-select-border-color, #ccc);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

#capmon-interface .capmon-dropdown-option {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--p-select-color, #333);
  font-size: 1rem;
  border-bottom: 1px solid var(--p-select-border-color, #eee);
  transition: background-color 0.2s ease;
}

#capmon-interface .capmon-dropdown-option:hover {
  background: var(--p-select-hover-background, #f5f5f5);
}

#capmon-interface .capmon-dropdown-option:last-child {
  border-bottom: none;
}

/* Dropdown options styles - dark theme */
#capmon-interface.dark-theme .capmon-dropdown-options {
  background: var(--p-select-background);
  border-color: var(--p-select-border-color, #555);
}

#capmon-interface.dark-theme .capmon-dropdown-option {
  color: var(--p-select-color, #fff);
  border-bottom-color: var(--p-select-border-color, #555);
}

#capmon-interface.dark-theme .capmon-dropdown-option:hover {
  background: var(--p-select-hover-background, #444);
}

/* Label styles - light theme */
#capmon-interface label {
  display: block !important;
  margin-bottom: 8px !important;
  font-weight: 500 !important;
  color: #333 !important;
  font-size: 1rem !important;
}

/* Label styles - dark theme */
#capmon-interface.dark-theme label {
  color: #fff !important;
}

/* Button styles */
#capmon-generate {
  color: var(--on-primary) !important;
  background-color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  padding: var(--input-y-padding) var(--input-x-padding) !important;
  font-weight: 700 !important;
  border-radius: var(--input-border-radius) !important;
  text-align: center !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  transition: all 0.2s ease-in-out !important;
  display: inline-block !important;
  min-width: 140px !important;
}

#capmon-generate:hover:not(:disabled) {
  background-color: var(--primary-600, #e55a00) !important;
  transform: translateY(-1px) !important;
}

#capmon-generate:active:not(:disabled) {
  transform: translateY(0) !important;
}

#capmon-generate:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
  position: relative !important;
}

/* Ollama API key field width limitation (disabled)
#ollama-api-key {
  max-width: 300px !important;
  width: auto !important;
  display: inline-block !important;
}
*/

/* Queue dashboard button styles */
a[href="/p/capmon/queue"] {
  display: inline-block !important;
  padding: 8px 16px !important;
  background-color: var(--primary, #fd7e14) !important;
  color: white !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  border: 1px solid var(--primary, #fd7e14) !important;
  transition: all 0.2s ease !important;
}

a[href="/p/capmon/queue"]:hover {
  background-color: var(--primary-600, #e55a00) !important;
  border-color: var(--primary-600, #e55a00) !important;
  transform: translateY(-1px) !important;
}

