/* 作成者：末松 */

/* ステータス表示エリア */
.status-area {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-right: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
}

.status-label {
    font-size: 10px;
    color: #666;
    margin-bottom: 2px;
}

.status-text {
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    min-width: 88px;
    text-align: center;
}

/* ステータスセレクトボックス */
.status-select {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    min-width: 88px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 24px;
}

/* 選択肢表示時のスタイル */
.status-select option {
    background-color: white !important;
    color: #333333 !important;
    padding: 8px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 739px) {
    .status-area {
        gap: 5px;
        margin-right: 5px;
    }
    
    .status-item {
        font-size: 10px;
    }
    
    .status-label {
        font-size: 8px;
    }
    
    .status-text {
        padding: 2px 4px;
        font-size: 10px;
        min-width: 68px;
    }
    
    .status-select {
        padding: 2px 4px;
        font-size: 10px;
        min-width: 68px;
        padding-right: 20px;
        background-size: 10px;
        background-position: right 4px center;
    }
    
    .contractor-btn {
        padding: 0 8px;
        margin: 0 10px 0 0;
        font-size: 10px !important;
        height: 38px !important;
        width: 68px;
    }
    
    /* ヘッダー右側の配置調整 */
    .head-area.type01 .right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .head-area.type01 .right .user-img {
        margin-left: auto;
    }
}

.chat-main-body {
    background-color: #d9d8d8;
    padding: 8px 15px;
    position: relative;
    border-radius: 0 0 20px 20px;
    flex-grow: 1;
}

.chat-header-menu {
    color: #fff;
    background: #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}
@media screen and (max-width: 739px)
{
    .chat-header-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}
.chat-search-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#chat-search-form {
    display: flex;
    align-items: space-between;
    width: 100%;
    border: none;
    padding: 5px 0;
}
#chat-search-input {
    border: none;
    border-radius: 5px 0 0 5px;
}
@media screen and (max-width: 739px)
{
    #chat-search-input {
        font-size: 12px;
    }
}
#chat-search-btn {
    background: #F1EDE7;
    border: none;
    padding: 5px 10px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.chat-area {
    overflow-y: auto;
    border-bottom: 1px solid #d9d8d8;
    padding-bottom: 24px;
    max-height: calc(100vh - 255px);
    position: relative;
}
@media screen and (max-width: 1000px)
{
    .chat-area {
        padding-bottom: 70px;
        /* max-height: calc(100vh - 336px); */
    }
}

.chat-name {
    margin: 0 5px;
}
.chat-name a {
    color: black;
    text-align: left;
    border: none !important;
}

.chat-customer,
.chat-me-text {
    font-size: 14px;
    margin: 5px 0 3px 0;
}
.chat-customer img {
    width: 36px;
    border-radius: 50%;
}
.chat-text,
.chat-me-text {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
    position: relative;
}
.chat-text {
    margin-left: 40px;
}
.chat-me-text {
    justify-content: flex-end;
    margin-right: 16px;
}
.chat-text-detail,
.chat-me-text-detail {
    border-radius: 10px;
    padding: 10px 10px;
    line-height: 1.3;
    border: none;
    max-width: calc(60ch);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    z-index: 1;
}
.chat-text-detail {
    background: #fff;
}
.chat-me-text-detail {
    font-size: 16px;
    background: #ffeea2;
}
.chat-text-detail a,
.chat-me-text-detail a {
    background-color: transparent !important;
}
@media screen and (max-width: 739px)
{
    .chat-text-detail,
    .chat-me-text-detail {
        font-size: 13px;
        max-width: calc(30ch);
    }
}

.chat-text img {
    position: absolute;
    top: -3px;
    left: -6px;
    width: 26px;
    height: auto;
}
.chat-text a,
.chat-me-text a {
    font-size: 16px;
    z-index: 1;
    color: blue;
    text-decoration: underline;
    max-width: calc(60ch);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.chat-text a {
    background: #fff;
    border-radius: 14px 10px 10px 10px;
}
.chat-me-text a {
    background: #ffeea2;
    border-radius: 10px 14px 10px 10px;
}
@media screen and (max-width: 739px)
{
    .chat-text a,
    .chat-me-text a {
        font-size: 13px;
        max-width: calc(40ch);
    }
}
.chat-me-text img {
    position: absolute;
    top: -3px;
    right: -6px;
    width: 26px;
    height: auto;
    z-index: 0;
}

.chat-file-info,
.chat-me-file-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 5px;
    line-height: 1.1;
    padding-bottom: 2px;
    position: relative;
    background: transparent !important;
}
.chat-file-info {
    background: #fff;
}
.chat-me-file-info {
    background: #ffeea2;
}

.chat-text .chat-file-info + img,
.chat-me-text .chat-me-file-info + img {
    display: none;
}

.chat-file-info .file-info-overlay,
.chat-me-file-info .file-info-overlay {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.2;
    z-index: 2;
    text-align: right;
    white-space: nowrap;
}

.chat-file-info span,
.chat-me-file-info span {
    display: none;
}

.chat-upload-wrapper {
    position: relative;
    width: 100%;
}

.chat-upload-img {
    width: 280px !important;
    position: static !important;
    border-radius: 3px !important;
    padding: 0 !important;
    /* margin: 5px 0; */
}

/* 日付バナー（日付が変わるところの表示） */
.chat-date-banner {
    color: #fff;
    background-color: rgb(121, 121, 121);
    padding: 4px 12px;
    border-radius: 25px;
    font-size: 13px;
    margin: 10px auto;
    display: block;
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: center;
    width: fit-content;
    left: 0;
    right: 0;
    transition: opacity 0.3s ease;
}

.chat-date,
.chat-me-date {
    color: #868686;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    margin: 0 5px;
}
.chat-me-date {
    align-items: flex-end;
}
.chat-date span,
.chat-me-date span {
    font-size: 12px;
    line-height: 1.3;
}
@media screen and (max-width: 739px)
{
    .chat-date span,
    .chat-me-date span {
    font-size: 11px;
    }
}

.message-area {
    display: flex;
    position: fixed;
    bottom: 20px;
    z-index: 2;
    width: 60%;
    background: #d9d8d8;
    /* padding: 10px 0; */
    border-radius: 5px;
}
@media screen and (max-width: 1000px)
{
    .message-area {
        background: #d9d8d8 !important;
        width: 91.5%;
        padding-right: 70px;
        border-radius:10px 10px 20px 20px;
    }
}
@media screen and (max-width: 739px)
{
    .message-area {
        width: 88%;
        flex-direction: column; /* 1行目と2行目に分けるために追加 */
    }
}
.message-area textarea {
    padding: 10px;
    border-radius: 10px;
    width: 100%;
}
@media screen and (max-width: 739px)
{
    .message-area textarea {
        height: 40px; /* 1行分の高さに調整 */
        min-height: 40px; /* 高さ固定 */
        margin: 5px 0 10px 0; /* ボタン群との間隔 */
        padding-top: 5px;
        width: 100%;
    }
}
.message-buttons {
    background-color: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}
@media screen and (max-width: 739px)
{
    .message-buttons {
        justify-content: space-between;
        width: 100%;
    }
}
.message-buttons i {
    color: #868686;
    background-color: #fff;
    padding: 14px 14px;
    border-radius: 50%;
    margin: 0 10px 10px 10px;
    cursor: pointer;
    min-width: fit-content;
}
@media screen and (max-width: 739px)
{
    .message-buttons i {
        margin: 0 5px 10px 5px;
        border: 1px solid #d9d8d8
    }
}
.message-buttons input {
    display: none;
    cursor: pointer;
}

.message-buttons button i {
    color: #fff;
    font-size: 24px;
    background-color: #7f993c;
    margin: 0 10px 10px 0;
    border-radius: 50%;
    border: none;
}

#template-message-btn {
    background-color: #a0bf4c;
    border-radius: 50%;
    border: none;
    margin: 0 0 10px 0;
    padding: 0;
    order: 1; /* ボタンの表示順序を変更 */
}

#template-message-btn i {
    color: #fff;
    font-size: 24px;
    background-color: transparent;
    margin: 0;
    padding: 14px 14px;
    text-align: right;
}

@media screen and (min-width: 740px) {
    /* PCサイズで定型文送信ボタンを右端に配置 */
    #template-message-btn {
        margin-left: auto;
    }
}

#report-btn {
    margin: 10px 10px 10px 0;
    padding: 14px 16px;
}

@media screen and (max-width: 739px) {
    /* モバイルサイズでボタンの順序と表示を調整 */
    #file-attachment-icon {
        order: 0;
    }
    #report-btn {
        order: 1;
        margin: 0 5px 10px 5px;
    }
    button[type="submit"] {
        order: 2;
    }
    #template-message-btn {
        order: 3;
    }
}

.search-arrow {
    color: #fff;
    background-color: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 5px;
}

.highlight {
    background-color: rgba(186, 85, 211, 0.2);
    font-weight: bold;
    padding: 2px 3px;
    border-radius: 4px;
}
.current-highlight {
    background-color: rgba(186, 85, 211, 0.5);
}

/* ファイルプレビューモーダル用スタイル */
.file-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow: hidden;
    box-sizing: border-box;
}

.chat-modal-content {
    background-color: #333333;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.chat-modal-header {
    background-color: #333333;
    display: flex;
    justify-content: space-between;
    padding: 5px;
    margin: 15px 40px 5px 40px;
    z-index: 1010;
}

.chat-modal-header button,
.chat-modal-header a {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #333333
}

.chat-modal-header button:hover,
.chat-modal-header a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.chat-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 0;
    position: relative;
}

.chat-modal-footer {
    background-color: #333333;
    display: flex;
    justify-content: center;
    padding: 10px;
    z-index: 1010;
}

.zoom-controls {
    display: flex;
    gap: 20px;
}

.zoom-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.zoom-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.preview-container {
    display: none;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

#image-preview {
    width: 100%;
    height: 100%;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-preview img {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.1s ease;
    cursor: grab;
    pointer-events: auto;
    user-drag: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    margin: auto;
}

#image-preview img.grabbing {
    cursor: grabbing;
}

#pdf-preview {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
}

.pdf-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pdf-preview iframe {
    border: none;
    transition: transform 0.1s ease;
    background-color: white;
    /* PDFビューアのツールバーを非表示にするためのスタイル */
    pointer-events: none; /* ドラッグを可能にするためpointer-eventsを無効化 */
}

/* PDF埋め込み表示用スタイル調整 */
object[type="application/pdf"] {
    display: block;
    width: 100%;
    height: 100%;
    overflow: auto;
}

#text-preview {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
    text-align: left;
    color: #333;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    user-select: text;
    transition: font-size 0.1s ease;
}

#other-preview {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    color: #333;
}

/* 施工業者ボタン */
.contractor-btn {
    background-color: #a8d0f0;
    color: #333;
    border: none;
    padding: 0 12px;
    margin: 0 15px 0 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 48.36px;
    width: 87.99px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contractor-btn:hover {
    background-color: #3498db;
    color: white;
}

/* 施工業者選択モーダル */
.contractor-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.contractor-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contractor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.contractor-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #333;
}

.contractor-modal-body {
    padding: 20px;
}

.contractor-select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contractor-select-container label {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.contractor-select-container select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.contractor-select-container select:focus {
    outline: none;
    border-color: #3498db;
}

.contractor-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contractor-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contractor-item:hover {
    background-color: #f8f9fa;
}

.contractor-item input[type="radio"] {
    margin-right: 10px;
}

.contractor-item label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    flex: 1;
}

.contractor-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.chat-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-btn:hover:not(:disabled) {
    background-color: #218838;
}

.chat-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* contractor.phpと同じチャットボタンスタイル */
.contractor-modal-footer .chat-button {
    display: inline-flex;
    align-items: center;
    background-color: #d9d8d8;
    color: #333;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.contractor-modal-footer .chat-button i {
    margin-right: 8px;
}

.contractor-modal-footer .chat-button:not(.disabled) {
    background-color: #0AA273;
    color: white;
}

.contractor-modal-footer .chat-button:hover:not(.disabled) {
    background-color: #0AA273;
    color: white;
}

.contractor-modal-footer .chat-button.disabled {
    background-color: #ccc;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

@media screen and (max-width: 739px) {
    .contractor-modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .contractor-modal-header h3 {
        font-size: 16px;
    }
    
    .contractor-item label {
        font-size: 12px;
    }
}

/* 定型文送信モーダル */
.template-message-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.template-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.template-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.template-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.template-modal-body {
    padding: 20px;
}

.template-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s;
}

.template-header:hover {
    background-color: #e9ecef;
}

.template-header span {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.template-header i {
    color: #666;
    transition: transform 0.3s;
}

.template-content {
    padding: 0 20px;
    background-color: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.template-content.show {
    max-height: 500px;
    padding: 20px;
    overflow-y: auto;
}

/* 定型文送信セクション */
.template-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    line-height: 1.5;
}

.template-item:hover {
    background-color: #3498db;
    color: white;
}

.template-item:last-child {
    margin-bottom: 0;
}

/* スケジュール調整セクション */
.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group select,
.form-group input[type="datetime-local"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group select:focus,
.form-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-group .radio-label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.schedule-send-btn {
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start;
}

.schedule-send-btn:hover:not(.disabled) {
    background-color: #2980b9;
}

.schedule-send-btn.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* 区切り線 */
.form-divider {
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
}

/* 立ち入り許可に関する同意書スタイル */
.consent-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.consent-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consent-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
}

.consent-item:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
}

.consent-item.no-attachment {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.consent-item.no-attachment:hover {
    background-color: #ffeaa7;
    border-color: #fdcb6e;
}

.consent-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    transform: scale(1.1);
}

.consent-item label {
    cursor: pointer;
    font-size: 13px;
    color: #333;
    margin: 0;
    font-weight: normal;
    flex: 1;
}

.consent-item input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.consent-item input[type="checkbox"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 同意書項目のアコーディオン */
.consent-item-accordion {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 0;
}

.consent-item-accordion-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    flex: 1;
}

.consent-item-checkbox {
    margin-top: 10px;
    flex-shrink: 0;
}

.consent-item-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s;
    border-bottom: 1px solid #ddd;
    gap: 6px;
}

.consent-item-header:hover {
    background-color: #e9ecef;
}

.consent-header-title {
    font-size: 15px;
    color: #333;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

.consent-item-checkbox input[type="checkbox"] {
    cursor: pointer;
    transform: scale(1.1);
}

.consent-item-header .accordion-icon {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s;
    margin-left: auto;
    flex-shrink: 0;
}

.consent-item-content {
    padding: 0 12px;
    background-color: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.consent-item-content.show {
    max-height: 200px;
    padding: 12px;
    border-top: 1px solid #eee;
}

.consent-item-content p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* 同意書を添付しない項目のスタイル調整 */
.consent-item-accordion.no-attachment .consent-item-accordion-card .consent-item-header {
    background-color: #fff3cd;
    border-bottom-color: #ffeaa7;
}

.consent-item-accordion.no-attachment .consent-item-accordion-card .consent-item-header:hover {
    background-color: #ffeaa7;
}

.consent-item-accordion.no-attachment .consent-item-accordion-card .consent-item-content {
    background-color: #fffbf0;
}

/* 完了報告セクション */
.approval-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    line-height: 1.5;
}

.approval-item:hover {
    background-color: #3498db;
    color: white;
}

.approval-item:last-child {
    margin-bottom: 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 739px) {
    .template-modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .template-modal-header {
        padding: 15px;
    }
    
    .template-modal-header h3 {
        font-size: 16px;
    }
    
    .template-modal-body {
        padding: 15px;
    }
    
    .template-header {
        padding: 12px 15px;
    }
    
    .template-header span {
        font-size: 14px;
    }
    
    .template-content {
        padding: 0 15px;
        max-height: 0;
    }
    
    .template-content.show {
        padding: 15px;
        max-height: 400px;
    }
    
    .template-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .template-item:active {
        background-color: #3498db;
        color: white;
    }
    
    .approval-buttons {
        gap: 8px;
    }
    
    .approval-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .approval-item:active {
        background-color: #3498db;
        color: white;
    }
    
    .radio-group {
        gap: 15px;
    }
    
    /* 立ち入り許可に関する同意書のレスポンシブ対応 */
    .form-divider {
        margin: 15px 0;
    }
    
    .consent-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .consent-options {
        gap: 8px;
    }
    
    .consent-item {
        padding: 6px 10px;
    }
    
    .consent-item-header {
        gap: 4px;
        padding: 6px 10px;
    }
    
    /* 同意書アコーディオンのレスポンシブ対応 */
    .consent-item-accordion {
        margin-bottom: 6px;
        gap: 6px;
    }
    
    .consent-item-checkbox {
        margin-top: 6px;
    }
    
    .consent-item-header {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .consent-header-title {
        font-size: 13px;
    }
    
    .consent-item-checkbox input[type="checkbox"] {
        transform: scale(1.0);
    }
    
    .consent-item-content.show {
        padding: 10px;
        max-height: 150px;
    }
    
    .consent-item-content p {
        font-size: 12px;
    }
}
