/* =========================================
   PUSLAPIS
   ========================================= */

body {
  background: #f6f8fc;
  color: #0f172a;
}

.my-cv-page {
  padding: 44px 0 90px;
}

.my-cv-container {
  max-width: 1000px;
}


/* =========================================
   HEADER
   ========================================= */

.logo {
  text-decoration: none;
  color: inherit;
}

.my-cv-header-back {
  color: #475569;

  font-size: 14px;
  font-weight: 600;

  text-decoration: none;
}

.my-cv-header-back:hover {
  color: #0f172a;
}


/* =========================================
   PUSLAPIO VIRŠUS
   ========================================= */

.my-cv-heading {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) 290px;

  align-items: end;

  gap: 30px;

  margin-bottom: 30px;
}

.my-cv-label {
  margin: 0 0 8px;

  color: #2563eb;

  font-size: 12px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.my-cv-heading h1 {
  margin: 0 0 10px;

  color: #0f172a;

  font-size: 38px;
  line-height: 1.1;
}

.my-cv-heading > div:first-child > p:last-child {
  max-width: 620px;

  margin: 0;

  color: #64748b;

  font-size: 15px;
  line-height: 1.6;
}


/* =========================================
   CV PROGRESAS
   ========================================= */

.cv-progress-card {
  padding: 18px 20px;

  background: white;

  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.cv-progress-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin-bottom: 11px;
}

.cv-progress-top span {
  color: #64748b;

  font-size: 13px;
  font-weight: 600;
}

.cv-progress-top strong {
  color: #2563eb;

  font-size: 16px;
}

.cv-progress-bar {
  height: 8px;

  overflow: hidden;

  background: #e8edf5;

  border-radius: 999px;
}

.cv-progress-fill {
  height: 100%;

  background: #2563eb;

  border-radius: 999px;

  transition: width 0.25s ease;
}


/* =========================================
   CV SEKCIJOS
   ========================================= */

.my-cv-section {
  margin-bottom: 18px;

  padding: 26px;

  background: white;

  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.my-cv-section-heading {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 25px;

  margin-bottom: 22px;
}

.my-cv-section-heading h2 {
  margin: 5px 0 6px;

  color: #0f172a;

  font-size: 20px;
  line-height: 1.25;
}

.my-cv-section-heading p {
  margin: 0;

  color: #64748b;

  font-size: 14px;
  line-height: 1.55;
}


/* =========================================
   SEKCIJŲ STATUSAI
   ========================================= */

.cv-section-status {
  display: inline-flex;

  align-items: center;

  padding: 4px 8px;

  background: #dbeafe;
  color: #1d4ed8;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cv-section-status.optional {
  background: #f1f5f9;
  color: #64748b;
}


/* =========================================
   LAUKAI
   ========================================= */

.my-cv-fields-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.my-cv-field {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.my-cv-field label {
  color: #334155;

  font-size: 13px;
  font-weight: 700;
}

.my-cv-field input,
.my-cv-field textarea {
  width: 100%;

  box-sizing: border-box;

  padding: 12px 14px;

  border: 1px solid #dbe2ea;
  border-radius: 10px;

  background: white;
  color: #0f172a;

  font-family: inherit;
  font-size: 14px;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.my-cv-field input:focus,
.my-cv-field textarea:focus {
  border-color: #2563eb;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.1);
}

.my-cv-field input::placeholder,
.my-cv-field textarea::placeholder {
  color: #94a3b8;
}

.my-cv-field textarea {
  min-height: 130px;

  resize: vertical;

  line-height: 1.55;
}


/* =========================================
   NUOTRAUKA
   ========================================= */

.cv-photo-area {
  display: flex;

  align-items: center;

  gap: 22px;
}

.cv-photo-preview {
  display: flex;

  align-items: center;
  justify-content: center;

  flex: 0 0 110px;

  width: 110px;
  height: 110px;

  overflow: hidden;

  background: #f1f5f9;

  border: 1px solid #dbe2ea;
  border-radius: 50%;

  color: #94a3b8;

  font-size: 42px;
}

.cv-photo-preview img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.cv-photo-actions {
  display: flex;

  align-items: flex-start;
  flex-direction: column;

  gap: 9px;
}

.cv-photo-actions small {
  color: #94a3b8;

  font-size: 12px;
}


/* =========================================
   BENDRI MYGTUKAI
   ========================================= */

.cv-add-button,
.cv-secondary-button,
.cv-empty-add-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 40px;

  padding: 0 14px;

  border: 1px solid #cbd5e1;
  border-radius: 9px;

  background: white;
  color: #334155;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  text-decoration: none;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.cv-add-button:hover,
.cv-secondary-button:hover,
.cv-empty-add-button:hover {
  border-color: #2563eb;

  background: #eff6ff;
  color: #1d4ed8;
}

.cv-text-button {
  padding: 0;

  border: none;

  background: transparent;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.cv-text-button.danger {
  color: #dc2626;
}


/* =========================================
   PRIDĖTŲ ELEMENTŲ SĄRAŠAI
   ========================================= */

.cv-items-list {
  display: flex;

  flex-direction: column;

  gap: 12px;
}


/* =========================================
   TUŠČIA SEKCIJA
   ========================================= */

.cv-empty-state {
  display: flex;

  align-items: center;
  flex-direction: column;

  padding: 30px 20px;

  background: #f8fafc;

  border: 1px dashed #cbd5e1;
  border-radius: 14px;

  text-align: center;
}

.cv-empty-state.compact {
  padding: 22px 20px;
}

.cv-empty-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  margin-bottom: 10px;

  background: white;

  border: 1px solid #e2e8f0;
  border-radius: 50%;

  font-size: 20px;
}

.cv-empty-state strong {
  margin-bottom: 5px;

  color: #334155;

  font-size: 14px;
}

.cv-empty-state p {
  margin: 0 0 15px;

  color: #94a3b8;

  font-size: 13px;
}


/* =========================================
   BŪSIMOS ĮRAŠŲ KORTELĖS
   ========================================= */

.cv-item-card {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) auto;

  align-items: center;

  gap: 20px;

  padding: 18px;

  background: #f8fafc;

  border: 1px solid #e2e8f0;
  border-radius: 13px;
}

.cv-item-card h3 {
  margin: 0 0 5px;

  color: #0f172a;

  font-size: 15px;
}

.cv-item-card p {
  margin: 3px 0;

  color: #64748b;

  font-size: 13px;
  line-height: 1.5;
}

.cv-item-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}

.cv-item-edit,
.cv-item-delete {
  padding: 7px 10px;

  border-radius: 8px;

  background: white;

  font-family: inherit;
  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.cv-item-edit {
  border: 1px solid #cbd5e1;

  color: #334155;
}

.cv-item-delete {
  border: 1px solid #fecaca;

  color: #dc2626;
}


/* =========================================
   ĮGŪDŽIŲ ĮVEDIMAS
   ========================================= */

.cv-skill-input-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr) auto;

  gap: 10px;
}

.cv-skill-input-row input {
  width: 100%;

  box-sizing: border-box;

  padding: 12px 14px;

  border: 1px solid #dbe2ea;
  border-radius: 10px;

  font-family: inherit;
  font-size: 14px;

  outline: none;
}

.cv-skill-input-row input:focus {
  border-color: #2563eb;

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* =========================================
   ĮGŪDŽIŲ TAGAI
   ========================================= */

.cv-tags-list {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 14px;
}

.cv-skill-tag {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  padding: 7px 10px;

  background: #eff6ff;
  color: #1d4ed8;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}

.cv-skill-tag button {
  padding: 0;

  border: none;

  background: transparent;
  color: inherit;

  cursor: pointer;
}


/* =========================================
   APAČIOS VEIKSMAI
   ========================================= */

.my-cv-actions {
  position: sticky;

  bottom: 18px;

  display: flex;

  align-items: center;
  justify-content: flex-end;

  gap: 10px;

  margin-top: 28px;

  padding: 14px;

  background: rgba(255, 255, 255, 0.96);

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  box-shadow:
    0 12px 35px rgba(15, 23, 42, 0.12);

  backdrop-filter: blur(8px);

  z-index: 20;
}

.cv-preview-button {
  min-height: 44px;

  padding: 0 18px;

  border: 1px solid #cbd5e1;
  border-radius: 10px;

  background: white;
  color: #334155;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;
}

.cv-preview-button:hover {
  background: #f8fafc;
}

#saveCvButton {
  min-height: 44px;

  padding: 0 22px;

  border: none;
  border-radius: 10px;

  background: #2563eb;
  color: white;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;
}

#saveCvButton:hover {
  background: #1d4ed8;
}

#saveCvButton:disabled {
  opacity: 0.65;

  cursor: not-allowed;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 850px) {

  .my-cv-heading {
    grid-template-columns: 1fr;

    align-items: stretch;
  }

  .cv-progress-card {
    max-width: none;
  }

  .my-cv-heading h1 {
    font-size: 32px;
  }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 650px) {

  .my-cv-page {
    padding: 26px 0 60px;
  }

  .my-cv-heading {
    gap: 20px;

    margin-bottom: 22px;
  }

  .my-cv-heading h1 {
    font-size: 28px;
  }

  .my-cv-section {
    padding: 20px 18px;

    border-radius: 15px;
  }

  .my-cv-section-heading {
    flex-direction: column;

    gap: 14px;
  }

  .cv-add-button {
    width: 100%;
  }

  .my-cv-fields-grid {
    grid-template-columns: 1fr;
  }

  .cv-photo-area {
    align-items: flex-start;
  }

  .cv-photo-preview {
    flex-basis: 90px;

    width: 90px;
    height: 90px;
  }

  .cv-skill-input-row {
    grid-template-columns: 1fr;
  }

  .cv-skill-input-row .cv-secondary-button {
    width: 100%;
  }

  .cv-item-card {
    grid-template-columns: 1fr;

    gap: 14px;
  }

  .cv-item-actions {
    width: 100%;
  }

  .cv-item-edit,
  .cv-item-delete {
    flex: 1;
  }

  .my-cv-actions {
    bottom: 10px;

    flex-direction: column;

    align-items: stretch;
  }

  .cv-preview-button,
  #saveCvButton {
    width: 100%;
  }

}


/* =========================================
   MAŽI TELEFONAI
   ========================================= */

@media (max-width: 430px) {

  .my-cv-heading h1 {
    font-size: 25px;
  }

  .cv-photo-area {
    flex-direction: column;
  }

}