/* ver 1.5.2 */
/* 予約記録履歴 スタイル */
/* 配置先: /wp-content/uploads/upload_area/dhotel_button/dhotel_history.css */

#dhotel-history-wrap {
    --primary: #2ca6e0;
    --primary-dark: #1b7db0;
    --secondary: #f03e6d;
    --bg-color: #f4f7f9;
    --surface: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e2e8f0;
    --radius-md: 4px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    margin-top: 12px;
    line-height: 1.5;
}

.hist-toolbar {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.hist-count { font-size: 85%; color: var(--text-muted); flex: 1; font-weight: 600; }
.hist-btn {
    padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: bold; transition: all 0.2s;
}
.hist-copy-btn { 
    background-color: var(--primary); color: #fff; 
    box-shadow: 0 4px 12px rgba(44,166,224,0.25); 
}
.hist-copy-btn:hover { background-color: var(--primary-dark); transform: scale(0.98); }
.hist-delall-btn { 
    background-color: #f8fafc; color: var(--text-muted); border: 1px solid var(--border-color);
}
.hist-delall-btn:hover { background-color: #ef4444; color: #fff; border-color: #ef4444; }

.hist-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}
.hist-table {
    width: 100%; border-collapse: collapse; font-size: 12px; min-width: 560px;
}
.hist-table th {
    background-color: var(--primary); padding: 4px 6px; text-align: left;
    border-bottom: 1px solid var(--border-color); white-space: nowrap;
    font-weight: 700; color: #ffffff;
}
.hist-table th:first-child { border-top-left-radius: var(--radius-md); }
.hist-table th:last-child { border-top-right-radius: var(--radius-md); }

.hist-table td {
    background-color: var(--surface); padding: 4px 6px; border-bottom: 1px solid var(--border-color); vertical-align: middle;
}
.hist-row:last-child td { border-bottom: none; }
.hist-row-flying td { background-color: #fffbeb !important; }

.hist-execdate, .hist-resdate, .hist-tap { white-space: nowrap; color: var(--text-main); }
.hist-room {
    font-size: 11px; max-width: 180px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; line-height: 1.4; color: var(--text-muted);
}
.hist-cell-editable { cursor: pointer; transition: background-color 0.15s; }
.hist-cell-editable:hover { background-color: #f1f5f9 !important; }
.hist-result { text-align: center; }
.hist-result-fla { color: var(--secondary); font-weight: bold; }
.hist-empty { color: #cbd5e1; }

.hist-edit-select {
    border: 1px solid var(--primary); border-radius: 4px;
    padding: 3px 6px; font-size: 12px; background: var(--surface); outline: none;
    color: var(--primary-dark); font-weight: 600;
}
.hist-edit-input {
    border: 1px solid var(--primary); border-radius: 4px;
    padding: 3px 6px; font-size: 12px; width: 68px; outline: none;
}

.hist-del-btn {
    background: none; border: none; border-radius: 4px;
    padding: 4px 6px; cursor: pointer; color: #94a3b8; font-size: 14px;
    transition: all 0.2s;
}
.hist-del-btn:hover { color: #ef4444; background-color: #fee2e2; }

.hist-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px; }
.hist-page-btn {
    padding: 6px 12px; border: 1px solid var(--border-color); border-radius: 6px;
    background: var(--surface); cursor: pointer; color: var(--text-muted); font-size: 12px;
    font-weight: 600; transition: all 0.2s;
}
.hist-page-btn:hover { border-color: var(--primary); color: var(--primary); }
.hist-page-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hist-page-active:hover { color: #fff; }

/* PC向けの余白拡張 (メディアクエリ) */
@media screen and (min-width: 600px) {
    .hist-table { font-size: 13px; }
    .hist-table th, .hist-table td { padding: 8px 12px; }
    .hist-room { font-size: 12px; max-width: 260px; }
}

/* モーダルダイアログ */
.hist-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.hist-modal-box {
    background: #ffffff; border-radius: 4px;
    padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 90%; width: 320px; text-align: center;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: #333333;
}
.hist-modal-text {
    margin-bottom: 24px; font-size: 14px; line-height: 1.5; font-weight: bold;
}
.hist-modal-actions {
    display: flex; gap: 12px; justify-content: center;
}
.hist-modal-btn {
    padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: bold;
    cursor: pointer; transition: all 0.2s; border: none; flex: 1;
}
.hist-modal-btn-cancel {
    background-color: #f1f5f9; color: var(--text-muted);
}
.hist-modal-btn-cancel:hover {
    background-color: #e2e8f0; color: var(--text-main);
}
.hist-modal-btn-delete {
    background-color: #ef4444; color: #ffffff;
}
.hist-modal-btn-delete:hover {
    background-color: #dc2626;
}
