/* main content */
.user-account {
  margin-top: 54px;
  background: var(--white1);
  padding: 140px 0 80px;
  transition: padding 0.4s ease;
}
.user-account-container {
  padding: 0 50px;
  transition: padding 0.4s ease;
}
.user-account-wrapper {
  display: flex;
  transition: gap 0.4s ease;
}

.user-account-sidebar {
  width: 232px;
  margin-right: 50px;
}

.account-tabs {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-tabs li {
  padding: 12px 24px;
  cursor: pointer;
  border: 1px solid var(--grey5);
  color: var(--grey2);
  border-radius: 8px;
  background: var(--white1);
  width: 100%;
  min-width: max-content;

  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: start;
  gap: 12px;

  transition: border-color 0.4s ease, background-color 0.4s ease,
    color 0.4s ease;
}
.account-tabs li a {
  text-decoration: none;
  color: var(--grey2);
  width: 100%;
  height: 100%;
}
.account-tabs li svg {
  height: 20px;
  width: 20px;
  min-width: 20px;
  min-height: 20px;
}
.account-tabs li:hover {
  border-color: var(--green2);
}
.account-tabs li.active {
  border-color: var(--green2);
  background: var(--green2);
  color: var(--white1);
}
.account-tabs li .contracts-unnasigned {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green2);
  color: var(--white1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  user-select: none;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.account-tabs li.active .contracts-unnasigned {
  background: var(--white1);
  color: var(--green2);
}
/* right side */
.user-inner-content {
  display: flex;
  flex-direction: column;
  gap: 50px;
  transition: gap 0.4s ease;
}
.user-account-content {
  flex: 1;
}
.user-account-content .h4 {
  color: var(--green2);
  margin-bottom: 32px;
  text-transform: uppercase;
}
.user-account-content .body1 {
  color: var(--grey2);
}
.user-account-content .body3 {
  color: var(--grey1);
  margin-bottom: 32px;
  transition: margin-bottom 0.4s ease;
}

.all-kids .body1,
.contact-info .body1,
.user-password-info .body1,
.tab-content .body1 {
  margin-bottom: 8px;
}

/* inputs */
.profile-input {
  padding: 0 20px;
  height: 50px;
  border-radius: 5px;
  border: 1px solid var(--green2);
  outline: none;
  color: var(--grey3);
}
.profile-input::placeholder {
  color: var(--grey1);
}
.user-password-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
}
.user-password-inputs .main-button-green {
  width: max-content;
}

/* errors */
.update-profile-err,
.update-password-err {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visability 0.4s ease, margin 0.4s ease;
}
.update-profile-err.red,
.update-password-err.red,
.update-profile-err.green,
.update-password-err.green {
  opacity: 1;
  visibility: visible;
}

.update-profile-err.red::before,
.update-password-err.red::before {
  content: "";
  background-image: url(../icons/form_errors.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 18px;
  width: 18px;
  display: block;
}
.update-profile-err.green::before,
.update-password-err.green::before {
  content: "";
  background-image: url(../icons/form_success.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 18px;
  width: 18px;
  display: block;
}

/* hidden containers */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* password toggle */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  flex: 1;
  padding-right: 35px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  line-height: 1;
}

/* Kid item */
.user-kid-item {
  border-bottom: 1px solid var(--green2);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.user-kid-item:last-child {
  border-bottom: none;
  padding-bottom: unset;
  margin-bottom: unset;
}
.user-kid-item-inner {
  display: flex;
  justify-content: space-between;
}
.user-kid-item-inner .caption2 {
  color: var(--grey1);
  margin-bottom: 12px;
  transition: margin-bottom 0.4s ease;
}
.user-kid-item-inner .body2 {
  color: var(--grey2);
}

/* Activities */
.activities-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 32px;
  column-gap: 24px;
}
.tab-content {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.js-loaded .tab-content.active {
  opacity: 1;
  pointer-events: auto;
  height: auto;
}

/* Contract item */
.contract-item-upper,
.contract-item-lower {
  display: flex;
  gap: 16px;
}
.contract-item-upper {
  justify-content: space-between;
}

/* Signing contract modal */
#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
}

.contract-modal-upper-up {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--grey2);
}
.close-modal {
  height: 24px;
  width: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.4s ease;
}
.close-modal svg {
  height: 24px;
  width: 24px;
}
.close-modal:hover {
  color: var(--grey1);
}
.contract-modal-upper {
  margin-bottom: 32px;
}
.contract-modal-upper .body3 {
  color: var(--grey1);
}
.contract-modal-upper .body3:first-of-type {
  margin-bottom: 20px;
}

#contract-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 600px;
  min-width: 310px;
  width: 100%;
  max-height: 85%;
  overflow: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: padding 0.4s ease;
}
.contact-modal-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.father-form,
.kid-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.father-form .body2,
.kid-form .body2 {
  color: var(--grey2);
}
.father-form .fathe-input,
.kid-form .kid-input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  transition: gap 0.4s ease;
}
.father-form .fathe-input input,
.kid-form .kid-input input {
  border: 1px solid var(--grey5);
  height: 50px;
  padding: 0 20px;
  border-radius: 5px;
  transition: border-color 0.4s ease, height 0.4s ease;
}
.father-form .fathe-input input:hover,
.kid-form .kid-input input:hover {
  border-color: var(--green2);
}
.father-form .fathe-input input:focus,
.kid-form .kid-input input:focus {
  border-color: var(--green2);
  outline: none;
}
.father-form .fathe-input input::placeholder,
.kid-form .kid-input input::placeholder {
  color: var(--grey1);
}
.father-form .fathe-input input:not(:placeholder-shown),
.kid-form .kid-input input:not(:placeholder-shown) {
  color: var(--grey3);
}
.contract-modal-lower {
  margin-top: 32px;
}
.contract-modal-lower .main-button-green {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}
.contract-modal-lower .modal-error {
  margin: 6px 0;
  color: var(--red1);
}
.contract-modal-lower .body3 {
  color: var(--grey1);
  text-align: center;
  margin: 12px auto 0;
  max-width: 450px;
}

.sign-contract-modal {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

/* Contracts / Single-contract */
.kids-contracts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contract-list-item {
  display: flex;
  flex-direction: column;
  gap: 24px; 
}
.contract-list-item > div {
  border: 1px solid var(--grey5);
  border-radius: 8px;
  padding: 24px;
  overflow: hidden;
  transition: padding 0.4s ease;
}
.contract-content-inner {
  display: flex;
  flex-direction: column;
}
.contract-item-upper {
  border-bottom: 1px solid var(--grey5);
  padding-bottom: 16px;
}
.contract-item-lower {
  padding-top: 16px;
}
.contract-item-lower .valid-date-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin-right: 8px;
}
.contract-item-lower .valid-date-info .caption4 {
  color: var(--green2);
}
.contract-item-lower .valid-date-info .body3 {
  color: var(--grey2);
  margin-bottom: 0;
} 
.contract-item-upper div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: gap 0.4s ease;
}
.contract-item-upper .caption2 {
  color: var(--grey1);
}
.contract-item-upper .body2 {
  color: var(--grey2);
}
/* buttons */
.contract-item-lower a {
  text-decoration: none;
}
.contract-item-lower .main-button-green {
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch-contract-btn a,
a.download-signed-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--grey2);
  padding: 0 24px;
  height: 50px;
  border: 1px solid var(--grey5);
  border-radius: 5px;
  transition: color 0.4s ease;
}
.watch-contract-btn a svg,
a.download-signed-file svg {
  height: 18px;
  width: 18px;
}
.watch-contract-btn a:hover,
a.download-signed-file:hover {
  color: var(--grey1);
}
.download-signed-file {
  margin-right: 16px;
  transition: margin-right 0.4s ease;
}
/* dots */
.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: auto;
  margin-right: 6px;
}
/* Balance */
.unpaid-payments {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.payment-form-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--grey5);
  border-radius: 8px;
  padding: 16px;
  height: 100%;
}
.payment-form-card .upper-part {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--grey5);
  padding-bottom: 16px;
  gap: 12px;
}
.payment-form-card .upper-part > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.payment-form-card .upper-part > div:last-child {
  grid-template-columns: 1fr;
}
.payment-form-card .upper-part > div > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-form-card .upper-part .status-positive span,
.payment-form-card .upper-part .status-negative span {
  display: block;
}
.payment-form-card .upper-part .status-positive,
.payment-form-card .upper-part .status-negative {
  flex-direction: row;
  align-items: center;
}
.payment-form-card .upper-part .status-positive::before {
  content: "";
  background: var(--green2);
  height: 12px;
  width: 12px;
  border-radius: 50%;
  display: block;
}
.payment-form-card .upper-part .status-negative::before {
  content: "";
  background: var(--red1);
  height: 12px;
  width: 12px;
  border-radius: 50%;
  display: block;
}
.payment-form-card .caption2 {
  color: var(--grey1);
}
.payment-form-card .body2 {
  color: var(--grey2);
}
.payment-form-card .bottom-part {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.payment-form-card .bottom-part > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-form-card .bottom-part .bottom-part-controller {
  margin-top: auto;
}
.payment-form-card .bottom-part .bottom-part-controller .main-button-green {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}
/* balance history */
.payment-history-table {
  display: flex;
  flex-direction: column;
}
.payment-history-item {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 16px 0;
  border-bottom: 1px solid var(--green2);
}
.payment-history-item:last-child {
  border-bottom: none;
}
.payment-history-item > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.payment-history-item .caption2 {
  color: var(--grey1);
}
.payment-history-item .body2 {
  color: var(--grey2);
}
.single-payment-value {
  align-items: end;
  margin-left: auto;
}

/* responsive */
@media (max-width: 1250px) {
  /* Activities */
  .activities-list {
    grid-template-columns: repeat(2, 1fr);
  }
  /* balance */
  .unpaid-payments {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 1150px) {
  .user-account {
    padding: 40px 0 80px;
  }
  .user-inner-content {
    gap: 40px;
  }
  .user-kid-item-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .user-account-content .all-kids .body3 {
    margin-bottom: 24px;
  }
  .user-account-content .contact-info .body3,
  .user-account-content .user-password-info .body3 {
    margin-bottom: 16px;
  }
  .user-kid-item-inner .caption2 {
    margin-bottom: 8px;
  }
  /* contracts */
  .contract-item-upper,
  .contract-item-lower {
    flex-direction: column;
  }
  .contract-item-lower {
    gap: 8px;
  }
  .download-signed-file {
    margin-right: 0;
  }
  .contract-item-lower .valid-date-info {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-right: 0;
}
  .contract-item-upper {
    border-bottom: none;
    padding-bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .contract-item-upper div {
    gap: 8px;
  }
  /* payment history */
  .payment-history-item {
    flex-wrap: wrap;
    gap: 16px;
  }
  .payment-history-item .single-payment-data {
    order: 1;  
  }
  .payment-history-item .single-payment-value {
    order: 2;
  }
  .payment-history-item .single-payment-description {
    order: 3;
    flex: 1 0 100%;
  }
  .payment-history-item > div {
    gap: 8px;
  }
}
@media (max-width: 1000px) {
  /* Activities */
  .activities-list {
    grid-template-columns: repeat(1, 1fr);
    row-gap: 24px;
  }
  /* balance */
  .unpaid-payments {
    grid-template-columns: 1fr;
  }
  /* sutarciu sarasas */
  .contract-list-item > div {
    padding: 16px;
  }
}
@media (max-width: 768px) {
  /* main content */
  .user-account-container {
    padding: 0 20px;
  }
  .user-account-wrapper {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .user-account-sidebar {
    width: 100%;
  }
  .user-password-inputs {
    max-width: 100%;
  }
  .user-password-inputs .main-button-green {
    width: 100%;
  }
  /* overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }
  .sidebar-overlay.active {
    display: block;
  }
  /* mobile tabs */
  .account-tabs.open {
    position: relative;
    z-index: 1000;
  }
  .account-tabs li {
    border-radius: unset;
  }
  .account-tabs li.active {
    cursor: pointer;
  }
  .account-tabs {
    position: relative;
    width: 100%;
  }
  .mobile-active-item {
    padding: 12px 24px;
    cursor: pointer;
    border: 1px solid var(--green2);
    color: var(--white1);
    border-radius: 8px;
    background: var(--green2);
    width: 100%;
    min-width: max-content;

    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: start;
    gap: 12px;
    z-index: 1000;
  }
  .mobile-active-item::after {
    content: "";
    background-image: url(../icons/arrow_dropdown.svg);
    width: 20px;
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-left: auto;
    transition: transform 0.4s ease;
  }
  .mobile-active-item[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }

  .account-tabs {
    border-radius: 8px;
    overflow: hidden;
    gap: unset;
    z-index: 1000;
  }

  .account-tabs[hidden] {
    display: none;
  }
  /* modal */
  #contract-modal {
    padding: 16px;
    width: 90%;
  }
  .contact-modal-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  .father-form .fathe-input,
  .kid-form .kid-input {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .father-form .fathe-input input,
  .kid-form .kid-input input {
    height: 45px;
  }
}
