/* Modern Vocation Selector Styles */
.vocation-selector {
  width: 100%;
  max-width: 100%;
  font-family: 'Trebuchet MS', sans-serif;
}

.selected-vocations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 20px;
  padding: 8px;
  background-color: #333;
  border-radius: 8px;
  border: 2px solid #444;
  transition: border-color 0.3s ease;
}

.selected-vocations:focus-within {
  border-color: #1DB954;
}

.selected-vocations:empty {
  padding: 20px 8px;
  border-style: dashed;
  border-color: #555;
}

.selected-vocations:empty::before {
  content: "Selected vocations will appear here";
  color: #888;
  font-style: italic;
  font-size: 14px;
}

.vocation-tag {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #1DB954, #1ed760);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(29, 185, 84, 0.3);
  animation: tagSlideIn 0.3s ease;
  transition: all 0.2s ease;
}

.vocation-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(29, 185, 84, 0.4);
}

.vocation-tag:nth-child(2n) {
  background: linear-gradient(135deg, #5c46e3, #6c5ce7);
  box-shadow: 0 2px 4px rgba(92, 70, 227, 0.3);
}

.vocation-tag:nth-child(2n):hover {
  box-shadow: 0 4px 8px rgba(92, 70, 227, 0.4);
}

.vocation-tag:nth-child(3n) {
  background: linear-gradient(135deg, #ff6b6b, #ff8787);
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.vocation-tag:nth-child(3n):hover {
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

.vocation-tag:nth-child(4n) {
  background: linear-gradient(135deg, #ffa500, #ffb347);
  box-shadow: 0 2px 4px rgba(255, 165, 0, 0.3);
}

.vocation-tag:nth-child(4n):hover {
  box-shadow: 0 4px 8px rgba(255, 165, 0, 0.4);
}

.vocation-tag:nth-child(5n) {
  background: linear-gradient(135deg, #9b59b6, #a569bd);
  box-shadow: 0 2px 4px rgba(155, 89, 182, 0.3);
}

.vocation-tag:nth-child(5n):hover {
  box-shadow: 0 4px 8px rgba(155, 89, 182, 0.4);
}

.vocation-text {
  margin-right: 8px;
}

.remove-vocation {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.remove-vocation:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.vocation-input-container {
  position: relative;
  margin-bottom: 8px;
}

.vocation-input {
  width: 100%;
  padding: 12px 16px;
  background-color: #333;
  border: 2px solid #444;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.vocation-input:focus {
  border-color: #1DB954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.vocation-input::placeholder {
  color: #888;
}

.vocation-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #333;
  border: 2px solid #444;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.vocation-dropdown.show {
  opacity: 1;
  transform: translateY(0);
}

.vocation-dropdown::-webkit-scrollbar {
  width: 8px;
}

.vocation-dropdown::-webkit-scrollbar-track {
  background: #444;
}

.vocation-dropdown::-webkit-scrollbar-thumb {
  background: #1DB954;
  border-radius: 4px;
}

.vocation-dropdown::-webkit-scrollbar-thumb:hover {
  background: #1ed760;
}

.vocation-option {
  padding: 12px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vocation-option:last-child {
  border-bottom: none;
}

.vocation-option:hover {
  background-color: #1DB954;
  transform: translateX(4px);
}

.vocation-option.selected {
  background-color: #1DB954;
  color: white;
  font-weight: 600;
}

.vocation-option.selected:hover {
  background-color: #25CC60;
}

.vocation-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #888;
}

.vocation-option.disabled:hover {
  background-color: transparent;
  transform: none;
}

.check-mark {
  color: white;
  font-weight: bold;
  font-size: 16px;
  margin-left: 8px;
}

.no-options {
  padding: 12px 16px;
  color: #888;
  text-align: center;
  font-style: italic;
}

.vocation-finish-container {
  padding: 12px 16px;
  border-top: 2px solid #444;
  background-color: #2a2a2a;
  position: sticky;
  bottom: 0;
}

.vocation-finish-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1DB954, #1ed760);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(29, 185, 84, 0.3);
}

.vocation-finish-btn:hover {
  background: linear-gradient(135deg, #25CC60, #2edf6a);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(29, 185, 84, 0.4);
}

.vocation-finish-btn:active {
  transform: translateY(0);
}



.vocation-counter {
  font-size: 14px;
  color: #aaa;
  text-align: right;
  margin-top: 4px;
}

/* Animations */
@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .vocation-tag {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .vocation-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .vocation-dropdown {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  .vocation-option {
    padding: 8px;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    touch-action: manipulation;
  }
  
  .vocation-option:active {
    background-color: rgba(29, 185, 84, 0.3);
  }
  
  .vocation-finish-btn {
    padding: 12px 16px;
    font-size: 16px;
    min-height: 36px;
    touch-action: manipulation;
  }
  
  .selected-vocations {
    gap: 6px;
  }
  
  /* Improve scrolling on mobile */
  .vocation-dropdown::-webkit-scrollbar {
    width: 12px;
  }
  
  .vocation-dropdown::-webkit-scrollbar-thumb {
    background: #1DB954;
    border-radius: 6px;
  }
}

/* Dark theme adjustments */
.vocation-selector {
  --bg-color: #333;
  --border-color: #444;
  --text-color: white;
  --placeholder-color: #888;
  --hover-bg: rgba(255, 255, 255, 0.1);
}

/* Form integration */
.form-group .vocation-selector {
  margin-top: 8px;
}

.form-group .vocation-selector .vocation-input {
  border-color: #444;
}

.form-group .vocation-selector .vocation-input:focus {
  border-color: #1DB954;
}

/* Modal-specific styling */
.modal .vocation-selector {
  position: relative;
  z-index: 10000;
}

.modal .vocation-selector .vocation-dropdown {
  z-index: 10001;
}

/* Mobile edit profile modal improvements */
@media (max-width: 768px) {
  .modal {
    z-index: 5000;
  }
  
  .modal-content {
    margin: 5% auto !important;
    width: 95% !important;
    max-width: none !important;
    padding: 20px !important;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal .form-group {
    margin-bottom: 15px;
  }
  
  .modal .form-group label {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .modal .form-group input,
  .modal .form-group textarea {
    padding: 12px;
    font-size: 16px; /* Prevent zoom on iOS */
    border-radius: 6px;
  }
  
  .modal .vocation-selector .vocation-input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;
  }
  
  .modal .vocation-selector .selected-vocations {
    padding: 12px;
    min-height: 40px;
  }
  
  .modal .vocation-selector .vocation-dropdown {
    max-height: 300px;
    font-size: 14px;
  }
  
  .modal .submit-button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 20px;
  }
  
  .modal .close-modal {
    font-size: 32px;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 2% auto !important;
    width: 98% !important;
    padding: 15px !important;
    border-radius: 8px;
  }
  
  .modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-right: 50px; /* Space for close button */
  }
  
  .modal .form-group {
    margin-bottom: 12px;
  }
  
  .modal .vocation-selector .vocation-tag {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* Loading state */
.vocation-selector.loading .vocation-input {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"><circle cx="12" cy="12" r="10" stroke="white" stroke-width="2" stroke-linecap="round" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/></circle></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
}

/* Error state */
.vocation-selector.error .vocation-input,
.vocation-selector.error .selected-vocations {
  border-color: #ff6b6b;
}

.vocation-selector.error .vocation-counter {
  color: #ff6b6b;
}

/* Success state */
.vocation-selector.success .vocation-input,
.vocation-selector.success .selected-vocations {
  border-color: #1DB954;
}

/* Accessibility */
.vocation-selector:focus-within {
  outline: 2px solid #1DB954;
  outline-offset: 2px;
}

.remove-vocation:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .vocation-tag {
    border: 2px solid white;
  }
  
  .vocation-input {
    border-width: 3px;
  }
  
  .vocation-dropdown {
    border-width: 3px;
  }
} 