/**
 * @file
 * Styles for job advertisement single view page.
 */

/* Main article container */
article.job-advertisement {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Title styling */
.job-advertisement h1.title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 2rem 0;
  padding: 2rem 2rem 0 2rem;
  line-height: 1.3;
  border-bottom: 3px solid #007bff;
  padding-bottom: 1rem;
}

/* Action buttons container */
.job-advertisement .action {
  display: flex;
  gap: 1rem;
  padding: 0 2rem 1.5rem 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.job-advertisement .action.owner-actions {
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

/* Action buttons */
.job-advertisement .action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.job-advertisement .action-btn.apply {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
}

.job-advertisement .action-btn.apply:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

.job-advertisement .action-btn.save {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.job-advertisement .action-btn.save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}

.job-advertisement .button--primary.edit-button {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #1a1a1a;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(255, 193, 7, 0.3);
}

.job-advertisement .button--primary.edit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 193, 7, 0.4);
  text-decoration: none;
}

/* Chat button */
.job-advertisement .chat-button {
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(111, 66, 193, 0.3);
}

.job-advertisement .chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(111, 66, 193, 0.4);
  text-decoration: none;
}

/* Fields container */
.job-advertisement .field {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e9ecef;
}

.job-advertisement .field:last-child {
  border-bottom: none;
}

/* Field labels */
.job-advertisement .field__label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6c757d;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.job-advertisement .field__label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #007bff;
  margin-right: 0.75rem;
  border-radius: 2px;
}

/* Field items */
.job-advertisement .field__items {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.job-advertisement .field__item {
  margin-bottom: 0.5rem;
}

.job-advertisement .field__item:last-child {
  margin-bottom: 0;
}

/* Location field special styling */
.job-advertisement .field--name-location {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-left: 4px solid #2196f3;
}

.job-advertisement .field--name-location .field__label {
  color: #1565c0;
}

.job-advertisement .field--name-location .field__label::before {
  background: #2196f3;
}

/* Description/content fields with rich text */
.job-advertisement .field--name-description,
.job-advertisement .field--name-body,
.job-advertisement .field--type-text-long {
  background: #f8f9fa;
}

.job-advertisement .field__item p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.job-advertisement .field__item ul,
.job-advertisement .field__item ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.job-advertisement .field__item li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Salary/compensation fields */
.job-advertisement .field--name-salary,
.job-advertisement .field--name-salary-min,
.job-advertisement .field--name-salary-max,
.job-advertisement .field--name-salary-type {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left: 4px solid #4caf50;
}

.job-advertisement .field--name-salary .field__label,
.job-advertisement .field--name-salary-min .field__label,
.job-advertisement .field--name-salary-max .field__label,
.job-advertisement .field--name-salary-type .field__label {
  color: #2e7d32;
}

.job-advertisement .field--name-salary .field__label::before,
.job-advertisement .field--name-salary-min .field__label::before,
.job-advertisement .field--name-salary-max .field__label::before,
.job-advertisement .field--name-salary-type .field__label::before {
  background: #4caf50;
}

.job-advertisement .field--name-salary .field__item {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1b5e20;
}

/* Requirements field */
.job-advertisement .field--name-requirements {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
}

.job-advertisement .field--name-requirements .field__label {
  color: #e65100;
}

.job-advertisement .field--name-requirements .field__label::before {
  background: #ff9800;
}

/* Status field */
.job-advertisement .field--name-status .field__item {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.job-advertisement .field--name-status .field__item[data-status="active"],
.job-advertisement .field--name-status .field__item:contains("Włączone") {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.job-advertisement .field--name-status .field__item[data-status="inactive"],
.job-advertisement .field--name-status .field__item:contains("Wyłączone") {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Employer info section */
.job-advertisement .field--name-employer-info {
  background: #f1f3f5;
  border-left: 4px solid #6c757d;
  padding: 2rem;
}

.job-advertisement .field--name-employer-info .field__label {
  color: #495057;
  font-size: 1rem;
}

.job-advertisement .field--name-employer-info .field__item {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
}

/* Links in content */
.job-advertisement .field__item a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.job-advertisement .field__item a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .job-advertisement h1.title {
    font-size: 1.5rem;
    padding: 1.5rem 1rem 0 1rem;
  }

  .job-advertisement .field {
    padding: 1rem;
  }

  .job-advertisement .action {
    flex-direction: column;
    padding: 1rem;
  }

  .job-advertisement .action-btn,
  .job-advertisement .button--primary.edit-button,
  .job-advertisement .chat-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .job-advertisement .field__label {
    font-size: 0.8rem;
  }

  .job-advertisement .field__items {
    font-size: 0.95rem;
  }
}

/* Print styles */
@media print {
  .job-advertisement .action,
  .job-advertisement .action.owner-actions {
    display: none;
  }

  .job-advertisement {
    box-shadow: none;
  }

  .job-advertisement h1.title {
    border-bottom: 2px solid #000;
  }
}

/* Animation on page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-advertisement {
  animation: fadeInUp 0.5s ease-out;
}

/* Accessibility improvements */
.job-advertisement .field__label:focus,
.job-advertisement .action-btn:focus,
.job-advertisement .button--primary:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Additional spacing for better readability */
.job-advertisement .field--name-description .field__item,
.job-advertisement .field--name-requirements .field__item {
  line-height: 1.8;
}

/* Icon support if using font awesome */
.job-advertisement .field__label i {
  margin-right: 0.5rem;
  color: #007bff;
}
