/**
 * Transfer Assignments - Employee record reassignment page
 *
 * Styles for the HR Manager > Employees > Transfer Assignments page.
 * Two-mode UI (Quick bulk transfer + Selective tab-filtered picker)
 * with summary cards, filter bars, and record tables.
 */

/* ==========================================================================
   Page wrapper (spacing between sections)
   ========================================================================== */

.is-transfer-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
   Mode toggle buttons
   ========================================================================== */

.is-transfer-mode-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.is-transfer-mode-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgb(209 213 219);
    background-color: #ffffff;
    color: rgb(55 65 81);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.is-transfer-mode-btn:hover {
    background-color: rgb(249 250 251);
}

.is-transfer-mode-btn.is-active {
    background-color: rgb(93 194 211);
    border-color: rgb(93 194 211);
    color: #ffffff;
}

.dark .is-transfer-mode-btn {
    background-color: rgb(17 24 39);
    border-color: rgb(55 65 81);
    color: rgb(229 231 235);
}

.dark .is-transfer-mode-btn:hover {
    background-color: rgb(31 41 55);
}

/* ==========================================================================
   Category summary cards (Mode A - Quick)
   ========================================================================== */

.is-transfer-summary-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 640px) {
    .is-transfer-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .is-transfer-summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.is-transfer-category-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgb(229 231 235);
    cursor: pointer;
    transition: all 0.15s ease;
}

.is-transfer-category-card:hover {
    background-color: rgb(249 250 251);
}

.is-transfer-category-card.is-selected {
    border-color: rgb(93 194 211);
    background-color: rgb(240 253 255);
}

.is-transfer-category-card.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.is-transfer-category-card.is-disabled:hover {
    background-color: transparent;
}

.is-transfer-category-card input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border-color: rgb(209 213 219);
    accent-color: rgb(93 194 211);
}

.dark .is-transfer-category-card {
    border-color: rgb(55 65 81);
}

.dark .is-transfer-category-card:hover {
    background-color: rgb(31 41 55);
}

.dark .is-transfer-category-card.is-selected {
    background-color: rgba(93, 194, 211, 0.15);
}

.is-transfer-category-body {
    flex: 1;
    min-width: 0;
}

.is-transfer-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.is-transfer-category-label {
    font-weight: 500;
    color: rgb(17 24 39);
    font-size: 14px;
}

.dark .is-transfer-category-label {
    color: rgb(243 244 246);
}

.is-transfer-category-count {
    font-size: 24px;
    font-weight: 700;
    color: rgb(93 194 211);
    line-height: 1;
}

.is-transfer-category-count.is-zero {
    color: rgb(156 163 175);
}

.is-transfer-category-hint {
    font-size: 12px;
    color: rgb(107 114 128);
    margin-top: 2px;
}

.dark .is-transfer-category-hint {
    color: rgb(156 163 175);
}

.is-transfer-total-note {
    font-size: 14px;
    color: rgb(75 85 99);
}

.dark .is-transfer-total-note {
    color: rgb(209 213 219);
}

/* ==========================================================================
   Tabs (Mode B)
   ========================================================================== */

.is-transfer-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgb(229 231 235);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.is-transfer-tabs::-webkit-scrollbar {
    height: 4px;
}

.dark .is-transfer-tabs {
    border-bottom-color: rgb(55 65 81);
}

.is-transfer-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
    color: rgb(107 114 128);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.is-transfer-tab:hover {
    color: rgb(55 65 81);
}

.is-transfer-tab.is-active {
    color: rgb(93 194 211);
    border-bottom-color: rgb(93 194 211);
}

.dark .is-transfer-tab {
    color: rgb(156 163 175);
}

.dark .is-transfer-tab:hover {
    color: rgb(229 231 235);
}

.dark .is-transfer-tab.is-active {
    color: rgb(93 194 211);
}

.is-transfer-tab-count {
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.75;
}

.is-transfer-tab-selected-badge {
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 999px;
    background-color: rgba(93, 194, 211, 0.15);
    color: rgb(14 116 144);
}

.dark .is-transfer-tab-selected-badge {
    background-color: rgba(93, 194, 211, 0.25);
    color: rgb(165 243 252);
}

/* ==========================================================================
   Filter bar
   ========================================================================== */

.is-transfer-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .is-transfer-filter-bar.is-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .is-transfer-filter-bar.is-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .is-transfer-filter-bar.is-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

.is-transfer-filter-bar select,
.is-transfer-filter-bar input[type="date"] {
    border-radius: 6px;
    border: 1px solid rgb(209 213 219);
    padding: 6px 10px;
    font-size: 13px;
    background-color: #ffffff;
    color: rgb(17 24 39);
}

.dark .is-transfer-filter-bar select,
.dark .is-transfer-filter-bar input[type="date"] {
    border-color: rgb(55 65 81);
    background-color: rgb(17 24 39);
    color: rgb(243 244 246);
}

/* ==========================================================================
   Records table
   ========================================================================== */

.is-transfer-table-wrap {
    overflow-x: auto;
    border: 1px solid rgb(229 231 235);
    border-radius: 6px;
}

.dark .is-transfer-table-wrap {
    border-color: rgb(55 65 81);
}

.is-transfer-table {
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.is-transfer-table thead {
    background-color: rgb(249 250 251);
}

.dark .is-transfer-table thead {
    background-color: rgb(31 41 55);
}

.is-transfer-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(55 65 81);
    border-bottom: 1px solid rgb(229 231 235);
}

.dark .is-transfer-table th {
    color: rgb(229 231 235);
    border-bottom-color: rgb(55 65 81);
}

.is-transfer-table td {
    padding: 8px 12px;
    color: rgb(17 24 39);
    border-bottom: 1px solid rgb(229 231 235);
}

.dark .is-transfer-table td {
    color: rgb(243 244 246);
    border-bottom-color: rgb(55 65 81);
}

.is-transfer-table tr:last-child td {
    border-bottom: none;
}

.is-transfer-table tbody tr:hover {
    background-color: rgb(249 250 251);
}

.dark .is-transfer-table tbody tr:hover {
    background-color: rgb(31 41 55);
}

.is-transfer-table-checkbox-col {
    width: 40px;
}

.is-transfer-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: rgb(93 194 211);
}

.is-transfer-table-footer {
    margin-top: 8px;
    font-size: 12px;
    color: rgb(107 114 128);
}

.dark .is-transfer-table-footer {
    color: rgb(156 163 175);
}

.is-transfer-empty {
    font-size: 13px;
    color: rgb(107 114 128);
    padding: 24px;
    text-align: center;
    border: 1px dashed rgb(209 213 219);
    border-radius: 6px;
}

.dark .is-transfer-empty {
    color: rgb(156 163 175);
    border-color: rgb(55 65 81);
}

/* ==========================================================================
   Submit section
   ========================================================================== */

.is-transfer-submit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.is-transfer-field-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgb(55 65 81);
    margin-bottom: 4px;
}

.dark .is-transfer-field-label {
    color: rgb(229 231 235);
}

.is-transfer-field-input {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgb(209 213 219);
    padding: 8px 12px;
    font-size: 14px;
    background-color: #ffffff;
    color: rgb(17 24 39);
}

.dark .is-transfer-field-input {
    border-color: rgb(55 65 81);
    background-color: rgb(17 24 39);
    color: rgb(243 244 246);
}

.is-transfer-large-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    background-color: rgb(255 251 235);
    border: 1px solid rgb(253 230 138);
    color: rgb(120 53 15);
    font-size: 14px;
}

.dark .is-transfer-large-warning {
    background-color: rgba(180, 83, 9, 0.15);
    border-color: rgb(180 83 9);
    color: rgb(253 230 138);
}

.is-transfer-large-warning input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: rgb(217 119 6);
}

.is-transfer-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid rgb(229 231 235);
    flex-wrap: wrap;
}

.dark .is-transfer-submit-row {
    border-top-color: rgb(55 65 81);
}

.is-transfer-submit-total {
    font-size: 14px;
    color: rgb(75 85 99);
}

.dark .is-transfer-submit-total {
    color: rgb(209 213 219);
}

.is-transfer-submit-btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    background-color: rgb(93 194 211);
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.is-transfer-submit-btn:hover:not(:disabled) {
    background-color: rgb(14 165 180);
}

.is-transfer-submit-btn:disabled {
    background-color: rgb(156 163 175);
    cursor: not-allowed;
}

/* ==========================================================================
   Custom Alpine.js multi/searchable select (filter dropdowns)
   ========================================================================== */

.is-ta-select {
    position: relative;
    width: 100%;
}

[x-cloak] {
    display: none !important;
}

.is-ta-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid rgb(209 213 219);
    border-radius: 6px;
    background-color: #ffffff;
    color: rgb(17 24 39);
    cursor: pointer;
    transition: border-color 0.15s ease;
    min-height: 34px;
}

.is-ta-select-trigger:hover {
    border-color: rgb(93 194 211);
}

.dark .is-ta-select-trigger {
    background-color: rgb(17 24 39);
    border-color: rgb(55 65 81);
    color: rgb(243 244 246);
}

.is-ta-select-value {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.is-ta-select-placeholder {
    color: rgb(156 163 175);
}

.is-ta-select-chevron {
    width: 16px;
    height: 16px;
    color: rgb(107 114 128);
    flex-shrink: 0;
}

.is-ta-select-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background-color: #ffffff;
    border: 1px solid rgb(229 231 235);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dark .is-ta-select-panel {
    background-color: rgb(17 24 39);
    border-color: rgb(55 65 81);
}

.is-ta-select-search {
    padding: 8px;
    border-bottom: 1px solid rgb(229 231 235);
    background-color: rgb(249 250 251);
}

.dark .is-ta-select-search {
    background-color: rgb(31 41 55);
    border-bottom-color: rgb(55 65 81);
}

.is-ta-select-search-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid rgb(209 213 219);
    border-radius: 4px;
    background-color: #ffffff;
    color: rgb(17 24 39);
}

.dark .is-ta-select-search-input {
    background-color: rgb(17 24 39);
    border-color: rgb(55 65 81);
    color: rgb(243 244 246);
}

.is-ta-select-options {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    max-height: 240px;
}

.is-ta-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: rgb(17 24 39);
}

.is-ta-select-option:hover {
    background-color: rgb(240 253 255);
}

.dark .is-ta-select-option {
    color: rgb(243 244 246);
}

.dark .is-ta-select-option:hover {
    background-color: rgba(93, 194, 211, 0.1);
}

.is-ta-select-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: rgb(93 194 211);
    flex-shrink: 0;
}

.is-ta-select-option-row {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 12px;
    font-size: 13px;
    background: transparent;
    border: none;
    color: rgb(17 24 39);
    cursor: pointer;
}

.is-ta-select-option-row:hover {
    background-color: rgb(240 253 255);
}

.dark .is-ta-select-option-row {
    color: rgb(243 244 246);
}

.dark .is-ta-select-option-row:hover {
    background-color: rgba(93, 194, 211, 0.1);
}

.is-ta-select-empty {
    padding: 12px;
    font-size: 12px;
    color: rgb(107 114 128);
    text-align: center;
}

.dark .is-ta-select-empty {
    color: rgb(156 163 175);
}

.is-ta-select-footer {
    padding: 6px 8px;
    border-top: 1px solid rgb(229 231 235);
    background-color: rgb(249 250 251);
    text-align: right;
}

.dark .is-ta-select-footer {
    border-top-color: rgb(55 65 81);
    background-color: rgb(31 41 55);
}

.is-ta-select-clear {
    font-size: 12px;
    color: rgb(107 114 128);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
}

.is-ta-select-clear:hover {
    color: rgb(14 116 144);
    text-decoration: underline;
}

/* ==========================================================================
   Pagination (matches webhook logs styling)
   ========================================================================== */

.is-transfer-pagination {
    padding: 12px 0 4px;
}

.is-transfer-pagination nav > div:first-child {
    display: none !important;
}

.is-transfer-pagination nav > div:last-child {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.is-transfer-pagination nav {
    display: block;
}

.is-transfer-pagination nav p {
    margin: 0;
    font-size: 13px;
    color: rgb(107 114 128);
    line-height: 32px;
}

.dark .is-transfer-pagination nav p {
    color: rgb(156 163 175);
}

.is-transfer-pagination nav > div:last-child > div:last-child {
    display: flex;
    align-items: center;
    gap: 2px;
}

.is-transfer-pagination nav > div:last-child > div:last-child > span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.is-transfer-pagination a,
.is-transfer-pagination button {
    padding: 0 10px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid rgb(229 231 235);
    background: white;
    color: rgb(55 65 81);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Prev/next chevron icons (Laravel paginator renders inline SVGs) */
.is-transfer-pagination svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.is-transfer-pagination a:hover,
.is-transfer-pagination button:hover:not(:disabled) {
    border-color: rgb(93 194 211);
    color: rgb(14 116 144);
    background: rgb(240 253 255);
}

.is-transfer-pagination span[aria-current="page"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 32px;
    font-size: 13px;
    border-radius: 6px;
    background-color: rgb(93 194 211);
    color: white;
    font-weight: 500;
}

.dark .is-transfer-pagination a,
.dark .is-transfer-pagination button {
    background: rgb(17 24 39);
    border-color: rgb(55 65 81);
    color: rgb(229 231 235);
}

.dark .is-transfer-pagination a:hover,
.dark .is-transfer-pagination button:hover:not(:disabled) {
    background: rgba(93, 194, 211, 0.15);
    color: rgb(165 243 252);
}
