/* ----- 폰트 ----- */
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);

* {
    font-family: "Noto Sans KR", sans-serif;
    font-style: normal;
    font-weight: 500;
}

body {
    background-color: #eae8fe;
}

.header-img {
    display: block;
    height: 180px;
    margin: 0 auto;
    margin-bottom: 67px;
}

.container {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.txt-hide {
    position: absolute;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
}

/* 자판기 */
.machine {
    background-color: #ffffff;
    padding: 31px 27px 28px;
}

/* 자판기 음료 목록 */
.machine .machine-items {
    background-color: pink;
    margin-bottom: 20px;
}

.machine-items-list {
    background-color: aliceblue;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    position: relative;
    font-size: 9px;
    line-height: 13px;
}

.machine-items-list li {
    background-color: #ffffff;
    filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.5));
    border-radius: 10px;
    width: 94px;
    height: 130px;
    text-align: center;
    box-sizing: border-box;
    padding: 11px 11px 9px 13px;
    cursor: pointer;
    position: relative;
}

/* soldout 클래스는 아웃라인 안보이게 적용 */
.machine-items-list li:hover:not(.soldout) {
    outline: 3px solid #6327fe;
}

/* 클릭했을 때 */
.machine-items-list .item-li:active:not(.soldout) {
    background-color: #6327fe;
    color: #ffffff;
}

/* 매진된 항목 품절 처리 */
.soldout::before {
    position: absolute;
    top: 0;
    left: 0;
    content: "품절";
    color: transparent;
    background: no-repeat center/ 60px 46px url(../../src/img/Sold-out.png) rgba(0, 0, 0, 0.8);
    border-radius: inherit;
    width: inherit;
    height: inherit;
    pointer-events: none;
}

.items-img {
    margin: 0 auto;
    margin-bottom: 3px;
    width: 36px;
    height: 65px;
}

.items-pricetag {
    display: block;
    margin-top: 6px;
    background: #6327fe;
    color: #ffffff;
    border-radius: 50px;
    height: auto;
    padding: 5px 16px 5px 15px;
    font-size: 12px;
}

/* 자판기 기능 */
.machine .machine-func {
    display: grid;
    grid-template-columns: 200fr 94fr;
    grid-template-rows: 33fr 32fr 106fr;
    grid-template-areas: none;
    grid-template-areas:
        "balance btn-change"
        "input-payment btn-payment"
        "selected btn-get";
    gap: 12px;
}

.machine-func .balance {
    grid-area: balance;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px 7px;
    background-color: #eae8fe;
    border-radius: 5px;
    font-size: 14px;
    line-height: 20px;
}

.machine-func .btn-change {
    grid-area: btn-change;
}

.machine-func .input-payment {
    grid-area: input-payment;
    box-sizing: border-box;
    border: 1px solid #bdbdbd;
    border-radius: 5px;
    padding: 6px;
}

.machine-func .btn-payment {
    grid-area: btn-payment;
}
.machine-func .btn-change,
.machine-func .btn-payment {
    background-color: #ffffff;
    filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.5));
    border-radius: 5px;
    font-size: 13px;
    line-height: 19px;
}

.machine-func .btn-change:hover,
.machine-func .btn-payment:hover {
    background-color: #eae8fe;
}

.machine-func .btn-change:active,
.machine-func .btn-payment:active {
    background-color: #6327fe;
    color: #ffffff;
}

.machine-func .selected {
    box-sizing: border-box;
    grid-area: selected;
    background-color: #eae8fe;
    border: 1px solid #bdbdbd;
    border-radius: 5px;
    height: 106px;
    overflow: scroll;
    padding: 12px 18px 12px 12px;
}

.machine-func .selected .selected-list {
    border-style: none;
    display: flex;
    flex-direction: column;
}

.machine-func .get-drinks {
    cursor: pointer;
}

/* 선택, 획득리스트 공통 스타일 */
.get-drinks {
    display: flex;
    justify-content: space-between;
    height: 46px;
    background-color: #ffffff;
    border-radius: 5px;
    padding: 8px 8px 8px 10px;
    align-items: center;
    font-size: 9px;
}

.get-drinks .get-drinks-item {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.get-drinks .get-drinks-item img {
    width: 18px;
    margin-right: 10px;
}

.count {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    border: 1px solid #bdbdbd;
    border-radius: 5px;
    font-size: 14px;
    line-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.get-drinks + .get-drinks {
    margin-top: 6px;
}

.machine-func .btn-get {
    grid-area: btn-get;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    background: #6327fe;
    color: #ffffff;
}

.machine-func .btn-get:hover,
.machine-func .btn-get:active {
    background-color: #eb5757;
}

.pocket {
    display: flex;
    flex-direction: column;
    width: 360px;
    justify-content: space-between;
}

/* 소지금 */
.pocket .wallet {
    background-color: #ffffff;
    padding: 9px 27px;
}

.pocket .wallet .wallet-box {
    background-color: #eae8fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
    border-radius: 5px;
    padding: 6px 10px;
}

/* 획득한 음료 */
.pocket .earned {
    background-color: #ffffff;
    padding: 25px 27px 26px;
    text-align: right;
}

.pocket .earned h4 {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
}

.pocket .earned .selected-list {
    box-sizing: border-box;
    background: #eae8fe;
    border: 1px solid #bdbdbd;
    border-radius: 5px;
    overflow: scroll;
    padding: 12px 18px 12px 12px;
    margin-top: 16px;
    height: 364px;
}

.pocket .earned .total-price {
    font-size: 12px;
    line-height: 17px;
    margin-top: 6px;
}


/* ----- 반응형디자인 ----- */
/* 화면이 작아졌을 때 배치를 세로로 */
@media screen and (max-width: 748px) {
    body {
    }
    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        align-items: center;
    }
}
/* 모바일 버전 */
@media screen and (max-width: 360px) {
    body {
        background-color: white;
    }
    .header-img {
        height: 78px;
        margin-bottom: 18px;
    }
    .container {
        gap: 0;
    }
    .pocket {
        gap: calc(55px - 34px);
    }
}