/* css/jaringan.css - Styles for jaringan.php MLM network tree */




.downline-item {
    margin: 0 0 0 20px;
    position: relative;
    display: flex;
    align-items: center;
}
.downline-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -90px;
    width: 90px;
    height: 3px;
    background-color: #548235; 
    transform: translateY(-50%);
}

.user-card {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    width: 100%;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.card-coin__logo span {
    font-weight: 600;
    display: inline-block;
    margin-bottom: 6px; /* spacing between name and level */
}
.card-coin__logo small {
    display: block;
    color: #f0c419; /* gold color for level */
    font-weight: 700;
    margin-top: 2px;
} 

.user-card:hover {
    background-color: #3a8bd1; /* lighter blue on hover */
}


.downline-list.collapsed {
    max-height: 0;
    transition: max-height 0.5s ease;
    overflow: hidden;
}

/* Child user card with blue background */
.child-user-card {
    background-color: #1e5a9b; /* blue */
}

.user-icon img {
    width: 24px;
    height: 24px;
}
.user-info {
    flex-grow: 1;
}
.username {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 4px;
}
.level {
    font-size: 0.9em;
    color: #d6e94f; /* yellow */
    margin-bottom: 4px;
}
.stats {
    display: inline-block;
    background-color: #d18c00; /* bright yellow */
    color: black;
    font-weight: 200;
    padding: 4px 2px;
    border-radius: 4px;
    font-size: 0.85em;
}
.add-button button {
    background-color: #d18c00; /* orange */
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    margin-right: 10px; /* Add left margin for spacing */
}
.current-user-stats {
    font-size: 0.9em;
    color: white;
    margin-top: 4px;
}
.add-button button:hover {
    background-color: #b37700;
}
.current-user-card {
  
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 1400px;
    margin-bottom: 20px;
    color: white;
    font-weight: 600;
    margin-right: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px; /* added gap between text and card */
}
.current-user-info {
    display: flex;
    align-items: center;
}



/* New class for user images with circular frame and size adjustment */
.user-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0c419; /* gold border */
    margin-right: 10px;
}

/* Remove current-user-image class styles since current user image uses user-image class now */
.current-user-image {
    display: none;
}

/* New class for current user image square style */
  .current-user-icon,
  .downline-card .user-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  .current-user-icon img,
  .downline-card .user-image {
    width: 28px;
    height: 28px;
  }

  .current-user-image-square {
    width: 40px;
    height: 40px;
  }

.current-user-card, .downline-card {
    width: 100%;
    box-sizing: border-box;
}

.search-container {
    margin: 15px 20px;
}

#searchInput {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: 2px solid #f0c419;
    font-size: 1em;
    outline: none;
    box-sizing: border-box;
}

.daftar-mitra-header {
    margin: 0 20px 10px 20px;
    font-weight: 700;
    font-size: 1.2em;
    color: #000000;
    text-align: center;
}

.current-user-card {
    background-color: #548235;
    border-radius: 15px;
    margin: 0 20px 15px 20px;
    padding: 10px 15px;
    color: white;
    font-weight: 600;
    gap: 10px;
    width: 100%;
    margin-left: -10px; /* geser card ke kanan */
    position: relative; /* penting untuk pseudo-element */
}

.current-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-user-details {
    flex-grow: 1;
}

.add-button {
    background-color: #FFB200;
    color: black;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    margin-left: auto;
}

.add-button:hover {
    background-color: #FFB200;
}

.styled-add-button {
    background-color: #FFB200; /* Green */
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    float: right; /* Align to the right */
}

.downline-item {
    margin-bottom: 10px;
}

.downline-card {
    display: flex;
    align-items: center;
    background-color: #548235;
    border-radius: 15px;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.downline-card:hover {
    background-color: #548235; 
}

.downline-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.downline-info .username {
    font-weight: 700;
    font-size: 1em;
}

.downline-info .name {
    font-size: 0.9em;
}

.downline-info .level {
    font-size: 0.8em;
    color: #FFB200;
}

.stats-pill {
    background-color: #FFB200;
    color: black;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    white-space: nowrap;
}

.stats-pill:hover {
    background-color: #ffffff;
}


.downline-scroll-container {
    max-height: calc(100vh - 200px); /* misalnya sisa ruang setelah header/footer */
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}


.back-button {
    background-color: #074dff; /* Red */
    border: none;
    color: white;
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #FFB200;
}

.right-align {
    float: right;
}
.tree-wrapper {
    position: relative;
    padding-left: 20px;
}

/* Garis vertikal dari bawah current-user-card ke tengah last downline */
.tree-wrapper::before {
    content: "";
    position: absolute;
    top: calc(30px + 0px); /* kira-kira bawah card admin */
    left: 15px; /* posisikan sesuai garis */
    width: 3px;
    height: calc(100% - 120px); /* panjang hingga akhir tree */
    background-color: #548235;
    z-index: 0;
}

