﻿/* Workflow List Page Styles */

/* Page Header */
.workflow-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.75rem;
}

    .page-title i {
        color: #4a90e2;
    }


/* Create Button */
.btn-create {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

    .btn-create:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

/* Filter Card */
.filter-card {
    background: #f8f9fa;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

/* Three Column Filter Layout */
.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    row-gap: 0.75rem;
}

.filter-stats-column {
    flex: 1 1 auto;
}

    .filter-stats-column .filter-stats {
        width: 100%;
        justify-content: flex-start;
    }

.search-column {
    flex: 2 1 340px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.filter-buttons-column {
    flex: 1 1 280px;
    display: flex;
    justify-content: flex-end;
}

    .filter-buttons-column .filter-buttons {
        display: flex;
    }

/* Search Input Group */
.search-column .d-flex {
    width: 100%;
    max-width: 3600px;
    min-width: 220px;
}

.search-column .input-group {
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    overflow: hidden;
    height: 40px;
}

    .search-column .input-group .form-control {
        height: 100%;
    }

.search-column .input-group-text {
    background: white;
    border-right: none;
    padding: 0.5rem 0.75rem;
}

.search-column .input-group .btn-outline-secondary {
    border-left: none;
    background: white;
    padding: 0.5rem 0.75rem;
}

    .search-column .input-group .btn-outline-secondary:hover {
        background: #f8f9fa;
    }

.search-column .input-group-text {
    background: white;
    border-right: none;
    padding: 0.5rem 0.75rem;
}

.search-column .form-control {
    border-left: none;
    border-right: none;
    padding: 0.5rem;
    font-size: 0.875rem;
    height: 100%;
}

    .search-column .form-control:focus {
        box-shadow: none;
        border-color: #dee2e6;
    }

/* Options Button */
.square-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .square-btn i {
        font-size: 1rem;
        line-height: 1;
    }

/* Search Column Button Group */
.search-column .btn-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .search-column .btn-group .btn {
        border-radius: 0;
        background: white;
        border-color: #dee2e6;
    }

        .search-column .btn-group .btn:hover {
            background: #f8f9fa;
        }

        .search-column .btn-group .btn:first-child {
            border-top-left-radius: 0.5rem;
            border-bottom-left-radius: 0.5rem;
        }

        .search-column .btn-group .btn:last-child {
            border-top-right-radius: 0.5rem;
            border-bottom-right-radius: 0.5rem;
            border-left: none;
        }

/* Filter Stats */
.filter-stats {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #6c757d;
    font-size: 0.9rem;
    white-space: nowrap;
}

    .stat-item i {
        font-size: 1.1rem;
    }

    .stat-item strong {
        color: #2c3e50;
        font-weight: 600;
    }

    .stat-item.text-primary {
        color: #4a90e2;
    }

.filter-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

    .stat-item i {
        font-size: 1.1rem;
    }

    .stat-item strong {
        color: #2c3e50;
        font-weight: 600;
    }

    .stat-item.text-primary {
        color: #4a90e2;
    }

/* Toggle Switch */
.form-switch {
    padding-left: 2.5rem;
}

    .form-switch .form-check-label {
        font-size: 0.875rem;
        color: #495057;
        cursor: pointer;
        user-select: none;
    }

/* Filter Buttons */
.filter-buttons {
    min-width: fit-content;
    display: flex;
    flex-wrap: nowrap;
}

    .filter-buttons .btn {
        font-size: 0.875rem;
        font-weight: 500;
        padding: 0.375rem 1rem;
        white-space: nowrap;
    }

        .filter-buttons .btn i {
            font-size: 0.875rem;
        }

/* Main Container */
.workflow-list-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Table Styles */
.workflow-table {
    margin-bottom: 0;
    table-layout: fixed;
}

    .workflow-table thead {
        background: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

        .workflow-table thead th {
            font-weight: 600;
            color: #495057;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
            padding: 1rem 0.75rem;
            white-space: nowrap;
            border: none;
        }

            .workflow-table thead th.sortable {
                cursor: pointer;
                user-select: none;
                transition: background-color 0.2s ease;
            }

                .workflow-table thead th.sortable:hover {
                    background-color: #e9ecef;
                }

                .workflow-table thead th.sortable i {
                    font-size: 0.7rem;
                    opacity: 0.7;
                }

    .workflow-table tbody tr {
        transition: all 0.2s ease;
        border-bottom: 1px solid #f1f3f5;
    }

        .workflow-table tbody tr:hover {
            background-color: #f8f9fa;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
        }

        /* Updated inactive row styling - only apply opacity when showing ALL workflows */
        .workflow-table tbody tr.inactive-row {
            opacity: 0.7;
            background-color: #fafafa;
        }

    .workflow-table tbody td {
        padding: 1rem 0.75rem;
        vertical-align: middle;
        border: none;
    }

/* Column Widths */
.status-col {
    width: 80px;
}

.id-col {
    width: 80px;
}

.name-col {
    min-width: 250px;
}

.features-col {
    width: 120px;
}

.steps-col {
    width: 80px;
}

.dates-col {
    width: 140px;
}

.actions-col {
    width: 340px !important;
    white-space: nowrap;
}

/* Status Toggle Button */
.status-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .status-toggle.active {
        background: #d4edda;
        color: #28a745;
    }

        .status-toggle.active:hover {
            background: #28a745;
            color: white;
            border-color: #28a745;
        }

    .status-toggle.inactive {
        background: #fff3cd;
        color: #ffc107;
    }

        .status-toggle.inactive:hover {
            background: #ffc107;
            color: white;
            border-color: #ffc107;
        }

    .status-toggle i {
        font-size: 1.25rem;
    }

/* Workflow ID */
.workflow-id {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

/* Workflow Info */
.workflow-info {
    max-width: 400px;
}

.workflow-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.workflow-info small {
    font-size: 0.8rem;
    line-height: 1.3;
}

    .workflow-info small.text-info {
        font-style: italic;
    }

/* Feature Icons */
.feature-icons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8f9fa;
}

    .feature-icon i {
        font-size: 0.875rem;
    }

    .feature-icon:hover {
        background: #e9ecef;
    }

/* Steps Badge */
.steps-badge {
    display: inline-flex;
    align-items: center;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Date Info */
.date-info {
    line-height: 1.2;
}

.time-ago {
    font-weight: 500;
    color: #495057;
    font-size: 0.875rem;
}

.date-info small {
    font-size: 0.75rem;
}

/* Action Buttons - Fixed sizing and alignment */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-height: 32px;
}

    /* Make all action buttons the same fixed size */
    .action-buttons .btn {
        min-width: 40px !important;
        width: 40px !important;
        height: 32px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.875rem !important;
        flex-shrink: 0;
        overflow: hidden;
    }

    /* Special handling for results button with count */
    .action-buttons .btn-primary:has(span) {
        min-width: 50px !important;
        width: auto !important;
        max-width: 60px !important;
        padding: 0 6px !important;
    }

    /* Ensure button groups maintain consistent sizing */
    .action-buttons .btn-group {
        display: flex;
        flex-shrink: 0;
    }

    .action-buttons .btn-group-sm > .btn {
        margin: 0;
        border-radius: 0;
    }

        .action-buttons .btn-group-sm > .btn:first-child {
            border-top-left-radius: 0.25rem;
            border-bottom-left-radius: 0.25rem;
        }

        .action-buttons .btn-group-sm > .btn:last-child {
            border-top-right-radius: 0.25rem;
            border-bottom-right-radius: 0.25rem;
        }

    /* Icon sizing within buttons */
    .action-buttons .btn i {
        font-size: 0.875rem !important;
        line-height: 1;
    }

    /* Ensure consistent spacing when first button group is missing */
    .action-buttons > .btn-group:only-child {
        margin-left: auto;
    }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    display: block;
    margin-bottom: 1.5rem;
}

.empty-state h5 {
    color: #495057;
    margin-bottom: 0.75rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Responsive Design */
/* Extra large screens - everything on one line */
@media (min-width: 769px) and (min-width: 1401px) {
    .filter-row {
        justify-content: space-between;
        flex-wrap: nowrap;
    }
}

/* Large screens - smart two-row layout */
/*@media (min-width: 1201px) and (max-width: 1400px) {
    .filter-stats-column {
        flex: 1 1 100%;
        margin-bottom: 1rem;
    }

        .filter-stats-column .filter-stats {
            justify-content: center;
        }

    .search-column {
        flex: 1 1 50%;
        justify-content: flex-end;
        padding-right: 0.5rem;
    }

    .filter-buttons-column {
        flex: 1 1 50%;
        padding-left: 0.5rem;
    }

    .actions-col {
        width: 300px !important;
    }

    .action-buttons .btn {
        min-width: 36px !important;
        width: 36px !important;
        height: 30px !important;
    }

    .action-buttons .btn-primary:has(span) {
        min-width: 46px !important;
        max-width: 56px !important;
    }
}*/

/* Medium-large screens - when things start to wrap */
/*@media (min-width: 1100px) and (max-width: 1200px) {
    .filter-row {
        justify-content: space-between;
    }

    .filter-stats-column {
        flex: 0 1 auto;
        margin-right: auto;
    }

    .filter-stats {
        gap: 0.75rem;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .search-column {
        flex: 0 1 auto;
        margin: 0 0.5rem;
    }

        .search-column .d-flex {
            min-width: 300px;
        }

    .filter-buttons-column {
        flex: 0 1 auto;
    }

    .filter-buttons .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }

    .actions-col {
        width: 280px !important;
    }

    .action-buttons .btn {
        min-width: 34px !important;
        width: 34px !important;
        height: 28px !important;
    }

        .action-buttons .btn i {
            font-size: 0.75rem !important;
        }
}*/

/* Medium screens - center aligned two-row layout */
/*@media (min-width: 993px) and (max-width: 1099px) {
    .filter-stats-column {
        flex: 1 1 100%;
        margin-bottom: 1rem;
    }

        .filter-stats-column .filter-stats {
            justify-content: center;
        }

    .search-column {
        flex: 1 1 60%;
        justify-content: center;
    }

    .filter-buttons-column {
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}*/

/* Tablets - vertical stack */
/*@media (max-width: 992px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-stats-column,
    .search-column,
    .filter-buttons-column {
        width: 100%;
        justify-content: center;
    }

        .filter-stats-column .filter-stats {
            justify-content: center;
        }

    .search-column {
        margin: 0.5rem 0;
    }

        .search-column .d-flex {
            max-width: 100%;
            min-width: unset;
            justify-content: center;
        }

    .filter-buttons .btn {
        font-size: 0.875rem;
    }

    .action-buttons {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

        .action-buttons .btn-group {
            margin-bottom: 0;
        }
}*/

/* Mobile - compact vertical stack */
@media (max-width: 768px) {
    /* Hide the entire filter section on mobile */
    .filter-card {
        display: none !important;
    }

    /* Add top margin to workflow list when filter is hidden */
    .workflow-list-container {
        margin-top: 1rem;
    }

    .workflow-header .row {
        text-align: center;
    }

    .workflow-header .col-md-6:last-child {
        text-align: center !important;
    }

    .stat-item {
        font-size: 0.85rem;
    }

        .stat-item strong {
            font-size: 0.9rem;
        }

    .filter-buttons {
        width: 100%;
    }

        .filter-buttons .btn {
            font-size: 0.8rem;
            padding: 0.25rem 0.5rem;
        }

    .workflow-table {
        font-size: 0.875rem;
    }

        .workflow-table thead th {
            padding: 0.75rem 0.5rem;
            font-size: 0.7rem;
        }

        .workflow-table tbody td {
            padding: 0.75rem 0.5rem;
        }

    .action-buttons .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

        .action-buttons .btn i {
            font-size: 0.75rem;
        }

    .feature-icon {
        width: 24px;
        height: 24px;
    }

        .feature-icon i {
            font-size: 0.75rem;
        }
}

/* Loading Spinner Enhancement */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Hover Effects */
.btn-outline-primary:hover i,
.btn-outline-secondary:hover i,
.btn-outline-warning:hover i,
.btn-outline-danger:hover i,
.btn-outline-dark:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Focus States */
.btn:focus,
.status-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Highlight search results */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Modal Styles */
.modal.show {
    display: block;
}

.modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.5rem;
}

    .modal-body h6 {
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .modal-body .options-section {
        padding-bottom: 1.25rem;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 1.25rem;
    }

        .modal-body .options-section:last-of-type {
            border-bottom: none;
            padding-bottom: 0.5rem;
            margin-bottom: 1rem;
        }

    .modal-body .form-check {
        padding: 0.75rem 0;
        padding-left: 2.25rem;
    }

    .modal-body .form-check-label {
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .modal-body .form-check-label i {
            font-size: 1rem;
        }

    .modal-body .btn-outline-danger {
        padding: 0.375rem 1rem;
    }

/* Print Styles */
@media print {
    .workflow-header,
    .filter-card,
    .action-buttons {
        display: none !important;
    }

    .workflow-table {
        font-size: 10pt;
    }

    .inactive-row {
        opacity: 1;
    }
}


/* Add these styles to your WorkflowResultsDetail.css file */

/* Clipboard Button Styling */
.clipboard-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

    .clipboard-btn:hover {
        background-color: #e9ecef;
        transform: translateY(-1px);
    }

/* Toast Notification Styling (same as BinderWorkflowList) */
.toast-container {
    z-index: 1050;
}

.toast {
    min-width: 250px;
}

/* Better Text Selection and Copying */
.equipment-details {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Make equipment details more copy-friendly */
.equipment-body {
    position: relative;
}

.equipment-details {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.5rem 0.5rem;
}

    .equipment-details > strong,
    .equipment-details > span {
        display: table-cell;
        padding: 0.25rem 0.5rem;
        vertical-align: middle;
    }

    .equipment-details > strong {
        width: 150px;
        text-align: right;
        color: #495057;
        font-weight: 600;
    }

        .equipment-details > strong::after {
            content: " ";
            display: inline-block;
        }

/* Alternative: Use CSS to add line breaks for better copying */
.equipment-details-copyable {
    white-space: pre-line;
}

    .equipment-details-copyable strong::after {
        content: ": ";
    }

    .equipment-details-copyable span::after {
        content: "\A";
        white-space: pre;
    }

/* Notes section copy improvements */
.notes-section {
    user-select: text;
    -webkit-user-select: text;
}

/* Review item value copy improvements */
.review-item-value {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

/* Consumables list styling for better copying */
.consumables-list {
    user-select: text;
    -webkit-user-select: text;
}

/* Mobile responsive clipboard button */
@media (max-width: 768px) {
    .clipboard-btn {
        padding: 0.375rem 0.625rem;
    }

    .review-item-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
