/* Travel Expense Form Custom Styles */

/* Calendar styles for date inputs */
.calendar-container {
    position: relative;
    display: inline-block;
}

.calendar-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 35px;
}

/* Date picker styling */
input[type="date"] {
    position: relative;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Table styling enhancements */
.table-hover tbody tr:hover {
    background-color: #f5f5f5;
}

.table-striped > tbody > tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* 元のGrowOneスタイルとの互換性確保 */
.layoutTableListHeader,
.layoutTableListBody {
    width: 100% !important;
    overflow-x: auto;
}

.layoutTableListHeader table,
.layoutTableListBody table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 1200px; /* 最小幅を設定 */
}

/* 各列の固定幅を強制適用 */
.layoutColumnHeader[style*="width:60px"],
.layoutColumnBody[style*="width:60px"] {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

.layoutColumnHeader[style*="width:80px"],
.layoutColumnBody[style*="width:80px"] {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
}

.layoutColumnHeader[style*="width:120px"],
.layoutColumnBody[style*="width:120px"] {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

.layoutColumnHeader[style*="width:150px"],
.layoutColumnBody[style*="width:150px"] {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

.layoutColumnHeader[style*="width:180px"],
.layoutColumnBody[style*="width:180px"] {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
}

.layoutColumnHeader[style*="width:230px"],
.layoutColumnBody[style*="width:230px"] {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
}

/* テーブル内の入力要素のスタイル */
.layoutColumnBody input,
.layoutColumnBody select {
    padding: 2px 4px;
    font-size: 11px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.layoutColumnBody button {
    padding: 2px 6px;
    font-size: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* 隠しテキスト列の完全非表示 */
.layoutColumnHiddenText,
.layoutColumnHeader.layoutColumnHiddenText,
.layoutColumnBody.layoutColumnHiddenText,
.layoutColumnFooter.layoutColumnHiddenText {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* 隠しテキスト列内の要素も非表示 */
.layoutColumnHiddenText input,
.layoutColumnHiddenText * {
    display: none !important;
}

/* Modal and popup base styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: #000;
    opacity: 0.5;
}

.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    outline: 0;
}

.modal.in {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 10px;
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
    }
}

.modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid #999;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
    outline: 0;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    min-height: 16.42857143px;
}

.modal-body {
    position: relative;
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
}

/* Loading mask styles */
.loadmask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loadmask-msg {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animation utility classes */
.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.fade.in {
    opacity: 1;
}

.collapse {
    display: none;
}

.collapse.in {
    display: block;
}

/* Responsive text utilities */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* Spacing utilities */
.margin-top { margin-top: 15px; }
.margin-bottom { margin-bottom: 15px; }
.padding { padding: 15px; }

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .table-bordered th,
    .table-bordered td {
        border: 1px solid #000 !important;
    }
}