/* PBI-132 — Modal 路線/駅 style, CLONED from list-search-box.css but SCOPED to
   #modalLine / #modalStation only, so it never leaks into mypage/form CSS.
   Rules kept in original source order to preserve the cascade. */

/* ---- modal frame ---- */
:is(#modalLine, #modalStation) .modal-dialog {
    max-width: 1100px;
    padding-right: 15px;
}
:is(#modalLine, #modalStation) .modal-title {
    font-size: 32px;
}
:is(#modalLine, #modalStation) .modal-subtitle {
    font-size: 22px;
    font-weight: 500;
    margin-top: -20px;
    margin-bottom: 10px;
}
:is(#modalLine, #modalStation) .modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    border-bottom: 5px solid #c8c8c8;
    border-top-left-radius: calc(.3rem - 1px);
    border-top-right-radius: calc(.3rem - 1px);
    margin: 15px 30px;
    padding: 10px 0 10px 10px;
}
:is(#modalLine, #modalStation) .modal-body {
    position: relative;
    flex: 1 1 auto;
    margin: 10px 15px 10px 25px;
}
:is(#modalLine, #modalStation) .modal-content {
    border-radius: 0;
    border: solid 2px #969696;
}
:is(#modalLine, #modalStation) .close-modal-anhtt {
    background: unset;
    border: none;
    padding-right: 0;
}
:is(#modalLine, #modalStation) .close-modal-anhtt span {
    font-size: 35px;
    font-weight: 500;
    color: #808080;
}

/* ---- line/station groups ---- */
:is(#modalLine, #modalStation) .line-group-title:first-of-type {
    margin-top: 0;
}
:is(#modalLine, #modalStation) .line-group-title {
    font-weight: 500;
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: 15px;
    margin-bottom: 5px;
}
:is(#modalLine, #modalStation) .line-group-title.station-group-title {
    margin-bottom: 10px;
}
:is(#modalLine, #modalStation) .lines-list {
    display: flex;
    flex-wrap: wrap;
}
:is(#modalLine, #modalStation) .lines-list.lines-staion-list {
    padding-left: 25px;
}
:is(#modalLine, #modalStation) .lines-list label.container-checkbox {
    width: 25%;
    margin-bottom: 10px;
}
:is(#modalLine, #modalStation) .lines-all {
    max-height: 480px;
    overflow: auto;
}

/* ---- checkbox / checkmark ---- */
:is(#modalLine, #modalStation) .container-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 25%;
    margin-bottom: 1rem;
}
:is(#modalLine, #modalStation) .container-checkbox input {
    display: none;
}
:is(#modalLine, #modalStation) .checkmark {
    position: relative;
    height: 25px;
    width: 25px;
    background: white;
    border: 3.5px #ffc811 solid;
    border-radius: 3px;
    margin-bottom: 0;
    margin-right: 0.4rem;
    flex-shrink: 0;
}
:is(#modalLine, #modalStation) .checkmark {
    height: 20px;
    width: 20px;
    background: white;
    border: 2px #969696 solid;
    border-radius: 0;
}
:is(#modalLine, #modalStation) .container-checkbox {
    font-size: 14px;
    width: 100%;
    margin-bottom: 0;
    font-weight: 300;
}
:is(#modalLine, #modalStation) .container-checkbox .checkmark:after {
    position: absolute;
    left: 5px;
    top: -1px;
    width: 8px;
    height: 16px;
    border: solid white;
    border-width: 0px 3px 4px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    content: "";
    display: none;
}
:is(#modalLine, #modalStation) .container-checkbox input:checked ~ .checkmark:after {
    display: block;
}
:is(#modalLine, #modalStation) .container-checkbox input:checked ~ .checkmark {
    background-color: #fff !important;
}
:is(#modalLine, #modalStation) .container-checkbox .checkmark:after {
    position: absolute;
    left: 5px;
    top: 0px;
    width: 6px;
    height: 14px;
    border: solid #969696;
    border-width: 0px 3px 4px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    content: "";
}

/* ---- submit buttons ---- */
:is(#modalLine, #modalStation) .device-submit-area {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 30px;
}
:is(#modalLine, #modalStation) .device-submit-area button {
    background: #ffdc3c;
    border-radius: 5px;
    line-height: 70px;
    cursor: pointer;
    border: none;
    padding: 0 60px;
    font-weight: 600;
    font-size: 20px;
    color: #323232;
    margin-right: 10px;
    margin-left: 10px;
}
:is(#modalLine, #modalStation) .device-submit-area button.goto {
    border: 3px solid #c8c8c8;
    border-radius: 5px;
    line-height: 64px;
    cursor: pointer;
    padding: 0 60px;
    font-weight: 500;
    font-size: 20px;
    color: #323232;
    background: none;
    position: relative;
}
:is(#modalLine, #modalStation) .device-submit-area button.goto::before {
    position: absolute;
    content: "";
    width: 2px;
    height: 22px;
    background-color: #c8c8c8;
    top: 21px;
    right: 25px;
}
:is(#modalLine, #modalStation) .device-submit-area button.goto::after {
    position: absolute;
    content: "";
    width: 24px;
    height: 2px;
    background-color: #c8c8c8;
    top: 31px;
    right: 15px;
}

/* ---- mobile ---- */
@media (max-width: 765px) {
    :is(#modalLine, #modalStation) .checkmark {
        position: relative;
        height: 18px;
        width: 18px;
        background: white;
        border: 2px #969696 solid;
        border-radius: 0;
    }
    :is(#modalLine, #modalStation) .device-submit-area {
        text-align: center;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    :is(#modalLine, #modalStation) .device-submit-area button {
        background: #ffdc3c;
        border-radius: 5px;
        line-height: 55px;
        cursor: pointer;
        border: none;
        padding: 0 15px;
        font-weight: 500;
        font-size: 14px;
        color: #323232;
    }
    :is(#modalLine, #modalStation) .device-submit-area.device-submit-area-2 {
        display: flex;
        justify-content: space-between;
    }
    :is(#modalLine, #modalStation) .device-submit-area.device-submit-area-2 button {
        width: 48%;
        padding: 0;
        margin-right: 0;
        margin-left: 0;
    }
    :is(#modalLine, #modalStation) .device-submit-area.device-submit-area-2 button.goto {
        border: 2px solid #c8c8c8;
        border-radius: 5px;
        line-height: 51px;
        cursor: pointer;
        font-weight: 500;
        font-size: 14px;
        color: #323232;
        background: none;
        position: relative;
    }
    :is(#modalLine, #modalStation) .device-submit-area button.goto::after {
        position: absolute;
        content: "";
        width: 19px;
        height: 2px;
        background-color: #c8c8c8;
        top: 24px;
        right: 9px;
    }
    :is(#modalLine, #modalStation) .device-submit-area button.goto::before {
        position: absolute;
        content: "";
        width: 2px;
        height: 18px;
        background-color: #c8c8c8;
        top: 16px;
        right: 17px;
    }
}
