/* Home Page - Salesforce Lightning Design System */
.step-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Salesforce Action buttons container */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    background: #fafaf9;
    border-radius: 0.25rem;
    border: 1px solid #dddbda;
}

.action-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    margin-top: 0;
    padding: 0 1.5rem;
    font-weight: 500;
}

/* ========================================
   TABLE ALIGNMENT - CRITICAL SECTION
   ======================================== */

/* Force table to use fixed layout for perfect alignment */
.use-case-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: #ffffff;
    border-radius: 0.25rem;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #dddbda;
}

/* Ensure thead/tbody/tr/th/td all use normal table display */
.use-case-table thead { display: table-header-group !important; }
.use-case-table tbody { display: table-row-group !important; }
.use-case-table tr { display: table-row !important; }
.use-case-table th,
.use-case-table td { display: table-cell !important; }

/* Ensure all cells use same box model and padding */
.use-case-table th,
.use-case-table td {
    box-sizing: border-box !important;
    padding: 0.75rem 1rem !important;
    vertical-align: middle !important;
    border-left: none !important;
    border-right: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Column 1: Checkbox - Centered */
.use-case-table th:nth-child(1),
.use-case-table td:nth-child(1) {
    width: 5% !important;
    text-align: center !important;
    padding: 0.75rem 0.5rem !important;
}

/* Column 2: Use Case Name - Left aligned */
.use-case-table th:nth-child(2),
.use-case-table td:nth-child(2) {
    width: 22% !important;
    text-align: left !important;
}

/* Column 3: Description - Left aligned */
.use-case-table th:nth-child(3),
.use-case-table td:nth-child(3) {
    width: 33% !important;
    text-align: left !important;
}

/* Column 4: Status - Centered */
.use-case-table th:nth-child(4),
.use-case-table td:nth-child(4) {
    width: 12% !important;
    text-align: center !important;
}

/* Column 5: Actions - Centered */
.use-case-table th:nth-child(5),
.use-case-table td:nth-child(5) {
    width: 28% !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* ========================================
   TABLE STYLING (NON-ALIGNMENT)
   ======================================== */

.use-case-table thead {
    background: #fafaf9;
    border-bottom: 2px solid #dddbda;
}

.use-case-table th {
    font-weight: 700;
    font-size: 0.75rem;
    color: #3e3e3c;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    border-bottom: 1px solid #dddbda;
}

.use-case-table tbody tr {
    border-bottom: 1px solid #dddbda;
    transition: background-color 0.1s linear;
    border-left: none !important;
    border-right: none !important;
}

.use-case-table tbody tr:hover {
    background-color: #fafaf9 !important;
    box-shadow: inset 4px 0 0 #0176d3 !important;
    transform: none !important;
}

.use-case-table tbody tr:last-child {
    border-bottom: none;
}

.use-case-table td {
    font-size: 0.8125rem;
    color: #080707;
}

/* Use Case Name column styling */
.use-case-table td:nth-child(2) {
    font-weight: 600;
}

/* Description column styling */
.use-case-description {
    color: #706e6b;
    font-size: 0.8125rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    cursor: default;
}

/* Tooltip on hover to show full description */
.use-case-description:hover::after {
    content: attr(data-full-description);
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    background: rgba(3, 45, 96, 0.95);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    max-width: 400px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.use-case-name {
    color: #0176d3;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.use-case-name:hover {
    color: #014c8c;
    text-decoration: underline;
}

/* Action buttons wrapper */
.action-buttons-wrapper {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Salesforce Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.25;
}

.status-badge.draft {
    background-color: #ffc835;
    color: #080707;
    border: 1px solid #f4a900;
}

.status-badge.active {
    background-color: #04844b;
    color: #ffffff;
    border: 1px solid #027e46;
}

.status-badge.inactive {
    background-color: #c23934;
    color: #ffffff;
    border: 1px solid #a61e1a;
}

.select-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0176d3;
}

#selectAllCheckbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0176d3;
}

/* Salesforce Button styles */
.btn-primary {
    background: #0176d3;
    color: #ffffff;
    border: 1px solid #0176d3;
    padding: 0 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background-color 0.05s linear, border 0.05s linear;
    line-height: 2.25rem;
    min-height: 2.25rem;
}

.btn-primary:hover {
    background: #014486;
    border-color: #014486;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    background: #032d60;
    border-color: #032d60;
}

.btn-secondary {
    background: #ffffff;
    color: #0176d3;
    border: 1px solid #0176d3;
    padding: 0 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background-color 0.05s linear, border 0.05s linear;
    line-height: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #f3f3f3;
    border-color: #014486;
    color: #014486;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
    background: #eaeaea;
}

.btn-secondary:disabled {
    background: #ffffff;
    border-color: #dddbda;
    color: #706e6b;
    cursor: not-allowed;
    opacity: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Salesforce Update button */
.btn-update {
    background: #0176d3;
    color: #ffffff;
    border: 1px solid #0176d3;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.05s linear;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1.5;
}

.btn-update:hover {
    background: #014486;
    border-color: #014486;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-update:active {
    background: #032d60;
    border-color: #032d60;
    box-shadow: none;
}

.btn-update:disabled {
    background: #f3f2f2;
    border-color: #dddbda;
    color: #706e6b;
    cursor: not-allowed;
}

/* Salesforce Discover button */
.btn-discover {
    background: #04844b;
    color: #ffffff;
    border: 1px solid #027e46;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.05s linear;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1.5;
}

.btn-discover:hover {
    background: #027e46;
    border-color: #025f38;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-discover:active {
    background: #025f38;
    border-color: #014d2e;
    box-shadow: none;
}

.btn-discover:disabled {
    background: #f3f2f2;
    border-color: #dddbda;
    color: #706e6b;
    cursor: not-allowed;
}
