/* Modern Applicant Portal Styling - Enhanced Theme System */

/* Portal Layout */
.applicant-portal {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

.portal-header {
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.portal-grid {
  gap: 1.5rem;
}

/* Cards */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--accent-primary);
  color: white;
  margin-top: 0.5rem;
}

/* Resume Section */
.resume-section {
  position: relative;
}

.current-resume {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.current-resume p {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-weight: 500;
}

.upload-area {
  border: 2px dashed var(--border-medium);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
}

.upload-area:hover {
  border-color: var(--accent-primary);
  background: var(--surface-2);
}

.upload-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Messaging Section */
.messaging-section {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 1rem;
  max-height: 400px;
}

.message-row {
  margin-bottom: 1rem;
  display: flex;
}

.message-row.message-sent {
  justify-content: flex-end;
}

.message-row.message-received {
  justify-content: flex-start;
}

.message-content {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  position: relative;
}

.message-sent .message-content {
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-received .message-content {
  background: var(--surface-3);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.message-text {
  display: block;
  line-height: 1.4;
}

.message-time {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.message-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#messageInput {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: 0.9rem;
}

#messageInput:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--surface-3);
}

#messageInput::placeholder {
  color: var(--text-muted);
}

/* Empty and Error States */
.empty-messages {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin: 1rem 0;
}

/* Next Steps */
.next-step {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid var(--accent-primary);
}

.next-step h3 {
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-step p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Buttons */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* Toast Messages */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--accent-primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
  
  .message-content {
    max-width: 85%;
  }
  
  .message-input-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #messageInput {
    border-radius: 8px;
  }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .upload-area {
  border-color: var(--border-medium);
}

[data-theme="dark"] .upload-area:hover {
  border-color: var(--accent-primary);
  background: var(--surface-3);
}

/* Focus States for Accessibility */
.btn-outline:focus,
.btn-primary:focus,
#messageInput:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
