/* =========================================================
   AGILETALENT CAREER STUDIO
   Main stylesheet
   ========================================================= */

.career-studio {
  --cs-navy: #0B1426;
  --cs-navy-light: #172945;
  --cs-gold: #F2B705;
  --cs-ink: #263247;
  --cs-muted: #697586;
  --cs-line: #E5E8EF;
  --cs-background: #F7F8FA;
  --cs-white: #FFFFFF;
  --cs-green: #16845B;
  --cs-red: #B42318;

  background: var(--cs-background);
  color: var(--cs-ink);
  padding: 68px 20px 90px;
  font-family: Inter, Arial, sans-serif;
}

.career-studio *,
.career-studio *::before,
.career-studio *::after {
  box-sizing: border-box;
}

.career-studio [hidden] {
  display: none !important;
}

.cs-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* =========================================================
   INTRODUCTION
   ========================================================= */

.cs-hero {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.cs-kicker,
.cs-step-label {
  display: inline-block;
  color: #A87900;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.5;
}

.cs-hero h1 {
  margin: 14px 0 16px;
  color: var(--cs-navy);
  font-size: clamp(34px, 5vw, 49px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.8px;
}

.cs-intro {
  max-width: 680px;
  margin: 0 auto;
  color: var(--cs-muted);
  font-size: 16px;
  line-height: 1.8;
}

.cs-hero-points {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.cs-hero-points span {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--cs-line);
  border-radius: 30px;
  background: var(--cs-white);
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   PANELS
   ========================================================= */

.cs-panel,
.cs-chat,
.cs-download {
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  background: var(--cs-white);
  box-shadow: 0 8px 30px rgba(11, 20, 38, 0.045);
}

.cs-upload-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 34px;
}

.cs-panel-heading {
  margin-bottom: 27px;
}

.cs-panel-heading h2 {
  margin: 8px 0 8px;
  color: var(--cs-navy);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.cs-panel-heading p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */

.cs-label {
  display: block;
  margin-bottom: 9px;
  color: var(--cs-ink);
  font-size: 13px;
  font-weight: 700;
}

.cs-upload-control {
  margin-bottom: 21px;
}

.cs-upload-control input[type="file"] {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px;
  border: 1px dashed #B9C2D0;
  border-radius: 10px;
  background: #FAFBFC;
  color: var(--cs-ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.cs-upload-control input[type="file"]:hover {
  border-color: var(--cs-navy-light);
  background: #F5F7FA;
}

.cs-upload-control input[type="file"]:focus-visible,
.cs-chat textarea:focus-visible,
.cs-consent input:focus-visible {
  outline: 3px solid rgba(242, 183, 5, 0.35);
  outline-offset: 2px;
}

.cs-hint {
  margin: 8px 0 0;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.6;
}

.cs-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 23px 0 17px;
  color: #475467;
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
}

.cs-consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--cs-navy);
}

.cs-consent a {
  color: #A87900;
  font-weight: 700;
  text-decoration: underline;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.cs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--cs-navy);
  border-radius: 8px;
  background: var(--cs-navy);
  color: var(--cs-white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.cs-button:hover:not(:disabled) {
  border-color: var(--cs-navy-light);
  background: var(--cs-navy-light);
  transform: translateY(-1px);
}

.cs-button:focus-visible,
.cs-text-button:focus-visible,
.cs-accordion summary:focus-visible {
  outline: 3px solid rgba(242, 183, 5, 0.55);
  outline-offset: 3px;
}

.cs-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cs-start-button {
  width: 100%;
  min-height: 51px;
  margin-top: 5px;
  background: var(--cs-navy);
}

.cs-usage {
  margin: 0 0 13px;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.6;
}

.cs-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--cs-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cs-status:not(:empty) {
  padding: 10px 12px;
  border-radius: 7px;
  background: #F3F5F8;
}

.cs-status:empty {
  display: none;
}

/* =========================================================
   WORKSPACE HEADER
   ========================================================= */

.cs-workspace {
  margin-top: 45px;
}

.cs-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.cs-workspace-header h2 {
  margin: 8px 0;
  color: var(--cs-navy);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.cs-workspace-header p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 14px;
  line-height: 1.7;
}

.cs-session-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #D5EDE2;
  border-radius: 30px;
  background: #F0FAF5;
  color: #18734F;
  font-size: 11px;
  font-weight: 700;
}

.cs-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16845B;
}

/* =========================================================
   CHAT INTERFACE
   ========================================================= */

.cs-chat {
  overflow: hidden;
  margin-bottom: 20px;
}

.cs-chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 25px 27px 21px;
  border-bottom: 1px solid var(--cs-line);
  background: #FCFCFD;
}

.cs-chat-heading h2 {
  margin: 6px 0 5px;
  color: var(--cs-navy);
  font-size: 21px;
  font-weight: 800;
}

.cs-chat-heading p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 13px;
  line-height: 1.6;
}

.cs-chat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 55px;
  padding: 7px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 30px;
  background: var(--cs-white);
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cs-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 210px;
  max-height: 430px;
  overflow-y: auto;
  padding: 25px 27px;
  background: var(--cs-white);
  scroll-behavior: smooth;
}

.cs-message {
  max-width: 86%;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cs-message.assistant {
  align-self: flex-start;
  border: 1px solid var(--cs-line);
  border-bottom-left-radius: 3px;
  background: #F6F7F9;
  color: var(--cs-ink);
}

.cs-message.user {
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  background: var(--cs-navy);
  color: var(--cs-white);
}

#cs-chat-form {
  padding: 20px 27px 25px;
  border-top: 1px solid var(--cs-line);
  background: #FCFCFD;
}

#cs-chat-form textarea {
  display: block;
  width: 100%;
  min-height: 105px;
  padding: 13px 14px;
  border: 1px solid #D7DDE6;
  border-radius: 9px;
  background: var(--cs-white);
  color: var(--cs-ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  transition: border-color 0.2s ease;
}

#cs-chat-form textarea:focus {
  border-color: var(--cs-navy-light);
  outline: none;
}

#cs-chat-form textarea:disabled {
  background: #F1F3F5;
  cursor: not-allowed;
}

#cs-chat-form textarea::placeholder {
  color: #98A2B3;
}

.cs-chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
}

.cs-chat-actions .cs-hint {
  max-width: 430px;
  margin: 0;
}

.cs-chat-actions .cs-button {
  flex: 0 0 auto;
}

/* =========================================================
   COLLAPSIBLE CV REVIEW AND PREVIEW
   ========================================================= */

.cs-result-section {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.cs-accordion {
  overflow: hidden;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
  background: var(--cs-white);
  box-shadow: 0 4px 16px rgba(11, 20, 38, 0.025);
}

.cs-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 77px;
  padding: 17px 21px;
  color: var(--cs-navy);
  list-style: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cs-accordion summary::-webkit-details-marker {
  display: none;
}

.cs-accordion summary:hover {
  background: #FAFBFC;
}

.cs-accordion summary strong,
.cs-accordion summary small {
  display: block;
}

.cs-accordion summary strong {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 800;
}

.cs-accordion summary small {
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.cs-accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cs-line);
  border-radius: 50%;
  color: var(--cs-navy);
  font-size: 18px;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.cs-accordion[open] .cs-accordion-icon {
  transform: rotate(45deg);
}

.cs-accordion-content {
  padding: 0 21px 22px;
  border-top: 1px solid var(--cs-line);
}

.cs-analysis {
  padding-top: 17px;
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.cs-analysis p {
  margin: 0;
  white-space: pre-wrap;
}

.cs-preview-hint {
  margin: 17px 0 12px;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.6;
}

#cs-cv-preview {
  max-height: 600px;
  overflow: auto;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--cs-line);
  border-radius: 8px;
  background: #FAFBFC;
  color: #263247;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* =========================================================
   DOWNLOAD AREA
   ========================================================= */

.cs-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 22px;
  padding: 25px 27px;
  border-color: #E7D59D;
  background: #FFFCF2;
}

.cs-download-copy {
  min-width: 0;
}

.cs-download h2 {
  margin: 7px 0 6px;
  color: var(--cs-navy);
  font-size: 19px;
  font-weight: 800;
}

.cs-download p {
  max-width: 520px;
  margin: 0;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.7;
}

.cs-download-button {
  flex: 0 0 auto;
  border-color: #B88A00;
  background: var(--cs-gold);
  color: var(--cs-navy);
}

.cs-download-button:hover:not(:disabled) {
  border-color: #D6A300;
  background: #FFD04A;
}

/* =========================================================
   SESSION MANAGEMENT
   ========================================================= */

.cs-session-management {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 23px;
  padding: 17px 0;
  border-top: 1px solid var(--cs-line);
}

.cs-session-management p {
  max-width: 560px;
  margin: 0;
  color: var(--cs-muted);
  font-size: 12px;
  line-height: 1.7;
}

.cs-text-button {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--cs-red);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.cs-text-button:hover {
  color: #8E1B13;
}

/* =========================================================
   INFORMATION SECTION
   ========================================================= */

.cs-information {
  max-width: 720px;
  margin: 65px auto 0;
  text-align: center;
}

.cs-information h2 {
  margin: 0 0 14px;
  color: var(--cs-navy);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.cs-information p {
  margin: 0 auto 12px;
  color: var(--cs-muted);
  font-size: 13px;
  line-height: 1.9;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 760px) {

  .career-studio {
    padding: 52px 18px 70px;
  }

  .cs-hero {
    margin-bottom: 30px;
  }

  .cs-upload-panel {
    padding: 27px;
  }

  .cs-workspace-header {
    flex-direction: column;
    gap: 13px;
  }

  .cs-download {
    align-items: flex-start;
    flex-direction: column;
  }

  .cs-download-button {
    width: 100%;
  }

}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {

  .career-studio {
    padding: 38px 13px 55px;
  }

  .cs-hero h1 {
    font-size: 34px;
    letter-spacing: -1.2px;
  }

  .cs-intro {
    font-size: 14px;
    line-height: 1.75;
  }

  .cs-hero-points {
    gap: 7px;
  }

  .cs-hero-points span {
    padding: 7px 10px;
    font-size: 10px;
  }

  .cs-upload-panel {
    padding: 22px 18px;
    border-radius: 12px;
  }

  .cs-panel-heading h2 {
    font-size: 22px;
  }

  .cs-workspace {
    margin-top: 35px;
  }

  .cs-workspace-header h2 {
    font-size: 23px;
  }

  .cs-chat-heading {
    padding: 20px 17px;
  }

  .cs-chat-heading h2 {
    font-size: 19px;
  }

  .cs-messages {
    min-height: 190px;
    max-height: 390px;
    padding: 18px 14px;
  }

  .cs-message {
    max-width: 94%;
    padding: 11px 13px;
    font-size: 12px;
  }

  #cs-chat-form {
    padding: 18px 15px 20px;
  }

  .cs-chat-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cs-chat-actions .cs-button {
    width: 100%;
  }

  .cs-accordion summary {
    min-height: 72px;
    padding: 15px;
  }

  .cs-accordion-content {
    padding: 0 15px 17px;
  }

  #cs-cv-preview {
    padding: 13px;
    font-size: 11px;
  }

  .cs-download {
    padding: 21px 17px;
  }

  .cs-session-management {
    align-items: flex-start;
    flex-direction: column;
  }

  .cs-information {
    margin-top: 48px;
  }

  .cs-information h2 {
    font-size: 21px;
  }

}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .career-studio *,
  .career-studio *::before,
  .career-studio *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}
