/*Toast Messages */

.toast-notification {
    position: fixed;
    top: 12px;
    left: 0;
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;

    background-color: #f5c119;
    color: #fff;
    border-radius: 0 0 12px 12px;

    display: flex;
    align-items: center;
    gap: 10px;                 /* spacing instead of space-between */

    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
    z-index: 9999;

    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}


/* Visible */
.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Success variant */
.toast-success {
    background-color: #34c759;
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.3);
}

/* Message */
.toast-message {
    flex: 1 1 auto;        /* message grows */
    min-width: 0;          /* VERY important for wrapping */
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}


/* Icon */
.toast-message .material-symbols-rounded {
    font-size: 20px;
    font-variation-settings: 'FILL' 1;
}

/* Small dismiss button */
.toast-dismiss {
    flex: 0 0 auto;        /* button NEVER grows */
    width: 24px;
    height: 24px;

    background: none;
    border: none;
    color: #fff;
    cursor: pointer;

    font-size: 16px;
    line-height: 1;
    opacity: 0.75;

    display: flex;
    align-items: center;
    justify-content: center;
}


.toast-dismiss:hover {
    opacity: 1;
}

/* iPhone notch safe-area */
@supports (padding: env(safe-area-inset-top)) {
    .toast-notification {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}

#qr-reader {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3 / 4; /* phone camera ratio */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #000; /* no grey */
}

#qr-reader video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* safe for scanning */
}



.qr-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.qr-box {
    width: 95%;
    height: 95%;
    border: 1px solid #fff;
    border-radius: 1px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}

  /* PROFILE SECTION */
    .profile img {
        width: 94px;
        height: 94px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #ddd;
        margin: 0 auto;
        display: block;
    }

    .name {
        font-size: 1.35rem;
        margin-top: 10px;
        font-weight: 600;
        letter-spacing: -0.3px;
        text-align: center;
    }

    .goal {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.96rem;
        margin-top: 6px;
        opacity: 0.8;
        gap: 4px;
    }

    .goal .material-symbols-rounded {
        font-size: 20px;
    }

    /* SECTION TITLE */
    .section-title {
        font-weight: 600;
        margin: 18px 0 8px;
        font-size: 1rem;
        text-align: left;
    }

    .balance-card {
  position: relative;
  background: linear-gradient(135deg, #7b3fe4, #8f4df6);
  border-radius: 22px;
  padding: 20px;
  color: white;
  min-height: 160px;
}

/* Embedded QR */
.qr-embed {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrCode {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px !important;
    max-height: 300px !important;
    flex: 0 0 auto !important;
    transform: none !important;
}

#qrCode canvas,
#qrCode img {
    width: 300px !important;
    height: 300px !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
}


.qr-embed canvas {
  border-radius: 8px;
}

.qr-label {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.85;
}
.qr-wrapper {
    width: 380px;
    height: 380px;
    margin: 0 auto;
    padding: 12px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCode canvas,
#qrCode img {
    width: 300px !important;
    height: 300px !important;
    display: block;
}



/* Embedded QR */
.qr-embed2 {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 100px;
  height: 100px;
  padding: 6px;

  background: rgba(255,255,255,0.18);
  border-radius: 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  overflow: hidden;   /* 🔑 THIS IS KEY */
  z-index: 2;
}

.qr-embed2 canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}





/* Overlay */
.info-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

/* Bottom Sheet */
.info-sheet {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 75vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transition: bottom 0.35s ease;
  z-index: 1000;
}

/* Active state */
.info-sheet.active {
  bottom: 0;
}

.info-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.info-sheet-header {
  padding: 12px 16px;
  text-align: center;
  position: relative;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 6px auto 10px;
}

.info-sheet-header .icon-close {
  position: absolute;
  right: 16px;
  top: 14px;
  cursor: pointer;
}

/* Body scroll & card spacing */
.info-sheet-body {
  padding: 16px 16px 120px; /* more bottom space for footer */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  line-height: 1.6; /* more readable line spacing */
}

/* Individual Cards */
.info-card {
  background: #fff; /* brighter card background for contrast */
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* subtle card lift */
  display: flex;
  flex-direction: column;
  align-items: left; /* centers the image and text block */
  text-align: left; /* text inside card centered */
}

/* Card image */
.info-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 12px; /* optional soft edges */
  object-fit: contain;
}

/* Card text */
.info-card h4.title {
  margin-bottom: 12px;
}

.info-card p.sub-title {
  margin-bottom: 12px;
}

/* Ensure footer is not cramped */
.info-sheet-footer {
  position: sticky;
  bottom: 0;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #eee;
  text-align: center;
}

/* Optional: slightly larger font for mobile readability */
@media (max-width: 480px) {
  .info-card h4.title {
    font-size: 1.15rem;
  }
  .info-card p.sub-title {
    font-size: 0.95rem;
  }
}

.list-check li {
    color: #999;
    transition: all 0.2s ease;
}

.list-check li.valid {
    color: #22c55e; /* green */
}

.list-check li.valid i {
    color: #22c55e;
}


/* Fix mobile button tap animation */
button.tf-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none;
    background: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button.tf-btn:active {
  transform: scale(0.97);
}

/* Make the whole tile tappable animation */
.box-icon {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  transform: translateZ(0);
}

/* Press effect */
.box-icon:active {
  transform: scale(0.92);
}

/* Icon animation */
.box-icon .icon {
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1),
              background 0.25s ease,
              box-shadow 0.25s ease;
  border-radius: 16px;
}

/* When tapped */
.box-icon:active .icon {
  transform: scale(1.25) rotate(8deg);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.15),
              0 8px 24px rgba(0,0,0,0.25);
}

/* Optional glow using your theme */
.box-icon:active {
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Animate colour change smoothly */
.inner-bar-item,
.inner-bar-item span,
.inner-bar-item i {
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Press effect */
.inner-bar-item:active {
  transform: scale(0.92);
}

/* FORCE ACTIVE COLOUR */
.inner-bar-item.active,
.inner-bar-item.active i,
.inner-bar-item.active span {
  color: #00BABC !important;      /* Text or icon font */
}

/* If using SVG inside <i> */
.inner-bar-item.active i svg,
.inner-bar-item.active i svg * {
  fill: #00BABC !important;       /* SVG icons */
  stroke: #00BABC !important;
}


/* Base styles for header buttons */
.header-content .tf-btn-arrow,
.header-content .btn-right {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; /* smooth background & color animation */
    color: #333; /* default color */
    background: rgba(0,0,0,0); /* transparent by default */
}

/* Hover / active effect */
.header-content .tf-btn-arrow:hover,
.header-content .tf-btn-arrow:active,
.header-content .btn-right:hover,
.header-content .btn-right:active {
    background: rgba(0,186,188,0.1); /* light primary blue background */
    color: #00BABC; /* primary blue color */
}

/* Optional: subtle icon rotation without moving button */
.header-content .tf-btn-arrow:active i,
.header-content .btn-right:active i {
    transform: rotate(-10deg);
    transition: transform 0.2s ease-in-out;
}



/* Minimal highlight on click/tap without affecting other styles */
.list-profile-contact .vas-link:active,
.list-profile-contact .vas-link:focus {
    background-color: rgba(0, 186, 188, 0.08); /* very light primary shade */
    transition: background-color 0.2s ease-in-out;
    outline: none; /* remove default focus outline */
}

.payout-bar{
    background:#ffffff;
    border-radius:14px;
    padding:12px 14px;
    margin-bottom:16px;
    box-shadow:0 6px 16px rgba(0,0,0,0.06);
}

.payout-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
}

.payout-text{
    font-size:13px;
    font-weight:600;
}

.payout-icon{
    font-size:16px;
}

.payout-progress{
    width:100%;
    height:6px;
    background:#edf1f7;
    border-radius:20px;
    overflow:hidden;
}

.payout-fill{
    height:100%;
    background:linear-gradient(90deg,#4FD1C5,#2B6CB0);
    border-radius:20px;
    transition:width .4s ease;
}

.payout-upgrade{
    text-align:center;
    font-size:12px;
    margin-top:6px;
    color:#4FD1C5;
}

.logo-qr{
    position: relative;
    display: inline-block;
}

.main-qr{
    width: 300px;
    height: auto;
}

.overlay-store{
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 190px;
    height: 130px;

    object-fit: contain;
    display:block;          /* Safari fix */
    max-width:100%;         /* prevents overflow */

    background: white;
    padding: 4px;
    border-radius: 8px;
}


/* Loading Button */

/* Loading Button */

.loading-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-btn .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.loading-btn.loading .btn-text {
    display: none;
}

.loading-btn.loading .btn-loading {
    display: flex;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spinBtn 0.7s linear infinite;
}

@keyframes spinBtn {
    100% {
        transform: rotate(360deg);
    }
}


/* =========================================================
   FIRST LOGIN WELCOME POPUP
   Safari + Chrome compatible
   ========================================================= */

.welcome-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;
    height: 100dvh;

    background: rgba(0, 0, 0, 0.62);
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    /* Safari safe-area support */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));

    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

    /* Safari backdrop rendering */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.welcome-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   Popup
   ========================================================= */

.welcome-popup {
    width: 100%;
    max-width: 390px;

    background: #ffffff;

    border-radius: 24px;

    position: relative;

    overflow: hidden;

    box-sizing: border-box;

    /* Prevent popup becoming taller than Safari viewport */
    max-height: calc(100dvh - 40px);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.30);

    transform: translate3d(0, 20px, 0) scale(0.97);
    -webkit-transform: translate3d(0, 20px, 0) scale(0.97);

    transition:
        transform 0.3s ease,
        -webkit-transform 0.3s ease;

    /* Safari rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.welcome-overlay.show .welcome-popup {
    transform: translate3d(0, 0, 0) scale(1);
    -webkit-transform: translate3d(0, 0, 0) scale(1);
}


/* =========================================================
   Close
   ========================================================= */

.welcome-close {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 34px;
    height: 34px;

    border: 0;

    border-radius: 50%;

    background: rgba(255,255,255,0.9);

    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    /* Safari button reset */
    -webkit-appearance: none;
    appearance: none;

    padding: 0;

    color: #222;
}


/* =========================================================
   Slides
   ========================================================= */

.welcome-slider {
    position: relative;

    width: 100%;

    overflow: hidden;

    box-sizing: border-box;

    /* Safari touch handling */
    -webkit-overflow-scrolling: touch;
}

.welcome-track {
    display: flex;

    width: 100%;

    /* Safari-compatible transform */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);

    transition:
        transform 0.35s ease,
        -webkit-transform 0.35s ease;

    touch-action: pan-y;

    will-change: transform;

    box-sizing: border-box;
}

.welcome-slide {
    min-width: 100%;
    width: 100%;

    flex: 0 0 100%;

    box-sizing: border-box;

    padding: 32px 28px 20px;

    text-align: center;

    /* Prevent Safari flex sizing issues */
    overflow: hidden;
}


/* =========================================================
   Image
   ========================================================= */

.welcome-slide-image {
    width: 100%;
    height: 210px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    box-sizing: border-box;

    overflow: hidden;
}

.welcome-slide-image img {
    display: block;

    max-width: 100%;
    max-height: 210px;

    width: auto;
    height: auto;

    object-fit: contain;

    /* Prevent Safari image dragging */
    -webkit-user-drag: none;
}


/* =========================================================
   Heading
   ========================================================= */

.welcome-slide h3 {
    margin: 0 0 8px;

    font-size: 21px;

    font-weight: 700;

    color: #222;
}


/* =========================================================
   Text
   ========================================================= */

.welcome-slide p {
    margin: 0 auto;

    max-width: 300px;

    font-size: 14px;

    line-height: 1.5;

    color: #666;
}


/* =========================================================
   Dots
   ========================================================= */

.welcome-dots {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 7px;

    padding: 4px 0 18px;
}

.welcome-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;

    background: #d5d5d5;

    transition:
        width 0.25s ease,
        background 0.25s ease;
}

.welcome-dot.active {
    width: 22px;

    border-radius: 10px;

    background: #1e88e5;
}


/* =========================================================
   Footer
   ========================================================= */

.welcome-footer {
    padding: 0 24px 24px;

    box-sizing: border-box;
}


/* =========================================================
   Main button
   ========================================================= */

.welcome-next {
    width: 100%;

    height: 48px;

    border: 0;

    border-radius: 12px;

    background: #1e88e5;

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    /* Safari button reset */
    -webkit-appearance: none;
    appearance: none;

    padding: 0;
}


/* =========================================================
   Skip
   ========================================================= */

.welcome-skip {
    width: 100%;

    margin-top: 10px;

    border: 0;

    background: transparent;

    color: #777;

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;

    padding: 8px;

    /* Safari button reset */
    -webkit-appearance: none;
    appearance: none;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 480px) {

    .welcome-popup {
        max-width: 360px;

        border-radius: 22px;

        /* Safari viewport protection */
        max-height: calc(100dvh - 40px);
    }

    .welcome-slide {
        padding: 30px 22px 18px;
    }

    .welcome-slide-image {
        height: 190px;
    }

    .welcome-slide-image img {
        max-height: 190px;
    }

}


/* =========================================================
   Small iPhones / very short screens
   ========================================================= */

@media (max-width: 380px) {

    .welcome-popup {
        max-width: 350px;
    }

    .welcome-slide {
        padding: 24px 18px 14px;
    }

    .welcome-slide-image {
        height: 170px;
        margin-bottom: 14px;
    }

    .welcome-slide-image img {
        max-height: 170px;
    }

    .welcome-slide h3 {
        font-size: 20px;
    }

    .welcome-slide p {
        font-size: 13px;
    }

    .welcome-footer {
        padding-left: 18px;
        padding-right: 18px;
        padding-bottom: 18px;
    }

}


/* =========================================================
   Short / landscape mobile screens
   ========================================================= */

@media (orientation: landscape) and (max-height: 600px) {

    .welcome-overlay {
        align-items: center;
    }

    .welcome-popup {
        max-height: calc(100dvh - 20px);
    }

    .welcome-slide {
        padding: 15px 20px;
    }

    .welcome-slide-image {
        height: 140px;
        margin-bottom: 10px;
    }

    .welcome-slide-image img {
        max-height: 140px;
    }

    .welcome-slide h3 {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .welcome-slide p {
        font-size: 12px;
        line-height: 1.4;
    }

    .welcome-dots {
        padding: 3px 0 8px;
    }

    .welcome-footer {
        padding-bottom: 10px;
    }

}


.tag-money.active {
    background-color: var(--primary);
    color: #fff;
    border-color: transparent;
}

.tag-money {
    padding: 8px 10px !important;
    min-height: 40px;
    font-size: 13px;
}

.tag-money .material-symbols-rounded {
    font-size: 18px;
    vertical-align: middle;
}