@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* Navbar hover animation */
.hover-underline-animation {
    position: relative;
}

.hover-underline-animation::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6366f1;
    transition: width 0.3s ease;
}

.hover-underline-animation:hover::after {
    width: 100%;
}

/* Excel-like Table base styling for overriding Tailwind resets if needed */
.excel-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 80vh;
}

.excel-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
}

.excel-table th,
.excel-table td {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.excel-table th:first-child,
.excel-table td:first-child {
    border-left: 1px solid #e2e8f0;
}

.excel-table thead tr:first-child th {
    border-top: 1px solid #e2e8f0;
}

/* 固定行 (ヘッダー) */
.excel-table thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

.excel-table thead th {
    background-clip: padding-box;
}

.excel-table thead tr:nth-child(1) th {
    background-color: #f8fafc;
}

.excel-table thead tr:nth-child(2) th {
    background-color: #f1f5f9;
}

/* 固定列 (1列目: 日付) */
.excel-table th.sticky-col,
.excel-table td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: white;
    background-clip: padding-box;
}

/* ヘッダーの固定列のz-indexを一番上に */
.excel-table thead tr:nth-child(1) th.sticky-col {
    z-index: 30;
    background-color: #f8fafc;
}

.excel-table thead tr:nth-child(2) th.sticky-col {
    z-index: 25;
    background-color: #f1f5f9;
}

/* SortableJS drag styles */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0fdf4 !important;
}

.sortable-row td:first-child:active {
    cursor: grabbing !important;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

@media (max-width: 639px) {

    /* Prevent iOS Safari auto-zoom by enforcing 16px min font size */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* iOS smooth scrolling for table containers */
    .excel-table-container {
        -webkit-overflow-scrolling: touch;
    }
}