:root {
    --id-card-bg: radial-gradient(circle at 0 0, #ffffff 0, #f0f3f8 40%, #E8F0FE 100%);
    --id-card-security-dot: rgba(0, 0, 0, 0.07);
    --id-card-security-dot-mobile: rgba(0, 0, 0, 0.03);
    --vip-badge-bg: radial-gradient(circle at 30% 25%, #fff7e0ed 0 35%, #ffe3aa7d 60%, #f8c97900 100%),
                    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55) 0 2px, rgba(255, 255, 255, 0) 2px 5px);
    --motto-max-width: 305px;
}


#btn-cancel-motto i{
    color: black !important;
}
.id-card-avatar svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: scale(1.15) translateY(5%);
    transform-origin: center center;
}

.id-card-avatar .hair-svg {
    position: absolute;
    transform: scale(1.6) translateY(5%);
    transform-origin: center center;
    z-index: 2;
    pointer-events: none;
}

.id-card-avatar .hide-hands-overlay {
    position: absolute;
    transform-origin: center center;
    z-index: 30;
    pointer-events: none;
}


#id-card-root {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}


.badge-item {
    text-align: center;
    position: relative;
    cursor: pointer;
}

.badge-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

#id-card-drawer-root .id-card{
    width: 440px;
}
.id-card {
    width: 510px;
    max-width: 100%;
    border-radius: 18px;
    padding: 14px 18px 16px;
    background: var(--id-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 5px 3px rgba(0, 0, 0, 0.18);
    color: #111;
    position: relative;
    overflow: hidden;
}

.id-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-radial-gradient(
        circle at 0 0,
        var(--id-card-security-dot) 0,
        var(--id-card-security-dot) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 1;
    mix-blend-mode: normal;
    pointer-events: none;
}

.id-card-top {
    border-bottom: 2px solid rgba(0, 0, 0, 0.6);
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.id-card-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.id-card-main-wr {
    display: flex;
    position: relative;
    margin-top: 15px;
}
.id-card-main {
    display: flex;
    position: relative;
    flex-direction: column;
}

.id-card-avatar {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 179px;
    height: 195px;
    margin-right: 8px;
}

.id-card-avatar .avatar-container {
    background-color: #ffc0cb00;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    margin-top: -41px;
    align-items: flex-end;
    box-sizing: border-box;
    position: relative;
}

.id-card-motto:has(.motto-editing) {
  padding-bottom: 18px;      
}

.id-card-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;    
}
.id-card-info p {
    margin: 3px 0;
}
.id-card-info .label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.id-card-right {
    z-index: 100;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
    padding-bottom: 5px;
}

.id-card-vip-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 0;
    top: 0;
}
.id-card-vip-badge img {
    width: 120px;
    max-width: 100%;
    border-radius: 50%;
}

.id-card-logo-img {
    width: 144px;
    height: 30px;
}
.badge-bg {
    width: 30px;
    height: 30px;
    background: var(--vip-badge-bg);
    border: 2px solid rgb(214 211 211 / 70%);
    padding: 35px;
    border-radius: 50%;
}

.id-card-bottom {
    align-items: center;
    column-gap: 10px;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.id-card-name {
    font-family: "Meow Script", cursive;
    font-weight: 400;
    font-style: italic;
    font-size: 30px;
    flex: 0 0 190px;
    text-align: center;
    cursor: context-menu;
}


.id-card-badge-slots {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.id-card-badge-slots .badge-slot {
    flex: 1 1 0;
    aspect-ratio: 1/1;
    border-radius: 50%;
}


@media (max-width: 499px){
    .badge-overview-popup{
        min-width: none !important;
    }
    .id-card-motto::before {
        left: -20px;
    }
    .id-card::before {
        background-image: repeating-radial-gradient(
            circle at 0 0,
            var(--id-card-security-dot-mobile) 0,
            var(--id-card-security-dot-mobile) 1px,
            transparent 1px,
            transparent 4px
        );
    }
    #btn-cancel-motto .fa-solid.fa-xmark, #btn-save-motto .fa-solid.fa-check{
        display: block !important;
    }
    .btn-label-desktop{
        display: none;
    }
    .id-card-avatar svg {
        transform: scale(1.2) translateY(5%);
    }
    .id-card-avatar {
        flex: 0 0 127px;
        height: 177px;
        overflow: hidden;
    }
    .id-card-bottom{
        align-items: flex-start;
    }
    .id-card-title {
        font-size: 22px;
        padding-left: 5px;
    }
    .id-card-logo-img {
        width: 100px;
        height: 18px;
    }
    #id-card-drawer-root .id-card {
        padding: 8px 12px 11px;
        width: auto !important;
    }
    .id-card-name {
        font-size: 23px;
        flex: 0 0 135px;
        display: inline-block;
        white-space: nowrap;
        text-align: center;
        margin-top: 5px;        
        /*margin-top: -5px;*/
    }
    .id-card-motto {
        padding: 9px 10px;
        max-height: 77px;
        min-height: 57px;
    }
    .id-card-main-wr {
        margin-top: 10px;
    }
    .id-card-info p {
        margin: 1px 0;
    }

    .id-card-badge-slots {
        gap: 5px;
        align-items: center;
    }
    .badge-item img {
        height: auto;
    }
    .id-card-bottom {
        margin-top: 0;
        width: auto;
    }
    #motto-buttons{
        justify-content: flex-end !important;        
    }
    #motto-buttons button{
        padding: 4px 20px 4px 20px !important;
    }
    .id-card-avatar .avatar-container{
        margin-top: -33px;
        position: relative;
    }
    #btn-cancel-motto:hover, #btn-random-motto:hover{
        background-color: #fbfdff;
    }
}
.motto-text-inner.motto-editing{
    outline: none;
    overflow-wrap: anywhere;
    cursor: text;
    width: 100%;
    display: block;
}

#motto-buttons {
    display: flex;
    justify-content: space-around;
    gap: 3px;
    z-index: 101;
    max-width: var(--motto-max-width);
    margin-top: 5px;
}
#motto-buttons button{
    font-weight: 600;
}
#motto{
  font-style: italic;
}
#btn-cancel-motto .fa-solid.fa-xmark, #btn-save-motto .fa-solid.fa-check{
  display: none;
}
#motto-buttons button{
    border-radius: var(--border-radius-999);
    border: none;
    font-family: 'Segoe UI', sans-serif;
    padding: 4px 20px 4px 20px;
    font-size: 14px;
    color: var(--font-clr);
    cursor: pointer;
}
#btn-save-motto{
  background-color: var(--pink);
  color: white !important;
}
#btn-save-motto i{
    color: white !important;
}
#btn-save-motto:hover{
  background-color:var(--pink-hover);
}
#btn-save-motto:active{
  background-color:var(--pink-click);
}
#btn-cancel-motto, #btn-random-motto{
  background-color: #fbfdff;
}
#btn-random-motto img{
    width: 25px;
}
#btn-cancel-motto:hover, #btn-random-motto:hover{
  background-color: var(--hover-over-white-clr);
}

/*------------------POPUP---------------------*/
.badge-overview-popup{
    background: white;
    box-shadow: 0px 4px 10px #80808080;
    border-radius: var(--border-radius-12);
    padding: 12px;
    min-width: 350px;   
    gap: 10px;
    margin-right: 10px;
    max-width: 390px;    
}
.badge-overview-popup img{
    width: 120px;
    aspect-ratio: 1/1; 
}
#badge-description{
    display: flex;
    flex-direction: column;
    gap: 5px;    
}
.badge-description-top{
    display: flex;
    flex-direction: column;    
    gap: 5px;     
}
#description-title{
    font-weight: 600;
}
#description-text {
    font-style: italic;
}
#speak-tail-motto{
    width: 19px;
    height: 100%;
    position: absolute;
    top: 61px;
    left: -16px;
    z-index: 3;    
}

.id-card-motto-editable:hover + #speak-tail-motto {
  --motto-bubble-stroke: #000000;
}
.id-card-motto-editable:hover {
  border-color: #000000;
}

.id-card-motto-editable:hover + #speak-tail-motto [class*="hover"] {
  fill: #000000 !important;
}

.id-card-motto {
    position: relative;
    padding: 10px 32px 10px 14px;
    max-width: var(--motto-max-width);
    background: #fbfcff;
    border-radius: 6px;
    border: 2px solid #494949;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 83px;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    cursor: context-menu;    
}
.id-card-motto:has(.motto-text-inner.motto-editing) ~ #speak-tail-motto {
  top: 44px !important;   
}
.edit-pencil-icon{
    width: 20px;
    position: absolute;
    top: 150px;
    right: 15px;
}