/* =========================================================
   Talpi (Timber & Scaffolding Planks) Tab Styles
   /modules/inventory/css/inventory_talpi.css
   ========================================================= */

.col-type {
    width: 150px;
    min-width: 150px;
}

.col-project {
    width: 220px;
    min-width: 180px;
}

.col-meters {
    width: 120px;
    min-width: 100px;
    font-variant-numeric: tabular-nums;
}

.col-note-pto {
    width: 240px;
    min-width: 180px;
}

.col-delivered {
    width: 110px;
    min-width: 90px;
    font-variant-numeric: tabular-nums;
}

.col-needed {
    width: 110px;
    min-width: 90px;
    font-variant-numeric: tabular-nums;
}

.col-status {
    width: 120px;
    min-width: 110px;
}

.col-small-num {
    width: 60px;
    min-width: 50px;
}

.tagify-glow-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2px;
    transition: all 0.3s ease;
}

.tagify-glow-wrapper:focus-within {
    background: rgba(var(--bs-primary-rgb), 0.15);
    box-shadow: 0 0 20px rgba(var(--bs-primary-rgb), 0.2);
}

.badge-archived {
    background-color: #d97706 !important;
    color: #ffffff !important;
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

[data-bs-theme="dark"] .badge-archived {
    background-color: #f59e0b !important;
    color: #1c1c1e !important;
}

/* Apple Glassmorphism Table Styling for Talpi */
.card-glass-table {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    border-radius: 18px !important;
}

[data-bs-theme="dark"] .card-glass-table {
    background: rgba(26, 26, 28, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

#talpiResultsTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100%;
    border: none !important;
}

#talpiResultsTable th,
#talpiResultsTable td {
    border: none !important;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12) !important;
    padding: 0.75rem 0.85rem;
    vertical-align: middle;
}

.apple-table-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 248, 250, 0.9) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

[data-bs-theme="dark"] .apple-table-head {
    background: rgba(38, 38, 42, 0.9) !important;
}

.apple-table-head th {
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--apple-text-secondary, #64748b) !important;
    border-bottom: 1px solid rgba(128, 128, 128, 0.22) !important;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
    white-space: nowrap;
}

#talpiResultsTable tbody tr:not(.section-header-row):not(.draft-row) {
    transition: background-color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

#talpiResultsTable tbody tr:not(.section-header-row):not(.draft-row):hover {
    background-color: rgba(0, 122, 255, 0.04) !important;
}

[data-bs-theme="dark"] #talpiResultsTable tbody tr:not(.section-header-row):not(.draft-row):hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.section-header {
    background: rgba(var(--bs-primary-rgb), 0.06) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--bs-body-color, #1e293b);
    font-weight: 600;
    letter-spacing: 0.2px;
}

[data-bs-theme="dark"] .section-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff;
}

.draft-row td {
    font-weight: 600;
    font-style: italic;
    color: #334155;
}

.pair-colored td,
.draft-row td {
    background-color: var(--pair-bg) !important;
    color: #000 !important;
}

.col-actions {
    width: 175px;
    min-width: 165px;
    text-align: center;
    padding: 3px 4px !important;
    vertical-align: middle;
}

.btn-delivery-add {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.btn-tiny {
    padding: 0.2rem 0.4rem;
    font-size: 0.78rem;
    line-height: 1.2;
    border-radius: 0.35rem;
}

.kpi-card {
    border: 1px solid var(--apple-card-border) !important;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    background: var(--apple-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-6px);
    background: var(--apple-hover-bg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--apple-accent-color) !important;
}

[data-bs-theme="dark"] .hover-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.icon-circle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
    font-size: 1.15rem;
}

.hover-card:hover .icon-circle {
    transform: scale(1.08);
}

.bg-primary-soft {
    background: rgba(13, 110, 253, 0.12);
}

.bg-success-soft {
    background: rgba(25, 135, 84, 0.12);
}

.bg-info-soft {
    background: rgba(13, 202, 240, 0.12);
}

.bg-warning-soft {
    background: rgba(255, 193, 7, 0.15);
}

.bg-danger-soft {
    background: rgba(220, 53, 69, 0.15);
}

[data-bs-theme="dark"] .bg-primary-soft {
    background: rgba(13, 110, 253, 0.22);
}

[data-bs-theme="dark"] .bg-success-soft {
    background: rgba(25, 135, 84, 0.22);
}

[data-bs-theme="dark"] .bg-info-soft {
    background: rgba(13, 202, 240, 0.22);
}

[data-bs-theme="dark"] .bg-warning-soft {
    background: rgba(255, 193, 7, 0.25);
}

[data-bs-theme="dark"] .bg-danger-soft {
    background: rgba(220, 53, 69, 0.25);
}

.transition-all {
    transition: all 0.3s ease;
}

/* Talpi Hide Object & Hidden Notification Banner */
.btn-toggle-talpi-object {
    font-size: 0.73rem !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 9999px !important;
    transition: all 0.2s ease-in-out;
    opacity: 0.75;
}

.section-header-row:hover .btn-toggle-talpi-object {
    opacity: 1;
}

.btn-toggle-talpi-object:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    transform: scale(1.02);
}

#talpi-hidden-objects-bar {
    border-left: 4px solid #f59e0b !important;
    animation: fadeInSlideDown 0.25s ease-out;
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Timeline & Delivery Modal Styles (Matching Timeline Modal)
   ========================================================= */

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.timeline-item {
    position: relative;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    transition: all 0.2s ease-in-out;
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(var(--bs-primary-rgb), 0.25);
    transform: translateX(2px);
}

[data-bs-theme="dark"] .timeline-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .timeline-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.timeline-item.category-delivery {
    border-left: 3.5px solid var(--apple-accent-color, #0d6efd);
}

.timeline-meta {
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.timeline-content {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--bs-body-color);
    padding: 0.25rem 0;
}

.timeline-user {
    font-size: 0.78rem;
    color: var(--bs-secondary-color, #6c757d);
}