/* basemenu.css - ベースメニューのスタイル */

html {
    font-size: 16px;
    padding: 0px;
    margin: 0px;
    height: 100%;
}

header {
    width: 100%;
    height: 40px;
    margin: 0px !important;
    padding: 0px !important;
}

body {
    font-family: "Tahoma";
    height: 100%;
    background-color: #FFFFFF;
    padding: 0px;
    margin: 0px;
    overflow: hidden;
}

.app-viewport {
    height: 100vh;
    height: 100dvh;
}

#article {
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    float: none;
    clear: both;
    overflow: hidden;
    position: relative;
}

#modal_window_message {
    white-space: pre-line;
}

/* OSM Map area */

#mapid {
    height: 100%;
    z-index: 0;
}

.export-processing {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.35);
}

.export-processing-message {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: #ffffff;
    color: #212529;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* fade out */

#fadeLayer {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background-color: #000000;
    opacity: 0.5;
    display: none;
    z-index: 3000;
}

img {
    float: left;
    margin: 0px;
}

img.h1 {
    width: 30px;
    height: 30px;
    margin: 5px 5px 5px 5px;
}

img.iconx2 {
    width: 40px;
    height: 40px;
    margin: 2px;
}

h2.zoom {
    font-size: 16px;
    background-color: #ffffff80;
    padding: 10px;
}

div.search {
    height: 44px;
    border: 0px;
}

.menu {
    height: 30px;
    margin: 5px 0px;
    border: 0px;
    width: initial !important;
}

p {
    line-height: 1.5;
}

a.title {
    color: #213502;

}

a.title:hover {
    color: #20525C;
}

span.title {
    display: inline-block;
    font-size: 18px !important;
    font-weight: bold;
    padding: 0px 8px 0px 0px;
    margin: 0px 0px 0px 0px;
}

span.subtitle {
    display: inline-block;
    font-size: 12px !important;
    font-weight: bold;
    padding: 0px 4px 4px 0px;
}

span.icon {
    border-radius: 4px;
    margin-left: 2px;
    padding: 0px 2px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.5);
}

/* button for select way color */

.modal-dialog-fluid {
    max-width: inherit !important;
    max-height: 50% !important;
    width: 80% !important;
}

.modal-body {
    font-size: 14px !important;
    overflow-x: hidden;
}

.leaflet-div-icon {
    border: 0px !important;
}

input[type="search"] {
    font-size: 14px;
    display: inline-block;
    width: calc(180px - 4em);
}

table.dataTable tbody>tr.selected,
table.dataTable tbody>tr>.selected {
    background-color: #0274d880 !important;
}

.area_mask {
    padding: 0px;
    margin: 0px;
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    z-index: 799;
}

.dropshadow {
    filter: drop-shadow(3px 3px 5px cyan);
}

.icon-red {
    /* icon-redは最初に指定したクラス名 */
    filter: hue-rotate(150deg);
}

/* カスタムメニューのスタイル */
.customName {
    font-size: 80%;
    width: 64px;
    overflow: hidden;
    white-space: nowrap;
}

.input-hidden {
    width: 50px;
    height: 20px;
    display: inline-block;
    margin: 0px;
}

.colorPalette {
    width: 22px !important;
    height: 18px !important;
    margin: 1px !important;
    padding: 0px !important;
    border: 1px #FFFFFF !important;
    border-radius: 0px !important;
}

/* Color Pickerのサイズ指定 */
.alwan__swatches {
    max-height: 280px !important;
    padding: 10px 5px 0 5px !important;
}

.alwan__swatch {
    margin: 0 2px 5px 2px !important;

}

button,
select {
    display: inline-block;
    cursor: pointer;
    color: #000000;
    text-decoration: none;
    background-color: #F0F0FF;
    outline: none;
    border: none;
    border-radius: 2px;
    box-shadow: 0px 1px 1px #E0E0F0;
}

button:active {
    box-shadow: none;
    position: relative;
    top: 4px;
}

.comm_button {
    height: 46px;
    width: 204px;
    align-items: center;
}

.mini_button {
    height: 28px;
    width: 204px;
    align-items: center;
}

.half_button {
    margin: 0px 4px 6px 0px;
    padding: 0px 6px 0px 12px;
    height: 46px;
    width: 96px;
    align-items: center;
}

.del_button {
    margin: 2px 2px 2px 2px;
    padding: 0px 0px 0px 2px;
    width: 28px;
    height: 22px;
    margin-left: 4px;
}

.line_text {
    margin: 1px;
    padding: 0px;
    width: 48px;
    height: 20px;
    vertical-align: middle;
    border: #999;
    border-width: 1px;
    border-style: solid;
    text-align: right;
}

.drop_button {
    background-repeat: no-repeat;
    background-position: 8px center;
    padding: 4px 4px 4px 38px !important;
    margin: 2px 0px 2px 0px;
    background-repeat: no-repeat;
    background-size: 24px;
}

.bg-clear-old {
    width: 38px;
    height: 18px;
    background-position: 0px 0px, 8px 8px;
    background-size: 16px 16px;
    background-image: -webkit-linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc 100%), -webkit-linear-gradient(45deg, #ccc 25%, white 25%, white 75%, #ccc 75%, #eee 100%);
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc 100%), linear-gradient(45deg, #ccc 25%, white 25%, white 75%, #ccc 75%, #ccc 100%);
}

.bg-clear {
    background: transparent url("../image/transparent.png") !important;
}

.modal-dialog-fluid {
    max-width: inherit !important;
    width: 98% !important;
    margin-left: 8px !important;
}

img.icon_normal {
    background: url("../image/icon_circle.svg");
    background-size: cover;
    float: left;
    padding: 4px;
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.qr_code {
    border: 1px;
    border-style: solid;
}

/* 共通：flex子要素の高さ計算が崩れないように */
#editbar {
    position: relative;
    min-height: 0;
}

#article {
    min-height: 0;
}

#mapid {
    width: 100%;
    height: 100%;
}

.pane-menu {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 800;
    width: clamp(180px, var(--basemenu-width, 240px), calc(100% - 240px));
    height: 100%;
    min-height: 0;
    background: #faf8f8;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.2);
}

#basemenuResizeHandle {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    padding: 0;
    z-index: 1001;
    cursor: col-resize;
    touch-action: none;
}

#basemenuResizeHandle::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    height: 56px;
    transform: translateY(-50%);
    border: 1px solid #adb5bd;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: -1px 1px 4px rgba(0, 0, 0, 0.2);
}

#basemenuResizeHandle::after {
    content: "⋮";
    position: absolute;
    top: 50%;
    right: 1px;
    width: 10px;
    transform: translateY(-52%);
    color: #495057;
    font-size: 22px;
    line-height: 1;
    text-align: center;
}

#basemenuResizeHandle:hover::before,
body.is-resizing-basemenu #basemenuResizeHandle::before {
    border-color: rgb(0, 117, 58);
    background: rgb(224, 243, 233);
}

#basemenuResizeHandle:hover::after,
body.is-resizing-basemenu #basemenuResizeHandle::after {
    color: rgb(0, 117, 58);
}

body.is-resizing-basemenu,
body.is-resizing-basemenu * {
    cursor: inherit !important;
    user-select: none !important;
}

@media (min-width: 992px) {
    #mapid .leaflet-left {
        left: clamp(180px, var(--basemenu-width, 240px), calc(100% - 240px));
    }
}

#basemenu>.container-fluid {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#customMap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: flex-start;
}

/* モバイル：メニューを地図上部に重ね、ハンドルで高さだけを変更 */
@media (max-width: 991.98px) {
    .pane-menu {
        height: clamp(120px, var(--basemenu-height, 240px), calc(100% - 160px)) !important;
        width: 100%;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    #mapid .leaflet-top {
        top: clamp(120px, var(--basemenu-height, 240px), calc(100% - 160px));
    }

    #basemenuResizeHandle {
        top: auto;
        right: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 12px;
        cursor: row-resize;
    }

    #basemenuResizeHandle::before {
        top: auto;
        right: auto;
        bottom: 0;
        left: 50%;
        width: 56px;
        height: 12px;
        transform: translateX(-50%);
        border: 1px solid #adb5bd;
        border-bottom: 0;
        border-radius: 8px 8px 0 0;
        box-shadow: 1px -1px 4px rgba(0, 0, 0, 0.2);
    }

    #basemenuResizeHandle::after {
        content: "⋯";
        top: -8px;
        right: auto;
        left: 50%;
        width: 40px;
        transform: translateX(-50%);
    }

    a.title {
        display: flex;
        align-items: center;
        min-width: 0;
        margin-left: 8px;
    }

    a.title img,
    .subtitle {
        display: none !important;
    }
}

.rough-controls {
    text-align: left;
}

.rough-controls .form-switch .form-check-input {
    width: 2.5em;
    cursor: pointer;
}

.rough-range {
    height: 18px;
    margin-bottom: 3px;
}

.rough-fill-select {
    flex: 0 0 125px;
    width: 125px;
    min-width: 0;
}

.rough-preview-window {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.leaflet-rough-preview-pane {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.rough-preview {
    width: 100%;
    height: 100%;
}

.rough-preview svg {
    display: block;
    width: 100%;
    height: 100%;
}

.rough-preview-status {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    padding: 8px 12px;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #444;
    font-size: 14px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}
