/*
 * Layar Profil pelanggan (js/profil.js + template-parts/profil-templates.php): Profil, Edit Profil, Alamat tersimpan,
 * Form alamat, Pengaturan akun, bottom sheet kecil, tombol "Pilih alamat tersimpan" di checkout, tab "Profil" menu bawah.
 * Semua kelas berawalan .tf-prof- / #tfProf. Hijau toko #03AA0E, latar #efeff4, kartu putih membulat.
 */

/* ---- Tab "Profil" di menu bawah (5 tab sama lebar; muat di 320px) ---- */
.nav-profil-icon {
  display: block;
  color: #fff;
}

.bottom-nav-tab {
  min-width: 0;
}

.bottom-nav-tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-tab.nav-profil:focus,
.bottom-nav-tab[data-nav="nav-profil"]:focus {
  outline: none;
}

.bottom-nav-tab.nav-profil:focus-visible,
.bottom-nav-tab[data-nav="nav-profil"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .85);
  outline-offset: -3px;
}

@media only screen and (max-width: 360px) {
  .bottom-nav-tab {
    font-size: 10px;
  }

  .nav-anya span {
    font-size: 9px;
  }
}

/* ---- Halaman ---- */
.tf-prof-page .page__background {
  background: #efeff4 !important;
}

.tf-prof-page .page__content {
  background: transparent;
}

.tf-prof-page [hidden],
.tf-prof-sheet-wrap [hidden] {
  display: none !important;
}

.tf-prof-toolbar {
  background: #fff !important;
  color: #333;
}

.tf-prof-toolbar .toolbar__center {
  font-weight: 700;
  color: #222;
}

.tf-prof-toolbar .toolbar-button--material,
.tf-prof-toolbar .back-button {
  color: #444;
}

.tf-prof-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px 40px;
  box-sizing: border-box;
  color: #222;
  font-family: inherit;
}

.tf-prof-wrap button,
.tf-prof-wrap input,
.tf-prof-wrap textarea {
  font-family: inherit;
}

/* ---- Avatar ---- */
.tf-prof-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #03AA0E;
  color: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  overflow: hidden;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.tf-prof-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tf-prof-avatar svg {
  display: block;
}

.tf-prof-avatar-lg {
  width: 92px;
  height: 92px;
  font-size: 32px;
}

/* ---- Kartu Profil ---- */
.tf-prof-card {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tf-prof-info {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

.tf-prof-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.tf-prof-line {
  font-size: 14px;
  color: #666;
  margin-top: 2px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.tf-prof-empty {
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}

.tf-prof-edit-btn {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  color: #03AA0E;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tf-prof-edit-btn:active {
  background: #e2e2e2;
}

/* ---- Daftar menu ---- */
.tf-prof-menu {
  margin-top: 14px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tf-prof-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  color: #222;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.tf-prof-item:last-child {
  border-bottom: 0;
}

.tf-prof-item:active {
  background: #f5f5f5;
}

.tf-prof-ico {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  color: #03AA0E;
}

.tf-prof-item-label {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  font-weight: 600;
}

.tf-prof-item-meta {
  color: #888;
  font-size: 13px;
}

.tf-prof-chev {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  color: #b5b5b5;
}

.tf-prof-item-multi {
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
}

.tf-prof-item-multi .tf-prof-chev {
  margin-top: 3px;
}

.tf-prof-item-text {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

.tf-prof-item-text .tf-prof-item-label {
  display: block;
}

.tf-prof-item-sub {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: #777;
}

.tf-prof-danger .tf-prof-item-label,
.tf-prof-danger .tf-prof-ico {
  color: #d32f2f;
}

.tf-prof-version {
  margin: 22px 0 0;
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* ---- Edit Profil ---- */
.tf-prof-save {
  color: #9e9e9e !important;
  font-weight: 700;
  font-size: 15px;
  cursor: default;
}

.tf-prof-save.is-on {
  color: #03AA0E !important;
  cursor: pointer;
}

.tf-prof-photo {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tf-prof-sec {
  margin: 0 0 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #555;
}

.tf-prof-photo .tf-prof-avatar-lg {
  margin: 0 auto 10px;
}

.tf-prof-photo-actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 18px;
}

.tf-prof-photo-btn,
.tf-prof-photo-del {
  border: 0;
  background: none;
  padding: 6px 4px;
  font-size: 15px;
  font-weight: 700;
  color: #03AA0E;
  cursor: pointer;
}

.tf-prof-photo-del {
  color: #d32f2f;
}

.tf-prof-hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #888;
  line-height: 1.4;
}

.tf-prof-err {
  margin: 6px 0 0;
  font-size: 13px;
  color: #d32f2f;
  line-height: 1.35;
}

.tf-prof-fields {
  margin-top: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 6px 16px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.tf-prof-fields-card {
  margin-top: 0;
}

.tf-prof-field {
  padding: 12px 0 4px;
}

.tf-prof-field>label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 2px;
}

.tf-prof-req {
  color: #d32f2f;
}

.tf-prof-opt {
  color: #999;
}

.tf-prof-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid #bdbdbd;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 16px;
  color: #222;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-transition: border-color .15s;
  transition: border-color .15s;
}

.tf-prof-input:focus {
  border-bottom: 2px solid #03AA0E;
  padding-bottom: 7px;
}

.tf-prof-textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 6px;
}

.tf-prof-textarea:focus {
  border: 1px solid #03AA0E;
  padding: 9px 10px;
  -webkit-box-shadow: 0 0 0 1px #03AA0E;
  box-shadow: 0 0 0 1px #03AA0E;
}

.tf-prof-wa-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  gap: 8px;
  border-bottom: 1px solid #bdbdbd;
}

.tf-prof-wa-row:focus-within {
  border-bottom: 2px solid #03AA0E;
}

.tf-prof-wa-row .tf-prof-input,
.tf-prof-wa-row .tf-prof-input:focus {
  border: 0;
  padding: 8px 0;
}

.tf-prof-prefix {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  padding: 8px 8px 8px 0;
  border-right: 1px solid #ddd;
  font-size: 16px;
  font-weight: 600;
  color: #444;
}

/* ---- Alamat tersimpan ---- */
.tf-prof-add {
  color: #fff !important;
  background: #03AA0E;
  border-radius: 18px;
  padding: 0 14px !important;
  margin-right: 8px;
  height: 34px;
  line-height: 34px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tf-prof-toolbar .toolbar-button--material.tf-prof-add {
  color: #fff;
  height: 34px;
  line-height: 34px;
  margin-top: 11px;
}

.tf-prof-empty-state {
  text-align: center;
  padding: 40px 18px;
  color: #777;
}

.tf-prof-empty-state svg {
  color: #03AA0E;
}

.tf-prof-empty-state p {
  margin: 10px 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.tf-prof-empty-state small {
  display: block;
  line-height: 1.45;
  margin-bottom: 16px;
}

.tf-prof-empty-state .tf-prof-add {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0 22px !important;
  height: 40px;
  line-height: 40px;
  border: 0;
  border-radius: 20px;
  font-size: 15px;
}

.tf-prof-addr {
  background: #fff;
  border-radius: 14px;
  padding: 14px 14px 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  border: 1px solid transparent;
}

.tf-prof-addr.is-main {
  border-color: #03AA0E;
}

.tf-prof-addr-head {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 8px;
}

.tf-prof-addr-title {
  min-width: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.tf-prof-addr-label {
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tf-prof-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #e6f6e7;
  color: #03AA0E;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
}

.tf-prof-more {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  margin: -6px -4px -6px 0;
}

.tf-prof-more:active {
  background: #f0f0f0;
}

.tf-prof-addr-who {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  overflow-wrap: anywhere;
}

.tf-prof-addr-text,
.tf-prof-addr-region {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.45;
  color: #555;
  overflow-wrap: anywhere;
}

.tf-prof-addr-region {
  color: #777;
  font-size: 13px;
}

.tf-prof-addr-note {
  margin-top: 6px;
  font-size: 13px;
  color: #8a6d00;
  background: #fff8e1;
  border-radius: 8px;
  padding: 5px 9px;
  overflow-wrap: anywhere;
}

/* ---- Form alamat ---- */
.tf-prof-chips {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tf-prof-chip {
  border: 1px solid #cfe9d1;
  background: #f3fbf4;
  color: #03AA0E;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.tf-prof-check {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 10px;
  padding: 14px 0 8px;
  font-size: 15px;
  cursor: pointer;
}

.tf-prof-check input {
  width: 20px;
  height: 20px;
  accent-color: #03AA0E;
}

.tf-prof-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  height: 46px;
  border: 0;
  border-radius: 23px;
  background: #03AA0E;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.tf-prof-btn:active {
  background: #028d0b;
}

.tf-prof-kec-hint {
  display: block;
  font-size: 13px;
  margin-top: 5px;
  color: #666;
}

/* Komponen kecamatan (js/front-rajaongkir.js) di dalam form alamat: salinan gaya #cart */
#tfProfForm #tfProfKecDrop {
  width: 100%;
}

#tfProfForm #tfProfKecDrop select {
  width: 100%;
  height: 40px;
  padding: 0 !important;
  margin-bottom: 10px;
  font-size: 15px;
  border: 0;
  border-bottom: 1px solid #bdbdbd;
  background: transparent;
  color: #222;
}

#tfProfForm #mg-addr-search-wrap {
  width: 100%;
  position: relative;
  margin-bottom: 10px;
}

#tfProfForm #mg-addr-search-wrap input.mg-addr-search-input {
  width: 100%;
  height: 40px;
  padding: 0 8px !important;
  font-size: 15px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

#tfProfForm #mg-addr-search-wrap input.mg-addr-search-input:disabled {
  background: #f2f2f2;
  color: #999;
}

#tfProfForm #mg-addr-results {
  position: fixed;
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 18%);
  display: none;
  -webkit-overflow-scrolling: touch;
}

#tfProfForm #mg-addr-results .mg-addr-row {
  padding: 13px 14px;
  font-size: 15px;
  line-height: 1.4;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

#tfProfForm #mg-addr-results .mg-addr-row:last-child {
  border-bottom: none;
}

#tfProfForm #mg-addr-results .mg-addr-row:active,
#tfProfForm #mg-addr-results .mg-addr-row.active {
  background: #f5f5f5;
}

#tfProfForm #mg-addr-results .mg-addr-row .mg-addr-main {
  font-weight: 600;
  color: #333;
}

#tfProfForm #mg-addr-results .mg-addr-row .mg-addr-sub {
  color: #888;
  font-size: 13px;
}

#tfProfForm #mg-addr-results .mg-addr-empty {
  padding: 13px 14px;
  font-size: 14px;
  color: #888;
}

#tfProfForm .mg-addr-fallback-note {
  font-size: 12px;
  color: #b26a00;
  margin: 4px 0 0;
}

#tfProfForm .mg-addr-fallback-note a,
#tfProfForm .mg-addr-fallback-link {
  color: #1a73e8;
  text-decoration: underline;
}

/* ---- Bottom sheet kecil (menu alamat, pilih alamat di checkout) ---- */
.tf-prof-sheet-wrap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10450;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-family: inherit;
}

.tf-prof-sheet-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, .45);
}

.tf-prof-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 14px 0 8px;
  box-sizing: border-box;
  -webkit-animation: tfProfSheetUp .2s ease-out;
  animation: tfProfSheetUp .2s ease-out;
}

@-webkit-keyframes tfProfSheetUp {
  from {
    -webkit-transform: translateY(40px);
    opacity: .4;
  }

  to {
    -webkit-transform: none;
    opacity: 1;
  }
}

@keyframes tfProfSheetUp {
  from {
    transform: translateY(40px);
    opacity: .4;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.tf-prof-sheet-title {
  padding: 0 18px 10px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.tf-prof-sheet-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tf-prof-sheet-item {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #f3f3f3;
  background: #fff;
  text-align: left;
  font-size: 16px;
  color: #222;
  cursor: pointer;
}

.tf-prof-sheet-item:active {
  background: #f5f5f5;
}

.tf-prof-sheet-item.is-danger {
  color: #d32f2f;
}

.tf-prof-sheet-text {
  display: block;
}

.tf-prof-sheet-addr .tf-prof-sheet-text small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
  overflow-wrap: anywhere;
}

.tf-prof-sheet-addr .tf-prof-badge {
  margin-left: 8px;
}

.tf-prof-sheet-cancel {
  margin: 8px 14px 4px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: #f0f0f0;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ---- Tombol "Pilih alamat tersimpan" di form pemesanan ---- */
#cart .form-list .tf-prof-pick-wrap .list-item__center {
  padding: 4px 0;
}

.tf-prof-pick-btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe9d1;
  background: #f3fbf4;
  color: #03AA0E;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.tf-prof-pick-btn:active {
  background: #e6f6e7;
}
