/* public/assets/css/employment.css */

.page-employment {
    padding: 24px 0 40px;
}

.page-employment .page-header {
    margin-bottom: 24px;
}

.page-employment .page-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.page-employment .page-subtitle {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Layout: form first, list below */
.employment-layout {
    display: block;
}

.employment-form-card {
    max-width: 420px;
}

/* Card shells */
.employment-card,
.employment-form-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e3e3e8;
    padding: 16px 18px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Spacing between form and list */
.employment-list-section {
    margin-top: 24px;
}

/* Summary metrics row */
.employment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 4px;
}

.employment-summary-item {
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.employment-summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.employment-summary-value {
    margin-top: 2px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Chart filters (All positions / single position) */
.employment-chart-filters {
    margin: 8px 0 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.employment-chart-filters-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.employment-chart-filters-select {
    font: inherit;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

/* Chart card */
.employment-chart-card {
    margin-top: 16px;
    margin-bottom: 12px;
    padding: 10px 14px 14px;
    border-radius: 8px;
    border: 1px solid #e3e3e8;
    background: #ffffff;
}

.employment-chart-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

#employment-salary-chart,
#employment-comp-chart {
    width: 100%;
    max-height: 260px;
    display: block;
}

/* Donut legend */
.employment-donut-legend {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 0.8rem;
    color: #374151;
}

.employment-donut-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.employment-donut-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
    background: #d1d5db;
}

/* Form fields */
.employment-form-card h2 {
    font-size: 1.15rem;
    margin: 0 0 12px;
}

.form-field {
    margin-bottom: 10px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
    width: 100%;
    font: inherit;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
}

.form-field textarea {
    resize: vertical;
    min-height: 60px;
}

.employment-form-actions {
    margin-top: 8px;
}

.employment-form-actions button {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.employment-form-actions button:hover {
    background: #1d4ed8;
}

/* Position cards */
.employment-card {
    margin-bottom: 16px;
}

.employment-card h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.employment-meta {
    margin: 2px 0;
    font-size: 0.9rem;
    color: #555;
}

.employment-meta-strong {
    font-weight: 500;
}

.employment-meta .icon.icon-1 {
    width: 1em;
    height: 1em;
    stroke-width: 2;
    font-size: 1em;
}

.employment-notes {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #555;
}

/* Events table */
.employment-card h4 {
    margin: 14px 0 6px;
    font-size: 0.95rem;
}

.employment-events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.employment-events-table th,
.employment-events-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #e5e7eb;
}

.employment-events-table th {
    text-align: left;
    font-weight: 500;
    background: #f9fafb;
}

.employment-events-table td.text-right {
    text-align: right;
}

/* Add event expander */
.employment-card details {
    margin-top: 8px;
}

.employment-card summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #2563eb;
}

.employment-card summary::-webkit-details-marker {
    display: none;
}

.employment-card summary::before {
    content: "▸ ";
    font-size: 0.75rem;
}

.employment-card details[open] summary::before {
    content: "▾ ";
}

/* Inline/danger buttons */
.employment-inline-form {
    display: inline;
}

.employment-danger-button {
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.75rem;
    cursor: pointer;
}

.employment-danger-button:hover {
    background: #b91c1c;
}

/* Kebab menu in Actions column */
.employment-actions {
    text-align: right;
    white-space: nowrap;
}

.employment-kebab {
    position: relative;
    display: inline-block;
}

.employment-kebab-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
}

.employment-kebab-btn:hover {
    background: #f3f4f6;
}

.employment-kebab-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 120px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 4px 0;
    z-index: 20;
    display: none;
}

.employment-kebab.open .employment-kebab-menu {
    display: block;
}

.employment-kebab-menu button {
    display: flex;
    min-width: 10rem;
    align-items: center;
    padding: 4px 10px;
    border: 0;
    background: #ffffff;
    font-size: 0.8rem;
    cursor: pointer;
    margin: 0;
    line-height: 1.4285714286;
    gap: .5rem;
    width: 100%;
    clear: both;
    font-weight: 400;
    text-align: inherit;
    white-space: nowrap;
}

.employment-kebab-menu button:hover {
    background: #f3f4f6;
}

.employment-kebab-menu hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 4px 0;
}

.employment-kebab-danger {
    color: #b91c1c;
}

/* Inline editing: hide inputs by default, show only when row is editing */
.employment-events-table .edit-input {
    display: none;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8rem;
}

.employment-events-table .display {
    display: inline;
}

.employment-events-table tr.is-editing .display {
    display: none;
}

.employment-events-table tr.is-editing .edit-input {
    display: inline-block;
}

/* Other Adj. edit layout: label + % side by side. */
.employment-other-adj .edit-input {
    width: 68%;
    box-sizing: border-box;
    margin-right: 4px;
}

.employment-other-adj .employment-other-adj-percent {
    width: 28%;
    margin-right: 0;
}

/* Current position / current row indicators */
.badge-current-position {
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 500;
}

.employment-current-row {
    background: #ecfdf3;
}

.employment-current-row:hover {
    background: #dcfce7;
}

.employment-duration {
    font-weight: 500;
}
/* Position scope filters (All / Active / Past) */
.employment-position-filters {
    margin: 0 0 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6b7280;
}

.employment-position-filters-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.employment-position-filter-pill {
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    text-decoration: none;
    color: #374151;
    font-size: 0.8rem;
}

.employment-position-filter-pill:hover {
    background: #e5e7eb;
}

.employment-position-filter-pill.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}