:root {
    --ksgreen: #392;
    --kanen-color: #f45;
    --hunen-color: #392;
    --shigen-color: #58f;
    --huka-color: #d8e;
}

/* 要素スタイルの初期化 */
body {
    min-width: 370px;
    height: 100vh;
    height: 100svh;
    margin: 0;
    padding: 0;
    font-family: "Yuu Gosic", sans-serif;
    line-height: 1.5em;
    background-color: silver;
    overflow: hidden;
}
nav, article, section {
    display: block;
    margin: 0;
    padding: 0;
}
ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, p {
    margin: 0;
    padding: 0;
    font-size: medium;
    font-weight: normal;
    font-style: normal;
}
input, select {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    font-size: medium;
    border: none;
    border-radius: 0;
    outline: none;
    padding: 0;
    margin: 0;
    background-color: white;
}

/* ヘッダー */
.header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
    padding: 0 16px;
    background-color: var(--ksgreen);
    height: 48px;
    box-sizing: border-box;
}
.header-title {
    font-family: 'HG丸ｺﾞｼｯｸM-PRO', 'ヒラギノ丸ゴ ProN';
    font-size: 24px;
    font-weight: bold;
    line-height: 48px;
    padding-left: 40px;
}
.header-title::before {
    content: '柏原市';
    position: absolute;
    font-size: 10px;
    font-weight: normal;
    width: 48px;
    left: 10px;
    line-height: 10px;
    text-align: center;
    padding-top: 34px;
    background-image: url(icon/city-emblem.svg);
    background-size: 28px;
    background-position: 8px 4px;
    background-repeat: no-repeat;
}

/* メニュー */
.header-menu-item {
    color: white;
    line-height: 28px;
    padding: 8px 0 8px 44px;
    margin: 8px;
    transition-property: background-color, opacity;
    transition-duration: 100ms;
    transition-timing-function: ease-in-out;
    background-size: 28px;
    background-repeat: no-repeat;
    background-position: 8px 50%;
    border-style: solid;
    border-color: transparent;
    border-width: 0 0 0 3px;
    cursor: pointer;
    opacity: 0.9;
}
.header-menu-item--catalog {
    background-image: url(icon/menu-book.svg);
}
.header-menu-item--calendar {
    background-image: url(icon/today.svg);
}
.header-menu-item--place {
    background-image: url(icon/pin-drop.svg);
}
.header-menu-item--help {
    background-image: url(icon/help.svg);
}
.header-menu-item--gsi {
    display: none;
}
.header-menu-item:hover {
    background-color: darkgreen;
    opacity: 1;
}
.header-menu-item--selected,
.header-menu-item--selected:hover {
    background-color: inherit;
    border-color: white;
    opacity: 1;
}
/* menu ボタン */
.header-menu-button {
    cursor: pointer;
    font-size: 10px;
    text-align: center;
    line-height: 10px;
    width: 40px;
    padding-top: 26px;
    padding-bottom: 4px;
    margin-top: 4px;
    border-radius: 50%;
    background-image: url(icon/menu.svg);
    background-size: 30px;
    background-position: 50% 2px;
    background-repeat: no-repeat;
    transition-property: background-color;
    transition-duration: 100ms;
    transition-timing-function: ease-in;
}
.header-menu-button:hover,
.header-menu-button--active {
    background-color: darkgreen;
}

/* ダイアログ 基本スタイル */
.dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: #fff;
    border: 1px solid silver;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 4px 2px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition-property: opacity, visibility;
    transition-delay: 0s, 100ms, 100ms;
    transition-duration: 100ms, 0s, 0s;
    transition-timing-function: ease-in-out;
}
.dialog--show {
    opacity: 1;
    visibility: visible;
}
.dialog-content {
    overflow: auto;
    max-height: 80vh;
    border-top: 30px solid dimgray;
    padding: 8px 16px;
}
.dialog-close {
    position: fixed;
    top: 0;
    right: 0;
    font-size: 12px;
    padding: 6px 8px 6px 24px;
    line-height: 18px;
    cursor: pointer;
    color: whitesmoke;
    background-color: dimgray;
    transition-property: background-color;
    transition-duration: 100ms;
    transition-timing-function: ease-in;
}
.dialog-close:hover {
    color: white;
    background-color: black;
}
.dialog-close::before,
.dialog-close::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 12px;
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background-color: whitesmoke;
}
.dialog-close::before {
    transform: rotate(45deg);
}
.dialog-close::after {
    transform: rotate(135deg);
}
.dialog-close:hover::before,
.dialog-close:hover::after {
    background-color: white;
}

/* dismiss ダイアログ表示時の背景 */
.menu-dismiss,
.dialog-dismiss {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    background-color: black;
    transition: 100ms ease-in-out;
    opacity: 0;
    z-index: -1;
}
.menu-dismiss--show,
.dialog-dismiss--show {
    opacity: 0.1;
    z-index: 90;
}

/* コンテンツコンテナ */
.main {
    height: calc(100vh - 48px);
    height: calc(100svh - 48px);
    overflow: hidden;
    background-color: white;
    position: relative;
}
.content {
    height: 100%;
    display: none;
}
.content.content--show {
    display: block;
}

/* 画面幅 500px 以下 */
@media (max-width: 500px){
    
    .header-menu {
        display: block;
        position: absolute;
        top: 44px;
        right: 8px;
        width: calc(4em + 100px);
        background-color: green;
        border: 1px solid silver;
        visibility: hidden;
        z-index: -1;
    }
    .header-menu--show {
        visibility: visible;
        z-index: 100;
    }
}

/* 画面幅 501px 以上 */
@media (min-width: 501px) {

    .header-menu-button {
        display: none;        
    }
    .header-menu {
        display: flex;
        justify-content: flex-end;
    }
    .header-menu-item {
        width: 4em;
        margin: 0;
        padding: 28px 8px 3px;
        text-align: center;
        font-size: 10px;
        line-height: 12px;
        background-size: 28px;
        background-position: 50% 0;
        border-width: 4px 0 0;
    }
    .header-menu-item--selected,
    .header-menu-item--selected:hover {
        background-color: inherit;
        border-color: white;
        opacity: 1;
    }
}

/* 画面幅 801px 以上（501px 以上のスタイルに上書き） */
@media (min-width: 701px) {

    .header-menu-item {
        font-size: medium;
        text-align: left;
        line-height: 1em;
        width: auto;
        line-height: 44px;
        padding: 0 16px 0 40px;
        margin: 0;
        background-position: 8px 6px;
    }
}

.help {
    box-sizing: border-box;
    overflow: auto;
}
.help a {
    word-break: break-word;
}
.help section {
    margin: 16px;
}
.help section section {
    margin: 16px 0;
}
.help h2 {
    font-family: 'HG丸ｺﾞｼｯｸM-PRO', 'ヒラギノ丸ゴ ProN';
    font-weight: bold;
    font-size: larger;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid silver;
}
.help h3 {
    font-family: 'HG丸ｺﾞｼｯｸM-PRO', 'ヒラギノ丸ゴ ProN';
    font-weight: bold;
    padding-left: 8px;
    border-left: 4px solid dimgray;
}
.help ul li {
    padding-left: 18px;
    margin-bottom: 8px;
    position: relative;
}
.help ul li::before {
    content: '';
    position: absolute;
    top: calc(0.5em);
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: dimgray;
}
.help .help-footer {
    font-size: 90%;
    color: #333;
    font-style: normal;
    margin: 0;
    padding: 32px 16px;
    background-color: #eee;
    display: flex;
    flex-direction: column;
}
.inquiry-title {
    font-weight: bold;
    margin-bottom: 8px;
    border-bottom: 1px solid gray;
}
.inquiry-link {
    font-weight: bold;
}

/* filter */
.catalog-filter {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 5;
    box-sizing: border-box;
    height: 48px;
    padding-left: 16px;
    background-color: var(--ksgreen);
}
.catalog-filter-label {
    width: 60px;
    height: 40px;
    background-color: white;
    background-image: url(icon/search.svg);
    background-position: 50%;
    background-size: 28px;
    background-repeat: no-repeat;
    border-radius: 20px 0 0 20px;
}
.catalog-filter-input {
    position: relative;
    line-height: 40px;
    width: 240px;
    box-sizing: border-box;
}
.catalog-filter-input::placeholder {
    color: royalblue;
    opacity: 1;
} 
.catalog-filter-clear {
    position: relative;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 0 20px 20px 0;
}
.catalog-filter-clear::before,
.catalog-filter-clear::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 16px;
    z-index: 1;
    width: 3px;
    height: 20px;
    background-color: #333;
    border-radius: 2px;
}
.catalog-filter-clear::before {
    transform: rotate(45deg);
}
.catalog-filter-clear::after {
    transform: rotate(135deg);
}
.catalog-filter-clear--hidden::before,
.catalog-filter-clear--hidden::after {
    display: none;
}

/* 品目リスト */
.catalog-list {
    position: absolute;
    top: 48px;
    left: 1.8em;
    bottom: 0;
    right: 0;
    z-index: 1;
    padding: 8px;
    overflow-y: scroll;
}
.catalog-list-item {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid silver;
}
.catalog-list-item:hover {
    background-color: whitesmoke;
}
.catalog-list-item--hidden {
    display: none;
}
.catalog-list-item-name {
    margin-bottom: 8px;
    font-size: large;
}
.catalog-list-item-sort {
    position: absolute;
    bottom: 16px;
    font-size: small;
    font-weight: bold;
    color: white;
    padding: 0 8px;
    border-radius: 2px;
}
.catalog-list-item-sort--kanen {
    background-color: var(--kanen-color);
}
.catalog-list-item-sort--hunen {
    background-color: var(--hunen-color);
}
.catalog-list-item-sort--shigen {
    background-color: var(--shigen-color);
}
.catalog-list-item-sort--huka {
    background-color: var(--huka-color);
}
.catalog-list-item-description {
    font-size: small;
    height: 1.5rem;
    margin-left: 80px;
    color: #888;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* かなスクロールボタン */
.catalog-scroller {
    position: absolute;
    top: 60px;
    left: 8px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 70px);
    max-height: 20em;
}
.catalog-scroller-item {
    color: gray;
    text-align: center;
    width: 1.4em;
    height: 1.4em;
    border-radius: 50%;
    transition-property: background-color, color;
    transition-duration: 100ms;
    transition-timing-function: ease-in;
}
.catalog-scroller-item--current {
    color: white;
    background-color: green;
}
.catalog-scroller--disabled .catalog-scroller-item {
    color: silver;
    background-color: transparent;
}

/* ダイアログの品目詳細 */
.dialog-catalog-name {
    font-size: larger;
    font-weight: bold;
    padding: 8px 0;
}
.dialog-catalog-sort {
    display: inline-block;
    color: #333;
    font-weight: bold;
    margin: 8px 0;
    padding: 0 8px;
    border-width: 3px;
    border-style: solid;
    border-color: silver;
    border-radius: 3px;
}
.dialog--kanen .dialog-content,
.dialog-catalog-sort--kanen {
    border-color: var(--kanen-color);
}
.dialog--hunen .dialog-content,
.dialog-catalog-sort--hunen {
    border-color: var(--hunen-color);
}
.dialog--shigen .dialog-content,
.dialog-catalog-sort--shigen {
    border-color: var(--shigen-color);
}
.dialog--huka .dialog-content,
.dialog-catalog-sort--huka {
    border-color: var(--huka-color);
}
.dialog-catalog-description,
.dialog-catalog-recycle,
.dialog-catalog-link {
    margin-bottom: 16px;
}
.dialog-catalog-recycle-title {
    margin-bottom: 8px;
    padding-left: 28px;
    border-bottom: 1px solid silver;
    background-image: url(icon/recycling.svg);
    background-size: 24px;
    background-position-y: 50%;
    background-repeat: no-repeat;
}
.dialog-catalog-link {
    display: block;
    position: relative;
    padding-left: 16px;
}
.dialog-catalog-link::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 2px;
    border: 1px solid transparent;
    border-left-color: silver;
    border-width: 5px 0 5px 8px;
}

@media (min-width: 800px) {
    .catalog-filter {
        padding-left: calc((100% - 780px) / 2);
    }
    .catalog-list-item {
        box-sizing: border-box;
        max-width: 760px;
        margin-left: calc((100% - 800px) / 2 + 40px);
        margin-right: calc((100% - 800px) / 2);
    }
    .catalog-scroller {
        left: calc((100% - 780px) / 2);
    }
}
/* コンテンツ */
.calendar {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    overflow: auto;
    padding: 8px;
}

/* 地区選択 */
.calendar-area {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: content-box;
    width: 300px;
    line-height: 40px;
    margin: 0 auto 16px;
    background-color: white;
    border: 1px solid silver;
    border-radius: 20px;
    overflow: hidden;
}
.calendar-area-label {
    flex-grow: 0;
    padding: 0 16px;
    color: royalblue;
    border-right: 1px solid silver;
}
.calendar-area-label::before,
.calendar-area-label::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: transparent;
}
.calendar-area-label::before {
    top: 12px;
    right: 16px;
    border-width: 0px 4px 7px 4px;
    border-bottom-color: #333;
}
.calendar-area-label::after {
    top: 22px;
    right: 16px;
    border-width: 7px 4px 0px 4px;
    border-top-color: #333;
}
.calendar-area-select {
    flex-grow: 1;
    padding: 0 16px;
}
.calendar-area-item--selected {
    background-color: whitesmoke;
    font-weight: bold;
}

/* 年月コントロール */
.calendar-control {
    width: 300px;
    height: 40px;
    margin: 16px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: large;
}
.calendar-control-prev,
.calendar-control-next {
    position: relative;
    height: 40px;
    width: 40px;
    border: 1px solid silver;
    border-radius: 50%;
}
.calendar-control-prev::before,
.calendar-control-prev::after,
.calendar-control-next::before,
.calendar-control-next::after {
    content: '';
    position: absolute;
    z-index: 1;
    width: 3px;
    height: 15px;
    background-color: #333;
}
.calendar-control-prev::before {
    left: 18px;
    top: 8px;
    transform: rotate(45deg);
}
.calendar-control-prev::after {
    left: 18px;
    top: 17px;
    transform: rotate(315deg);    
}
.calendar-control-next::before {
    left: 20px;
    top: 8px;
    transform: rotate(315deg);
}
.calendar-control-next::after {
    left: 20px;
    top: 17px;
    transform: rotate(45deg);
}
.calendar-control-prev:hover,
.calendar-control-next:hover {
    background-color: whitesmoke;
}
.calendar-control-year {
    margin-left: 28px;
}
.calendar-control-month {
    font-size: larger;
    margin-right: 28px;
}

/* カレンダーテーブル */
.calendar-table {
    border-collapse: collapse;
    margin: 8px auto;
    width: 100%;
    max-width: 600px;
}
.calendar-table-header {
    border-top: 1px solid gray;
    border-bottom: 1px solid gray;
}
.calendar-table-day {
    width: calc(100% / 7);
    opacity: 0.8;
}
.calendar-table-row {
    border-bottom: 1px solid gray;
}
.calendar-table-date {
    text-align: center;
    vertical-align: top;
}
.calendar-table-day--sun,
.calendar-table-date--sun {
    color: red;
}
.calendar-table-day--sat,
.calendar-table-date--sat {
    color: blue;
}
.calendar-table-date--alt {
    opacity: 0.5;
}
.calendar-table-date-num,
.calendar-table-date-sort {
    display: block;
    margin: 4px auto;
}
.calendar-table-date--today .calendar-table-date-num {
    font-weight: bold;
    text-decoration: underline;
}
.calendar-table-date-sort {
    font-size: smaller;
    color: white;
    width: 3em;
    background-color: silver;
    border-radius: 3px;
}
.calendar-table-date-sort--kanen {
    background-color: var(--kanen-color);
}
.calendar-table-date-sort--hunen {
    background-color: var(--hunen-color);
}
.calendar-table-date-sort--shigen {
    background-color: var(--shigen-color);
}

/* 種類選択 */
.place-category {
    position: absolute;
    top: 8px;
    left: calc(50% - 170px);
    z-index: 2;
    display: flex;
    align-items: stretch;
    box-sizing: content-box;
    width: 340px;
    line-height: 40px;
    background-color: white;
    border: 2px solid silver;
    border-radius: 20px;
    overflow: hidden;
}
.place-category-label {
    flex-basis: 60px;
    text-align: center;
    color: royalblue;
    border-right: 1px solid silver;
}
.place-category-label::before,
.place-category-label::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: transparent;
}
.place-category-label::before {
    top: 12px;
    right: 70px;
    border-width: 0px 4px 7px 4px;
    border-bottom-color: #333;
}
.place-category-label::after {
    top: 22px;
    right: 70px;
    border-width: 7px 4px 0px 4px;
    border-top-color: #333;
}
.place-category-select {
    flex-grow: 1;
    padding: 0 16px;
}
.place-category-item--selected {
    background-color: whitesmoke;
    font-weight: bold;
}
/* 一覧表示ボタン */
.place-category-list {
    flex-basis: 60px;
    font-size: 10px;
    text-align: center;
    box-sizing: content-box;
    line-height: 10px;
    padding-top: 28px;
    background-color: white;
    background-image: url(icon/manage-search.svg);
    background-size: 28px;
    background-repeat: no-repeat;
    background-position: 50% 2px;
    border-left: 1px solid silver;
    border-radius: 0 20px 20px 0;
    transition-property: background-color;
    transition-duration: 100ms;
    transition-timing-function: ease-in;
    cursor: default;
}
.place-category-list:hover {
    background-color: whitesmoke;
}

/* ダイアログの場所一覧 */
.dialog-place-item {
    padding: 4px 8px 4px 40px;
    border-bottom: 1px solid silver;
    background-image: url(icon/pin-drop-black.svg);
    background-size: 24px;
    background-position: 8px 50%;
    background-repeat: no-repeat;
}
.dialog-place-item:hover {
    background-color: whitesmoke;
}

/* 地図描写エリア */
.place-map {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}
.place-map input {
    appearance: auto;
}

/* Leaflet Popup */
.leaflet-popup-content .place-popup-name,
.leaflet-popup-content .place-popup-address,
.leaflet-popup-content .place-popup-tel,
.leaflet-popup-content .place-popup-description,
.leaflet-popup-content .place-popup-link {
    margin: 0 0 8px;
}
.leaflet-popup-content .place-popup-address,
.leaflet-popup-content .place-popup-tel,
.leaflet-popup-content .place-popup-description,
.leaflet-popup-content .place-popup-link {
    font-size: small;
}
.leaflet-popup-content .place-popup-name {
    font-weight: bold;
    border-bottom: 1px solid silver;
}
.leaflet-popup-content .place-popup-address-attr,
.leaflet-popup-content .place-popup-tel-attr {
    padding-right: 8px;
}
.leaflet-popup-content .place-popup-link {
    padding-left: 12px;
    position: relative;
}
.leaflet-popup-content .place-popup-link::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 2px;
    border: 1px solid transparent;
    border-left-color: silver;
    border-width: 4px 0 4px 6px;
}
/* 種類選択 */
.gsi-overlay {
    position: absolute;
    top: 8px;
    left: calc(50% - 100px);
    z-index: 2;
    display: flex;
    align-items: stretch;
    box-sizing: content-box;
    width: 200px;
    line-height: 40px;
    background-color: white;
    border: 2px solid silver;
    border-radius: 20px;
    overflow: hidden;
}
.gsi-overlay-label {
    flex-basis: 60px;
    text-align: center;
    color: royalblue;
    border-right: 1px solid silver;
}
.gsi-overlay-label::before,
.gsi-overlay-label::after {
    content: '';
    position: absolute;
    right: 16px;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: transparent;
}
.gsi-overlay-label::before {
    top: 12px;
    border-width: 0px 4px 7px 4px;
    border-bottom-color: #333;
}
.gsi-overlay-label::after {
    top: 22px;
    border-width: 7px 4px 0px 4px;
    border-top-color: #333;
}
.gsi-overlay-select {
    flex-grow: 1;
    padding: 0 16px;
}
.gsi-overlay-item--selected {
    background-color: whitesmoke;
    font-weight: bold;
}

/* 地図表示エリア */
.gsi-map {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}
.gsi input {
    appearance: auto;
}

/* Add 2022.08.17 */
/* Javascript 動作確認 */
.disable-massage {
    margin: 16px;
}
.disable-massage p {
    font-size: xx-large;
    line-height: 2em;
}