/* ===================================================================
 * styles-editable-dropdowns.css
 * Purpose: Editable field styling, unit/priority dropdown colour rules
 * Extracted from styles.css during the Apr 2026 split (task #23).
 * =================================================================== */
/* Editable field styles */
.editable {
    position: relative;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.editable:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.editable-input-container {
    width: 100%;
    position: relative;
}

.editable-input {
    width: 100%;
    padding: 2px 5px;
    border: 1px solid var(--primary-color);
    border-radius: 3px;
    background-color: var(--dark-bg);
    color: var(--text-light);
    position: absolute;
    z-index: 1000;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.editable-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #555;
    border-radius: 2px;
    cursor: pointer;
}

.form-select {
    background-color: white;
    border: 1px solid #333;
    color: black;
    padding: 2px 20px 2px 5px;
    font-size: 0.875rem;
    min-width: 70px;
    background-color: var(--darker-bg);
    border-color: var(--border-color);
    color: var(--text-light);
}

/* Limit dropdown to show only one row */
.form-select {
    size: 1;
}

.form-select option {
    height: 1.5em;
    line-height: 1.5em;
}

/* For unit dropdowns specifically */
.unit-dropdown {
    size: 1;
}

.priority-select {
    width: auto;
    min-width: 90px;
    padding: 5px !important;
    border: 1px solid #ddd !important;
    color: white !important;
}

/* Priority select background colors */
.priority-select[data-value="High"] {
    background-color: #FF8A80 !important;
    color: white !important;
}

.priority-select[data-value="Medium"] {
    background-color: #FFD54F !important;
    color: black !important;
}

.priority-select[data-value="Low"] {
    background-color: #64B5F6 !important;
    color: white !important;
}

.priority-select[data-value="Finished"] {
    background-color: #81C784 !important;
    color: white !important;
}

/* Dropdown options colors */
.priority-select option[value="High"] {
    background-color: #FF8A80 !important;
    color: white !important;
}

.priority-select option[value="Medium"] {
    background-color: #FFD54F !important;
    color: black !important;
}

.priority-select option[value="Low"] {
    background-color: #64B5F6 !important;
    color: white !important;
}

.priority-select option[value="Finished"] {
    background-color: #81C784 !important;
    color: white !important;
}

/* Ensure dropdown text is always white */
.priority-select option {
    color: white !important;
}

/* Dark mode fixes for specific elements */
[data-theme="dark"] .text-muted.small {
    color: #ffffff !important;
}

[data-theme="dark"] .projects-table-card .text-muted {
    color: #000000 !important;
}

/* Upgrade page dark mode - ensure white text for all elements */
[data-theme="dark"] .addon-card .text-muted.small,
[data-theme="dark"] .addon-card small.text-muted,
[data-theme="dark"] .currency-note.text-muted.small {
    color: #ffffff !important;
}

/* Force priority dropdowns to use light mode colors in dark theme */
[data-theme="dark"] .priority-select {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    color: #212529 !important;
}

[data-theme="dark"] .priority-select[data-value="High"] {
    background-color: #FF8A80 !important;
    color: white !important;
}

[data-theme="dark"] .priority-select[data-value="Medium"] {
    background-color: #FFD54F !important;
    color: black !important;
}

[data-theme="dark"] .priority-select[data-value="Low"] {
    background-color: #64B5F6 !important;
    color: white !important;
}

[data-theme="dark"] .priority-select[data-value="Finished"] {
    background-color: #81C784 !important;
    color: white !important;
}

[data-theme="dark"] .priority-select option {
    background-color: #ffffff !important;
    color: #212529 !important;
}

[data-theme="dark"] .priority-select option[value="High"] {
    background-color: #FF8A80 !important;
    color: white !important;
}

[data-theme="dark"] .priority-select option[value="Medium"] {
    background-color: #FFD54F !important;
    color: black !important;
}

[data-theme="dark"] .priority-select option[value="Low"] {
    background-color: #64B5F6 !important;
    color: white !important;
}

[data-theme="dark"] .priority-select option[value="Finished"] {
    background-color: #81C784 !important;
    color: white !important;
}

.unit-select {
    width: auto;
    min-width: 70px;
    max-width: 100px;
    padding-right: 20px;
    text-overflow: ellipsis;
}

.form-select option {
    padding: 4px;
    background-color: var(--dark-bg);
}

