/* default error message */
.error-message {
  padding: 20px;
  background-color: #ffebee;
  color: var(--error-color);
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid var(--error-color);
}

/* job details section */

.main-container {
  position: relative;
  height: max-content;
  max-width: 100%;
  padding: 0 20px 20px;
  background-color: white;
}

.details-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.close-modal {
  position: absolute;
  top: 5px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  display: none;
}

.close-modal:hover {
  color: #333;
}

/*details headers */
.details-headers {
  position: sticky;
  top: -42px;
  background-color: white;
  padding: 20px 0;
  z-index: 1;
  border-bottom: 1px solid #dfdfe2;
}

.details-headers-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: #000;
}

.company-logo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  /* background-color: #f5f5f7; */
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee; */
  flex-shrink: 0;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.position-name {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
}

.company-name {
  font-weight: 600;
  color: #000;
  font-size: 16px;
}

.company-job-title {
  font-size: 18px;
  font-weight: 600;
}

.company-info-extra {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

.company-info-top {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.company-details {
  display: flex;
  gap: 20px;
}

.company-list {
  display: flex;
  gap: 10px;
  font-size: 13px;
  align-items: center;
  color: #333;
}

.details-date {
  font-size: 13px;
  color: gray;
}

.details-headers-right {
  flex: 1 1 400px;
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 10px;
  width: 100%;
}

.details-headers-button {
  flex: 1 1 50px;
}

.apply-btn {
  background-color: #036bf2;
  color: white;
  width: 100%;
  min-width: fit-content;
  height: 40px;
  padding: 0 10px;
  white-space: nowrap;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.apply-btn:hover {
  background-color: #0249a5;
}

.duration {
  flex: 1 1 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: fit-content;
  height: 40px;
  background-color: #fef6f6;
  border-radius: 8px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #ffece8;
  padding: 0 20px;
}

.share-btn {
  width: 100%;
  min-width: fit-content;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  color: #334155;
  border: 1px solid #86868b;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0 10px;
}

/* job main content */
.details-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

/* join main content top */

.details-section-top {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.details-extra {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #0658c412;
  border-radius: 10px;
}

.extra-header {
  font-weight: 600;
  font-size: 14px;
}

.extra-des {
  font-weight: 400;
  color: #555;
  font-size: 14px;
}

/*Main section*/

.job-main-content {
  flex: 1 1 600px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.job-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.details-title {
  font-size: 20px;
  padding: 10px 0;
  border-bottom: 2px solid #86868b;
  font-weight: 700;
  color: #334155;
}

.job-details-paragraph {
  display: flex;
  flex-direction: column;
  gap: 20px !important;
  font-size: 14px;
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.job-details-paragraph * {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.job-details-paragraph p {
  color: #334155;
  font-size: 14px;
}

.job-details-paragraph p strong {
  font-weight: 600;
  color: #000;
  font-size: 15px;
}

.job-details-paragraph ul li {
  list-style-type: none;
  color: #334155;
  font-weight: 400;
}

.job-details-paragraph ol li {
  list-style-type: decimal;
}

ul {
  padding-left: 20px;
  margin: 10px 0;
}

ol {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
  position: relative;
}

ul li::before {
  content: "•";
  color: var(--secondary);
  font-weight: bold;
  position: absolute;
  left: -15px;
}

ol li::before {
  color: var(--secondary);
  font-weight: bold;
  position: absolute;
  left: -15px;
}

/* extra for education and fields and levels */
.details-section-middle {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.details-middle-content {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.details-middle-header {
  font-size: 16px;
  font-weight: 600;
}

.middle-fields {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.middle-fields span {
  width: fit-content;
  background-color: #0658c412;
  padding: 10px;
  font-size: 14px;
  border-radius: 17px;
  font-weight: 500;
}

/* Modal Styles */
.modals {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  z-index: 100 !important;
}

.modals-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  z-index: 100;
}

.close-btn:hover {
  color: #333;
}

.modals-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

.apply-instructions {
  margin-bottom: 20px;
  line-height: 1.6;
}

/* bottom button */
.bottom-button {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  padding: 20px;
  background-color: white;
  justify-content: right;
  gap: 20px;
  z-index: 100;
}

.bottom-button .apply-btn {
  width: fit-content;
  padding: 0 10px;
}

.bottom-button .closeBtn {
  width: fit-content;
  height: 40px;
  color: #334155;
  border: 1px solid #86868b;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0 10px;
}

/* Responsive Styles */
@media (max-width: 1134px) {
  .main-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 7.5vh;
    padding-right: 7.5vh;
  }

  .details-content {
    min-height: 101vh;
  }

  .modals-content {
    margin: 20% auto;
  }

  .close-modal {
    display: block;
  }

  .details-headers {
    position: sticky;
    top: 0;
  }
}

@media (max-width: 576px) {
  .main-container {
    padding-left: 5dvh;
    padding-right: 5dvh;
  }
}

@media (max-width: 480px) {
  .details-headers {
    position: relative;
  }

  .company-name {
    font-weight: 600;
    color: #000;
    font-size: 14px;
  }

  .position-name {
    display: none;
  }

  .company-job-title {
    display: block;
  }

  .details-headers-right {
    display: none;
  }

  .details-extra {
    /* flex: 1 1 100px; */
    justify-content: center;
    background-color: #0658c412;
    border: none;
    box-shadow: none;
    border-radius: 10px;
  }

  .details-section {
    padding-top: 15px;
  }

  .main-container {
    border-radius: none;
    padding: 60px 4dvh 100px;
  }

  .modals-content {
    margin: 30% auto;
    padding: 20px;
    width: 95%;
  }

  .bottom-button {
    display: flex;
  }

  .details-section-top {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .mobile-overflow {
    overflow: hidden;
  }

  .details-content {
    padding-bottom: 60px;
  }
}
