/* HEADER DASHBOARD CSS */
.header {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    padding: 1rem;
    top: -1px;
    position: fixed;
    width: 100%;
    max-width: 480px;
    height: auto;
    background-color: white;
    z-index: 999;
    /* border: 1px solid red; */
}

.search {
    user-select: none;
    border-radius: 10px;
    border: 1px solid #ededed;
    width: 100%;
    height: clamp(2.6rem, 4vw, 2.8rem);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search a {
    width: 7%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border: 1px solid black; */
}

.search img.search-icon {
    user-select: none;
    width: 4.5%;
    opacity: 50%;
}

.search a img {
    width: 100%;
}

.search .search-field {
    width: 100%;
    border: none;
}

.search-field:focus-visible {
    outline: none;
    border: none;
}

.search-field::placeholder {
    padding-left: 0.3rem;
    color: #787878;
    font-size: clamp(0.3rem, 3vw, 0.85rem);
}

.cart-notif {
    /* aspect-ratio: 1/1; */
    margin: 0;
    padding: 0;
    width: 22%;
    height: auto;
    /* border: 1px solid black; */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.cart-notif a {
    /* border: 1px solid black; */
    width: 100%;
}

.cart-notif a img {
    /* border: 1px solid black; */
    width: 100%;
}

/* CSS untuk badge keranjang */
.cart-link {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    line-height: 1;
}
/* END OF HEADER DASHBOARD CSS */

/* HEADER PESAN CSS */
.header-message {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    padding: 1rem 1rem;
    top: 0;
    position: fixed;
    width: 100%;
    max-width: 480px;
    height: auto;
    background-color: white;
    z-index: 999;
    border-bottom: 1px solid #f5f5f5;
    /* border: 1px solid red; */

    /* shadow */
    /* -webkit-box-shadow: 0px 20px 10px -21px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0px 20px 10px -21px rgba(0, 0, 0, 0.1);
    box-shadow: 0px 20px 10px -21px rgba(0, 0, 0, 0.1); */
}

.header-message .container {
    padding: 0;
    /* border: 1px solid blue; */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.header-message .container .header-back {
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    gap: 1rem;
}

.header-message .container .header-back p {
    margin: 0;
}
/* END OF HEADER PESAN CSS */

/* FOOTER CSS */
.footer {
    width: 100%;
    max-width: 480px;
    background-color: white;
    /* border: 1px solid red; */
    bottom: -1px;
    position: fixed;
    justify-content: center;
    display: flex;
    align-items: center;
    text-align: center;
    z-index: 999 !important;
}

.footer .footer-field {
    user-select: none !important;
    width: 100%;
    padding: 0rem 1rem 1rem 1rem;
    height: 80px;
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 1rem;
    /* border: 1px solid #ededed; */
}

.footer .footer-field a {
    user-select: none !important;
    padding-top: 0.4rem;
    width: 20%;
    height: 60px;
    color: black;
    /* border: 1px solid black; */
    text-decoration: none;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: center;
    /* active line */
    border-top: 2px solid #10accf00;
    /* border-radius: 2px; */
}

.footer .footer-field a img {
    user-select: none !important;
    width: 100%;
}

.profil-warp {
    user-select: none !important;
    height: 50px;
    /* border: 1px solid black; */
    width: 100%;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
}

.profil-warp .profil-field {
    user-select: none !important;
    /* position: absolute; */
    /* top: -15px; */
    /* border: 1px solid green; */
    width: 100%;
}

.profil-warp .profil-field .profil-photo {
    user-select: none !important;
    width: 55px;
    height: 55px;
    border: 2px solid #10accf00;
    border-radius: 999px;
}

/* END OF FOOTER CSS */

@media only screen and (max-width: 450px) {
    .search img.search-icon {
        width: 6%;
    }
}

/* LAYOUT HEADER */

.topbar-general {
    position: fixed;
    max-width: 480px;
    top: -1px;
    width: 100%;
    padding: 1rem 1rem 1rem 1rem;
    display: flex;
    height: auto;
    flex-direction: column;
    justify-content: center;
    /* border: 1px solid black; */
    z-index: 999;
    background-color: white;
}

.topbar-row {
    max-width: 480px;
    top: -1px;
    width: 100%;
    padding: 1rem;
    display: flex;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    /* border: 1px solid black; */
    z-index: 999;
    background-color: white;
}

.topbar-title {
    width: 40%;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.sec-content {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.wrapper-section {
    display: flex;
    flex-direction: column;
    height: auto;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* background-color: #f5f5f5; */
    height: auto;
    /* border: 1px solid red; */
}

/* Unread message badge styling */
.icon-wrapper {
    position: relative;
    display: inline-block;
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.unread-badge.animate {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
