:root {
    --bs-body-color: #555555;
    --bs-emphasis-color: #555555;
}

body {
    font-family: Noto Sans JP;
    background-color: #f7f8fb;
}

#main {
    margin-left: 60px;
}

.d-none-no-important {
    display: none;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-zoom-in {
    cursor: zoom-in;
}

.cursor-zoom-out {
    cursor: zoom-out;
}

.tooltip-inner {
    max-width: 600px;
}

.card-header {
    padding: 1rem;
    background-color: #fff;
}

.card .card-title {
    font-size: 1.5rem !important;
}

.bi-icon-bold::before {
    font-weight: bold !important;
}

.btn-group:not(.dropdown) .btn:not([class*="btn-"]) {
    border: 1px solid #4d5a67;
}

.btn-link-inherit {
    --bs-btn-color: inherit !important;
    --bs-btn-hover-color: inherit !important;
    text-decoration: none !important;
    padding: 0 !important;
    font-size: inherit !important;
}

.btn-link-inherit:active {
    --bs-btn-color: inherit !important;
    background-color: inherit !important;
}

.btn-primary {
    --bs-btn-bg: #435ebe;
    --bs-btn-border-color: #435ebe;
    --bs-btn-hover-bg: #3950a2;
    --bs-btn-hover-border-color: #3950a2;
    --bs-btn-disabled-bg: #435ebe;
    --bs-btn-disabled-border-color: #435ebe;
}

.save-button {
    width: 80px;
}

.form-group-label-color {
    color: rgba(30, 25, 73, 0.7);
}

.form-control::placeholder,
.select2-search__field::placeholder {
    color: #b5b5b5;
}

.supplement-text {
    color: #a9a9a9;
}

/* ---------------------------------
    パスワード変更画面関連
---------------------------------- */
.password-change-remarks {
    color: #4798e7;
    font-weight: bold;
}

input[type="password"] + .input-group-text {
    background-color: #e9ecef;
}

#passwordForm .input-group-text {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    padding-bottom: 0.75rem;
}

#passwordForm .input-group-text i {
    color: #8c8f91;
}

.form-group[class*="has-icon-"] .form-control-icon {
    z-index: 100;
}

.form-group[class*="has-icon-"] .form-control-icon i:before,
.form-group[class*="has-icon-"] .form-control-icon svg:before {
    vertical-align: -0.125em !important;
}

/* ---------------------------------
    index画面関連
---------------------------------- */
.img-button-icon {
    object-fit: contain;
    /* position: absolute; */
    width: 100%;
    height: auto;
}

.square-content {
    display: block;
    height: 0;
    width: 100%;
    padding-bottom: 100%;
}

/* ---------------------------------
    サイドバー関連
---------------------------------- */
/* サイドバーの無いページ向けクラス */
.main_nosidebar {
    margin-left: 0px !important;
}

.img-radius {
    border-radius: 5px;
}

#sidebar:not(.active) ~ #main {
    margin-left: 60px;
}

#sidebar.active .sidebar-wrapper {
    opacity: 1;
    box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.5);
}

#sidebar:not(.active) .sidebar-wrapper {
    opacity: 0;
    z-index: -1;
    left: initial;
}

.sidebar-open-close {
    color: #435ebe;
}

.sidebar-wrapper {
    background-color: #f2f2f2;
    transition: all 0.2s;
    position: fixed;
}

.sidebar-wrapper .sidebar-header {
    padding: 0.5rem 2rem 1rem;
}

.sidebar-wrapper .sidebar-header img {
    height: initial;
    max-width: 275px;
    margin-left: -20px;
}

.sidebar-wrapper .sidebar-menu {
    overflow-y: auto;
    height: calc(100vh - 7.5rem);
}

.sidebar-wrapper .sidebar-menu .menu {
    margin-top: 0rem;
}

.sidebar-wrapper .sidebar-menu .menu .sidebar-link i {
    color: inherit;
}

/* 通常サイドバーにアイコンを入れる場合はこのスタイルを消す */
.sidebar-wrapper .sidebar-menu .menu .sidebar-link span {
    margin-left: 0rem;
    font-weight: 600;
}

.sidebar-wrapper .sidebar-footer {
    padding-top: 0.7rem;
    padding-right: 6rem;
}

.sidebar-wrapper .sidebar-footer .sidebar-link div {
    font-size: 1rem;
    font-weight: bold;
    color: #25396f;
}

.sidebar-wrapper .menu .sidebar-link:hover {
    background-color: #b5b5b5;
}

/* スリムサイドバー関連 */
.slim-sidebar-wrapper {
    width: 70px;
    height: 100%;
    background-color: #f2f2f2;
    position: fixed;
}

.slim-sidebar-wrapper .slim-sidebar-header {
    padding: 0.5rem 0.75rem 0.75rem 0.75rem;
}

.slim-sidebar-wrapper .slim-sidebar-header .sidebar-open-close {
    font-size: 2rem;
    padding-left: 0.5rem;
}

.slim-sidebar-wrapper .slim-sidebar-menu {
    overflow-y: auto;
    height: calc(100vh - 5.5rem);
}

.slim-sidebar-wrapper .slim-sidebar-footer {
    padding-bottom: 1rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 2rem;
}

.slim-sidebar-wrapper img {
    height: initial;
    width: 100%;
}

.slim-sidebar-wrapper .menu {
    padding: 0.5rem 0.75rem 0 0.75rem;
}

.slim-sidebar-wrapper .menu .slim-sidebar-item {
    padding-bottom: 1rem;
    list-style: none;
}
/* 見積方針検討記録一覧の文字が長いため、paddingを減らす */
#submenu-estimation-policy {
    padding-right: 1rem;
}

/* ---------------------------------
    アコーディオン関連
---------------------------------- */
.accordion-area {
    width: 96%;
    max-width: 900px;
    margin: 0 auto;
}

.accordion-area li {
    margin: 10px 0;
}

.accordion-area section {
    border: 1px solid #ccc;
}

/* ---------------------------------
    input関連
---------------------------------- */
/* input削除アイコン */
.condition-clear {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    width: 2rem;
    height: 2rem;
    padding: 0.25em;
    overflow: hidden;
    text-indent: 100%;
    white-space: nowrap;
    background: transparent
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23be0000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
        50%/0.75rem auto no-repeat;
    transform: translateY(-50%);
    border: none;
    font-size: 1em;
    z-index: 5;
}

textarea + .condition-clear {
    right: 1.25rem !important;
}

textarea[id*="Timeline"] + .condition-clear {
    right: 4.25rem !important;
}

.form-control-sm + .condition-clear:has(+ div.invalid-feedback) {
    top: 28% !important;
    right: 0.5rem !important;
}

input.form-control + div.invalid-feedback + .condition-clear {
    top: 30% !important;
}

input.form-control-sm + div.invalid-feedback + .condition-clear {
    top: 28% !important;
    right: 0.5rem !important;
}

textarea + div.invalid-feedback + .condition-clear {
    top: 38% !important;
}

.condition-clear:has(+ div.invalid-feedback) {
    top: 30% !important;
}

.condition-clear:has(+ span.input-group-text) {
    right: 2.5rem !important;
}

.condition-clear:has(+ span.input-group-text.char-2) {
    right: 3.5rem !important;
}

#subcategoryOtherDetail8 + .condition-clear {
    right: 0.5rem !important;
}

input.has-delete-button + .condition-clear {
    right: 4rem !important;
}

.form-control.is-invalid:has(+ button.condition-clear),
.form-control.is-invalid:has(+ div.invalid-feedback + button.condition-clear) {
    background-position: right calc(1.75em + 0.1875rem) center !important;
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
    padding-right: calc(1.5em + 1.75rem);
}

input.form-control.condition,
input.form-control.condition-calendar {
    padding-right: 1.75rem;
}

input.form-control-sm.condition,
input.form-control-sm.condition-calendar {
    padding-right: 1.5rem;
}

.input-group-sm > input.form-control.form-control-sm:has(+ button.condition-clear) {
    padding-right: 1.5rem !important;
}

/* input枠線 */
.condition,
.condition-calendar {
    border-radius: 0.375rem !important;
}

.condition:has(+ span.input-group-text),
.condition:has(+ button.condition-clear + span.input-group-text) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

select.form-select + .condition,
span.input-group-text + .condition {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.border-left-radius {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

.border-right-radius {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

/* ---------------------------------
    Select2スタイル上書き
---------------------------------- */
.select2 {
    width: 100% !important;
}

/* セレクトボックスの枠線 */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 0.375rem !important;
}

/* form-select-smのセレクトボックスの枠線 */
.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection {
    border-radius: 0.25rem !important;
}

/* セレクトボックス（マルチセレクト含む）を開いた時のborder調整 */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border: 1px solid #86b7fe;
    border-bottom: 1px solid #86b7fe !important;
}

/* マルチセレクトで選択されたアイテム */
.select2-selection__choice {
    background-color: #e7e7e7;
    line-height: 0.75;
}

/* マルチセレクトのinput全体・選択されたアイテムの削除アイコン */
.select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__rendered
    .select2-selection__choice
    .select2-selection__choice__remove,
.select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__rendered
    .select2-selection__choice
    .select2-selection__choice__remove:hover,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear:hover,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear:hover {
    background: transparent
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23be0000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
        50%/0.75rem auto no-repeat;
}

/* form-select-smのselect2に対するマルチセレクトのinput全体・選択されたアイテムの削除アイコン */
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__rendered
    .select2-selection__choice
    .select2-selection__choice__remove,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__rendered
    .select2-selection__choice
    .select2-selection__choice__remove:hover,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__clear,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__clear,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__clear:hover,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__clear:hover {
    background: transparent
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23be0000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
        50%/0.75rem auto no-repeat !important;
}

/* マルチセレクトの削除アイコン位置 */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear,
.form-select-sm
    ~ .select2-container--bootstrap-5
    .select2-selection--multiple
    .select2-selection__clear {
    right: 0.25rem;
    width: 2rem;
    height: 2rem;
}

/* セレクトボックスのoption部分 */
.select2-container--bootstrap-5
    .select2-dropdown
    .select2-results__options
    .select2-results__option {
    line-height: 1;
}

/* セレクトボックスのoption部分（全体） */
.select2-container--bootstrap-5 .select2-dropdown {
    box-shadow: 0px 1px 5px 1px rgba(0, 0, 0, 0.33) !important;
    border-radius: 0.75rem;
    border-color: #9aa3ae;
}

/* セレクトボックスのoption部分（全体・マルチセレクト用） */
.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection,
.select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below,
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* optgroup部分 */
.select2-container--bootstrap-5
    .select2-dropdown
    .select2-results__options
    .select2-results__option[role="group"]
    .select2-results__group {
    font-weight: 700;
    color: #003b9a;
}

/* マルチセレクトのテキスト検索部分 */
.select2-search__field {
    cursor: pointer;
}

/* ---------------------------------
    詳細画面関連  TODO detail.cssに移したい
---------------------------------- */
.detail-label {
    border-bottom: 1px solid #a3a3a3;
    padding: 0.2em 0.5em;
    border-left: solid 5px #435ebe;
}

.detail-title {
    color: white;
    font-size: 1.2rem;
    background: linear-gradient(90deg, #435ebe, white);
    padding-left: 10px;
    margin-bottom: 10px;
}

/* ---------------------------------
    設定画面関連
---------------------------------- */
.password-form .input-group-text i {
    color: #8c8f91;
}

/* ---------------------------------
    品質不具合事例 - 新規作成
---------------------------------- */
.input-headline {
    font-weight: 700;
    font-size: 1.2rem !important;
    color: rgba(35, 28, 99);
    border-left: 10px solid #435ebe;
    background-color: #e3e7f5;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.radiobutton-checkbox-with-textbox {
    padding-top: 0.15rem !important;
}

/* ---------------------------------
    bootstrap nav-underlineスタイル上書き
---------------------------------- */
.nav-underline {
    --bs-nav-underline-border-width: 0.15rem !important;
}

.nav-underline .nav-link.active,
.nav-underline .show > .nav-link {
    border-bottom-color: #e75c00 !important;
}

/* ---------------------------------
    プロフィール関連
---------------------------------- */
/* プロフィールボタン */
.profile-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
}

.profile-btn i {
    margin-right: 8px;
}

/* ドロップダウンメニュー */
.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #f7f8fb;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    width: 220px;
    display: none;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li {
    padding: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dropdown-menu li i {
    margin-right: 10px;
    color: #555;
}

.dropdown-menu li:hover {
    background: #eaecf4;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

/* クリック可能なリンク */
.dropdown-menu li a {
    color: #555;
}

.dropdown-header {
    font-weight: 900;
    color: #555;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #eaecf4;
}
