@charset "utf-8";

/* .asidebox>aside {width: 200px} */
/* .asidebox>form {width: calc(100% - 200px - 15px);} */
.asidebox {width: 100%;}
.asidebox>form {width: 100%;}
.asidebox>aside>nav ul {list-style: none;}

.newitem select,
.newitemval select {
    height: 30px;
    padding: 0.05em 0.5em;
}
.newitem, .newitemval {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 10px;
}

select:disabled {
    background-color: var(--line-medium);
}
.asidebox button:disabled {
    background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3));
    color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
    border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3));
}

#estlist {
    margin-top: 30px;
}
#estlist:not(:has(div))::after{
    content: "항목을 추가하세요";
    display: block;
    text-align: center;
    padding: 12px 0;
}
#estlist {
    overflow-x: auto;
    border: 1px solid black;
}
#estlist>span,
#estlist>div {
    display: block;
    min-width: 900px;
}
#estlist>span>span {
    display: block;
    float: left;
    padding: 5px 3px;
    width: calc((100% - 500px) / 6);
    text-align: center;
    font-weight: bold;
    background-color: var(--textlight);
    border-bottom: 2px solid var(--line-medium);
    border-right: 1px solid var(--line-medium);
}
#estlist>span>span[data] {width: 95px;}
#estlist>span>span:first-of-type {width:120px;}
#estlist>span>span:last-of-type,
#estlist>div>span:last-of-type {border-right: none;}
#estlist>span,
#estlist>div {overflow: auto;}
#estlist>div>span {
    display: block;
    float: left;
    padding: 5px 3px;
    width: calc((100% - 500px) / 6);
    height: 32px;
    border-bottom: 2px solid var(--line-medium);
    border-right: 1px solid var(--line-medium);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
#estlist>div>span[data] {width: 95px;}
#estlist>div>span[data]::before {
    content: attr(data);
    font-weight: bold;
    color: var(--maincolor);
    position: absolute;
    left: 7px;
}
#estlist>div>span>input {
    height: auto;
    padding: 0 2px;
    border-radius: 0;
    width: 100%;
    font-size: 0.9rem;
}
#estlist>div>span>select {
    height: 20px;
    padding: 0 2px;
    border-radius: 0;
    width: 100%;
    font-size: 0.9rem;
}
#estlist>div>span[data]>input {
    text-align: right;
}
#estlist>div>span:has(input) {
    padding: 4px 3px;
}
#estlist>div>span[data]>input:placeholder-shown {
    background-color: rgba(255,255,0, 0.5);
}
#estlist .cate1 {display: flex; align-items: center; gap:3px; min-width:120px;}
#estlist .ud {display: flex; flex-direction: column;}
#estlist .ud i {
    font-size: 0.5em;
}

#estlist .title>span {
    display: flex;
    width: 100%;
    border-top: 2px solid var(--text-gray);
    gap:3px;
    background-color: rgba(62, 119, 168, 0.2);
}
#estlist .title>span input {
    font-weight: bold;
}

.preset>div {display: none;}
.preset button img {height: 2.5rem;}

.paint {display: flex; gap: 15px; flex-direction: column; min-width: 30px; text-align: center;}
.paint input[type='checkbox'] {
    appearance: none;
    position: relative;
    border: max(2px, 0.1rem) solid gray;
    border-radius: 1.25rem !important;
    width: 2.25rem !important;
    height: 1.25rem !important;
}
.paint input[type='checkbox']::before {
    content: "";
    position: absolute;
    left: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;;
    transform: scale(0.8);
    background-color: gray;
    transition: left 250ms linear;
}
.paint input[type="checkbox"]:checked::before {
  background-color: white;
  left: 1rem;
}

.paint input[type="checkbox"]:checked {
  background-color: tomato;
  border-color: tomato;
}
.paint input[type="checkbox"]:focus-visible {
  outline-offset: max(2px, 0.1rem);
  outline: max(2px, 0.1rem) solid tomato;
}
.paint input[type="checkbox"]:enabled:hover {
  box-shadow: 0 0 0 max(4px, 0.2rem) lightgray;
}

#esttotal>div {
    display: flex;
    justify-content: flex-end;
}
#esttotal>div>span {
    width: 150px;
    text-align: right;
    border-bottom: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    padding-right: 0.5rem;
    font-weight: bold;
}
#esttotal>div>span:first-of-type {
    border-right: none;
    background-color: rgba(62, 119, 168, 0.2);
}

@media (max-width: 992px) {
    .asidebox>form {
        width: 100%;
    }
}
@media (max-width: 600px) {
    .inputgrp:not(:has([type=checkbox])):not(:has([type=radio])) {gap:5px}
    .newitem.inputgrp label,
    .newitemval.inputgrp label {
        display: flex !important;
        white-space: nowrap;
        gap: 5px;
        align-items: center;
    }
}