/* --- CS Holder Window Styles --- */

/* Use upgrading-job-content for the main popup box */
#cs-holder-window {
    max-width: 1200px; /* Adjust width as needed */
    /* Inherits most styles from .upgrading-job-content */
}

/* Use upgrading-job-header for the header */
#cs-holder-window .upgrading-job-header h2 {
    font-size: 1.4em; /* Slightly smaller title if needed */
}

/* Use upgrading-job-close-btn for the close button */
#close-cs-holder-window {
    /* Inherits styles */
    /* You might need position: absolute if not inherited correctly */
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

/* Use upgrading-job-body for the main scrollable area */
#cs-holder-body {
    /* Inherits styles like padding, overflow */
}

/* Summary Section Styles */
#cs-summary-container {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid #4a627a;
    border-radius: 6px;
    margin-bottom: 20px;
}

#cs-summary-container h4 {
    margin: 0 0 15px 0;
    text-align: center;
    color: #1abc9c;
    border-bottom: 1px solid #4a627a;
    padding-bottom: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Responsive grid */
    gap: 15px;
}

.summary-item {
    text-align: center;
    background-color: #34495e;
    padding: 10px;
    border-radius: 4px;
}

.summary-item strong {
    display: block;
    font-size: 0.9em;
    color: #bdc3c7;
    margin-bottom: 5px;
}

.summary-item span {
    font-size: 1.1em;
    font-weight: bold;
}

.summary-item.grand-total {
    background-color: #1abc9c;
    color: #2c3e50;
    grid-column: 1 / -1; /* Span full width */
    margin-top: 10px;
}
.summary-item.grand-total strong {
    color: #2c3e50;
}


/* Details Section Styles */
#cs-details-container {
    /* Container for all faction groups */
}

/* Reuse recipe-group for faction collapsible styling */
.cs-faction-group {
    margin-bottom: 15px;
    /* inherits border, etc. from .recipe-group */
}

/* Reuse recipe-group-header for faction header styling */
.cs-faction-group .recipe-group-header {
    background-color: #34495e; /* Faction header color */
    border-left: 4px solid #3498db; /* Faction border color */
}

.cs-faction-group .recipe-group-header:hover {
    background-color: #4a627a;
}

/* Tier Group Styling */
.cs-tier-group {
    margin: 15px; /* Indent tiers within faction */
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid #4a627a;
    border-radius: 4px;
}

.cs-tier-title {
    margin: 0 0 15px 0;
    color: #e67e22; /* Tier title color */
    font-size: 1.1em;
    border-bottom: 1px dashed #4a627a;
    padding-bottom: 8px;
}

.cs-table-container {
    max-height: 400px; /* Limit table height and make scrollable */
    overflow-y: auto;
    border: 1px solid #4a627a; /* Border around the table scroll area */
    border-radius: 4px;
}

/* Reuse summary-table for holder table styling */
.cs-holder-table {
    width: 100%;
    /* inherits styles from .summary-table */
}

.cs-holder-table th {
    background-color: #4a627a; /* Match summary table header */
    position: sticky; /* Keep headers visible on scroll */
    top: 0;
    z-index: 1;
}

.cs-holder-table td {
    /* inherits styles */
    font-size: 0.9em;
}

/* Style for owner address to make it smaller/code-like */
.owner-address {
    font-family: monospace;
    font-size: 0.85em;
    color: #95a5a6;
    word-break: break-all; /* Break long addresses */
}

/* Ensure collapse indicator works */
.cs-faction-group.collapsed .collapse-indicator {
    transform: rotate(-90deg);
}

/* Separator style (reused) */
.separator {
    border: none;
    height: 1px;
    background-color: #444;
    margin: 25px 0;
}