/* RAF-57: My Gig Profile Section Styles */
/* Following Token Balance & Garage Section Pattern */

/* Main Panel Container - matches other sections width */
#gigProfilePanel {
    /* Width inherited from modal - no override needed */
}

#gigProfileContainer {
    /* No extra padding - panel already has p-4 */
}

/* ============================================
   Profile Completion Bar (Match other sections)
   ============================================ */
.gig-profile-completion {
    margin-bottom: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #000000;
}

.profile-completion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.profile-completion-title {
    font-size: 16px;
    font-weight: 600;
}

.profile-completion-percentage {
    font-size: 20px;
    font-weight: 700;
}

.profile-completion-bar {
    height: 8px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.profile-completion-fill {
    height: 100%;
    background: #000000;
    transition: width 0.3s ease;
}

.profile-completion-reward {
    text-align: center;
    font-size: 14px;
    padding: 8px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.profile-completion-reward.claimed {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

/* ============================================
   Widget Base Styles (Garage pattern)
   ============================================ */
.gig-widget {
    margin-bottom: 12px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: visible;
}

.gig-widget.platform-widget {
    position: relative;
    z-index: 10;
}

/* Collapsible Widget Header */
.widget-header-collapsible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e0e0e0;
}

.widget-header-collapsible:hover {
    background: #f5f5f5;
}

.widget-header-collapsible h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.widget-subtitle {
    margin: 0;
    font-size: 13px;
    color: #666666;
}

.widget-toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.widget-toggle-icon svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    stroke: #374151;
}

.widget-header-collapsible:hover .widget-toggle-icon {
    background: #9ca3af;
}

.widget-toggle-icon.collapsed svg {
    transform: rotate(-90deg);
}

/* Collapsible Widget Content */
.widget-content {
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    display: block;
    position: relative;
}

#platformWidget {
    overflow: visible;
}

.widget-content:last-child {
    border-bottom: none;
}

/* ============================================
   Horizontal Week Picker with Shift Modes
   ============================================ */
.week-picker-horizontal {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 16px;
    padding: 4px 0;
}

.day-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 2px;
    background: #ffffff;
    border: 2px solid #9ca3af;  /* Visible gray border for inactive days */
    border-radius: 8px;
    transition: all 0.3s ease;
}

.day-column.active {
    background: #f8f8f8 !important;
    border: 2px solid #000000 !important;  /* Black border for active days */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure active state shows for any selected shift */
.week-picker-horizontal .day-column.active {
    border-color: #000000 !important;
}

.day-label {
    font-size: 11px;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    line-height: 1;
}

.shift-toggles {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.shift-btn {
    padding: 0;
    font-size: 18px;
    line-height: 1;
    border: 2px solid #9ca3af;  /* Visible gray border */
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

/* Hours clock wrapper - contains the visual clock and input */
.hours-clock-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The visual clock face behind the input */
.hours-clock-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Clock tick marks using pseudo-elements */
.hours-clock-face::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    /* 4 tick marks at 12, 3, 6, 9 - BLACK to match border */
    background: conic-gradient(
        from 0deg,
        #374151 0deg, #374151 6deg, transparent 6deg,       /* 12 o'clock - top */
        transparent 84deg, #374151 84deg, #374151 96deg, transparent 96deg,     /* 3 o'clock - right */
        transparent 174deg, #374151 174deg, #374151 186deg, transparent 186deg, /* 6 o'clock - bottom */
        transparent 264deg, #374151 264deg, #374151 276deg, transparent 276deg, /* 9 o'clock - left */
        transparent 354deg
    );
    /* Only show outer ring with tick marks - thicker ring */
    -webkit-mask: radial-gradient(circle, transparent 55%, black 55%, black 95%, transparent 95%);
    mask: radial-gradient(circle, transparent 55%, black 55%, black 95%, transparent 95%);
}

/* Dynamic fill segment - set via JS with conic-gradient */
.hours-clock-fill {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    transition: background 0.3s ease;
}

/* Day shift fill = blue */
.hours-clock-fill.day-fill {
    /* Will be set dynamically via JS */
}

/* Night shift fill = dark/black */
.hours-clock-fill.night-fill {
    /* Will be set dynamically via JS */
}

.hours-input {
    position: relative;
    z-index: 2;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    border: 2px solid #374151;  /* Dark gray/black border to match tick marks */
    background: transparent;
    border-radius: 50%;
    transition: all 0.2s ease;
    min-width: 36px;
    min-height: 36px;
    box-sizing: border-box;
    flex-shrink: 0;
    color: #1f2937;
    /* Hide spin buttons */
    -moz-appearance: textfield;
}

.hours-input::-webkit-outer-spin-button,
.hours-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hours-input:focus {
    outline: none;
    border-color: #000000;
    background-color: rgba(255, 255, 255, 0.7);
}

.hours-input[value="0"],
.hours-input:placeholder-shown {
    color: #6b7280;
    border-color: #9ca3af;  /* Match inactive day border */
}

.shift-btn:hover {
    background: #f9f9f9;
    border-color: #000000;
}

/* Day shift = Blue background */
.shift-btn[data-shift="day"].active {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: scale(1.05);
}

/* Night shift = Black background */
.shift-btn[data-shift="night"].active {
    background: #000000;
    border-color: #000000;
    transform: scale(1.05);
}

/* Schedule Summary */
.schedule-summary {
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 16px;
}

.schedule-stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 14px;
    color: #2d3748;
}

.stat-item strong {
    color: #1a202c;
    margin-right: 6px;
}

.stat-item span {
    font-weight: 600;
    color: #000000;
}

/* ============================================
   Platform Selector with Percentage Slider
   ============================================ */
.selected-platforms-list {
    margin: 12px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

.no-platforms {
    color: #999999;
    font-style: italic;
    font-size: 14px;
    margin: 8px 0;
    text-align: center;
}

.platform-card {
    padding: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    overflow: hidden;
}

.platform-card:hover {
    border-color: #000000;
}

.platform-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    gap: 8px;
}

/* Platform rates toggle button (small gray circle) */
.rates-toggle-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.rates-toggle-circle:hover {
    background: #d1d5db;
}

.rates-toggle-circle svg {
    stroke: #6b7280;
    transition: transform 0.2s ease;
}

.rates-toggle-circle.collapsed svg {
    transform: rotate(-90deg);
}

.rates-toggle-circle:not(.collapsed) svg {
    transform: rotate(0deg);
}

/* Platform rates content */
.platform-rates-content {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.platform-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.platform-name {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Show full platform name when rates are expanded */
.platform-card:has(.rates-toggle-circle:not(.collapsed)) .platform-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.platform-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.percentage-badge {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    background: #111111;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 6px;
    flex-shrink: 0;
}

/* Platform metrics - CSS GRID for consistent alignment */
.platform-metrics-grid-editable {
    display: grid;
    grid-template-columns: 1fr auto; /* Label takes space, input+unit fixed */
    gap: 6px 8px;
    padding: 10px 8px;
    border-top: 1px solid #f3f4f6;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.metric-row-editable {
    display: contents; /* Children participate in parent grid */
}

.metric-label-left {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px; /* Prevent ultra-long labels */
    padding: 3px 0;
}

.metric-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end; /* Right-align contents */
    min-width: 80px; /* Consistent minimum width */
}

.metric-input-small {
    width: 50px;
    min-width: 50px;
    max-width: 50px; /* Fixed width */
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    background: #ffffff;
    flex-shrink: 0;
}

.metric-input-small::-webkit-outer-spin-button,
.metric-input-small::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.metric-input-small[type=number] {
    -moz-appearance: textfield;
}

.metric-input-small:focus {
    outline: none;
    border-color: #000000;
}

.metric-unit {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    min-width: 28px; /* Consistent unit width */
    text-align: left;
}

/* Tooltip for full unit on hover */
.metric-unit[title] {
    cursor: help;
}

/* Mobile: smaller sizes */
@media (max-width: 400px) {
    .platform-metrics-grid-editable {
        gap: 4px 6px;
    }
    
    .metric-label-left {
        font-size: 10px;
        max-width: 80px;
    }
    
    .metric-input-group {
        min-width: 70px;
        gap: 2px;
    }
    
    .metric-input-small {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        font-size: 12px;
        padding: 3px 4px;
    }
    
    .metric-unit {
        font-size: 9px;
        min-width: 24px;
    }
}

.platform-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.metric-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    color: #6b7280;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f9fafb;
    border-radius: 6px;
    padding: 2px 8px;
}

.metric-input-mini {
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    transition: all 0.2s ease;
}

.metric-input-mini:focus {
    outline: none;
    background: #ffffff;
    border-radius: 4px;
}

.metric-unit {
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
    min-width: 35px;
}

@media (max-width: 480px) {
    .platform-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.remove-platform-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-platform-btn svg {
    stroke: #6b7280;
    width: 14px;
    height: 14px;
}

.remove-platform-btn:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

.remove-platform-btn:hover svg {
    stroke: #dc2626;
}

/* Platform Percentage Slider */
.platform-slider-container {
    margin-top: 20px;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.slider-labels-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 20px;
}

.platform-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #000000 0%, #000000 50%, #666666 50%, #666666 100%);
    outline: none;
    border-radius: 4px;
    margin: 12px 0;
}

.platform-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #000000;
    border: 2px solid #ffffff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.platform-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #000000;
    border: 2px solid #ffffff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.add-platform-header {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e2e8f0;
    margin-bottom: 12px;
}

.add-platform-header h5 {
    font-size: 14px;
    font-weight: 600;
    color: #111111;
    margin: 0;
}

.add-platform-container {
    margin-top: 0;
}

.btn-refresh-inline {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 6px;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.btn-refresh-inline:hover {
    background: #f3f4f6;
    border-color: #000000;
}

.btn-refresh-inline.refreshing svg {
    animation: spin 1s linear infinite;
}

.btn-refresh-inline svg {
    stroke: #6b7280;
}

.platform-search-wrapper {
    position: relative;
    width: 100%;
    /* ONE integrated component - input + button + dropdown */
}

.platform-name-input {
    width: 100%;
    padding: 12px 48px 12px 12px; /* Extra padding-right for button */
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #ffffff;
}

.platform-name-input:focus {
    outline: none;
    border-color: #000000;
    background: #f9f9f9;
}

/* Action button (triangle OR paper plane) - ALWAYS black with white icon */
.platform-action-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: #000000; /* Black background - clearly visible */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.platform-action-btn svg {
    color: #ffffff; /* White icon */
    stroke: #ffffff;
}

.platform-action-btn:hover {
    background: #374151; /* Slightly lighter black on hover */
}

.platform-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-platform {
    min-width: 60px;
}

/* Removed - using .platform-action-btn instead */

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

/* ============================================
   MY GIG STYLE Section - Engagement Slider
   ============================================ */
.engagement-slider-container {
    padding: 16px 0;
}

.engagement-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.engagement-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.engagement-option:hover {
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.engagement-option.active {
    border-color: #000000;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.engagement-emoji {
    font-size: 36px;
    line-height: 1;
}

.engagement-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    text-align: center;
}

/* Removed: multiplier badge and impact message */

/* ============================================
   Unsaved Changes Notification (Slim Bottom Bar)
   ============================================ */
.unsaved-changes-notification {
    position: fixed;
    bottom: -60px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: #1f2937; /* Dark gray */
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: bottom 0.3s ease;
    z-index: 9999;
    user-select: none;
}

.unsaved-changes-notification.show {
    bottom: 20px; /* Float above bottom */
    animation: gentleBounce 2s ease-in-out infinite;
}

.unsaved-changes-notification:hover {
    background: #374151;
}

.unsaved-changes-notification:active {
    transform: translateX(-50%) scale(0.95);
}

@keyframes gentleBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

.notification-text {
    font-size: 14px;
    letter-spacing: 0.5px;
}

.notification-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.notification-arrow {
    font-size: 14px;
    animation: pointDown 1s ease infinite;
}

@keyframes pointDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Save button pulse when visible and has unsaved changes */
.save-btn-pulse {
    animation: savePulse 1.5s ease-in-out infinite !important;
}

@keyframes savePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

/* Mobile adjustments - only adjust visible notification */
@media (max-width: 480px) {
    .unsaved-changes-notification {
        font-size: 13px;
        padding: 8px 20px;
    }
    .unsaved-changes-notification.show {
        bottom: 15px; /* Only when visible */
    }
}

/* Dark mode */
[data-theme="dark"] .unsaved-changes-notification {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    border-color: #f59e0b;
    color: #fde68a;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .engagement-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .engagement-option {
        padding: 14px 6px;
    }
    
    .engagement-emoji {
        font-size: 32px;
    }
    
    .engagement-label {
        font-size: 11px;
    }
}

/* Dark mode */
[data-theme="dark"] .engagement-option {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .engagement-option:hover {
    border-color: #ffffff;
}

[data-theme="dark"] .engagement-option.active {
    border-color: #ffffff;
    background: #374151;
}

[data-theme="dark"] .engagement-impact {
    background: #064e3b;
    border-color: #065f46;
    color: #d1fae5;
}

/* ============================================
   MY COSTS Section - Separate Styling
   ============================================ */
.cost-input-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.cost-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: block;
}

.cost-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

.cost-input:focus {
    outline: none;
    border-color: #000000;
}

.cost-input::-webkit-outer-spin-button,
.cost-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cost-input[type=number] {
    -moz-appearance: textfield;
}

/* Cost input with estimate button layout */
.cost-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.metric-source {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
    white-space: nowrap;
}

.cost-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-input-row .cost-input {
    flex: 1;
}

.cost-input.with-currency {
    padding-left: 28px;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

.cost-input-row {
    position: relative;
}

/* Estimate button - Magic wand style (black filled, white icon) */
.estimate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: #000000;
    border: 2px solid #000000;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: #ffffff;
}

.estimate-btn:hover {
    background: #333333;
    border-color: #333333;
}

.estimate-btn:active {
    background: #555555;
    transform: scale(0.95);
}

.estimate-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.estimate-btn.loading .estimate-icon {
    animation: wand-pulse 1s ease-in-out infinite;
}

@keyframes wand-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.estimate-icon {
    width: 16px;
    height: 16px;
    stroke: #ffffff !important;
}

/* Dark mode styles for cost section */
.dark-mode .cost-label {
    color: #e5e7eb;
}

.dark-mode .cost-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-mode .cost-input:focus {
    border-color: #9ca3af;
}

.dark-mode .cost-input::placeholder {
    color: #6b7280;
}

.dark-mode .metric-source {
    color: #6b7280;
}

.dark-mode .currency-prefix {
    color: #9ca3af;
}

.dark-mode .estimate-btn {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.dark-mode .estimate-btn .estimate-icon {
    stroke: #000000 !important;
}

.dark-mode .estimate-btn:hover {
    background: #e5e5e5;
}

/* Platform dropdown menu (appears directly below input, NO gap) */
.platform-dropdown-menu {
    position: absolute;
    top: calc(100% + 2px); /* 2px gap - visually connected */
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-top: none; /* Connect to input visually */
    border-radius: 0 0 8px 8px; /* Bottom corners only */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

.platform-dropdown-menu.open {
    display: block;
}

.platform-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.platform-dropdown-option:last-child {
    border-bottom: none;
}

.platform-dropdown-option:hover {
    background: #f9fafb;
}

.platform-dropdown-option .option-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.platform-dropdown-option .option-text {
    flex: 1;
    font-size: 14px;
    color: #111111;
}

.option-name {
    font-weight: 500;
    color: #111827;
}

/* ============================================
   Income Settings
   ============================================ */
.income-settings-widget {
    /* Inherits .gig-widget styles */
}

.metric-input-group {
    margin-bottom: 16px;
}

.metric-input-group:last-child {
    margin-bottom: 0;
}

.metric-input-group label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.metric-input-group input[type="number"] {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.metric-input-group input[type="number"]:focus {
    outline: none;
    border-color: #000000;
    background: #f9f9f9;
}

/* Performance Metrics removed per user request */

/* ============================================
   Mini Chat for AI Customization
   ============================================ */
.gig-mini-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 8px; /* Reduced horizontal padding for wider chat area */
    max-height: 500px;
}

.mini-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px; /* Reduced horizontal padding for wider messages */
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 250px;
    max-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-chat-welcome {
    text-align: center;
    color: #666666;
    font-size: 14px;
    padding: 20px;
}

.mini-chat-welcome p {
    margin: 8px 0;
}

.mini-chat-message {
    display: flex;
    margin-bottom: 12px;
}

.mini-chat-message.user {
    justify-content: flex-end;
}

.mini-chat-message.assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 85%; /* Increased from 80% for wider messages */
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-bubble {
    background: #000000;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.assistant-bubble {
    background: #f0f0f0;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.mini-chat-message.typing .assistant-bubble {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mini-chat-input-container {
    display: flex;
    gap: 8px;
}

.mini-chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #000000;
    transition: all 0.2s ease;
}

.mini-chat-input:focus {
    outline: none;
    background: #f9f9f9;
}

.mini-chat-send-btn {
    padding: 10px 16px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.mini-chat-send-btn:hover {
    background: #ffffff;
    color: #000000;
}

.mini-chat-send-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Action Buttons
   ============================================ */
.gig-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.btn-save-gig {
    width: 100%;
    padding: 12px 20px;
    background: #000000;
    color: white;
    border: 2px solid #000000;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-gig:hover:not(:disabled) {
    background: #ffffff;
    color: #000000;
}

.btn-save-gig:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-save-gig:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 16px;
    background: white;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #000000;
    color: white;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .metric-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .add-platform-container {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .gig-widget {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .widget-header h4 {
        font-size: 16px;
    }
    
    .widget-subtitle {
        font-size: 13px;
    }
}

/* Week picker sizing is handled dynamically via JavaScript */

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .gig-widget {
        background: #2d3748;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .widget-header h4 {
        color: #f7fafc;
    }
    
    .widget-subtitle {
        color: #cbd5e0;
    }
    
    .day-column {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .day-column.active {
        background: #2c5282;
        border-color: #4299e1;
    }
    
    .shift-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .shift-btn:hover {
        background: #4a5568;
    }
    
    .hours-input {
        background-color: transparent;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .hours-input:focus {
        background-color: rgba(45, 55, 72, 0.7);
        border-color: #63b3ed;
    }
    
    .hours-input[value="0"],
    .hours-input:placeholder-shown {
        color: #718096;
        border-color: #4a5568;
    }
    
    .hours-clock-face::before {
        background: conic-gradient(
            from 0deg,
            #a0aec0 0deg, #a0aec0 6deg, transparent 6deg,
            transparent 84deg, #a0aec0 84deg, #a0aec0 96deg, transparent 96deg,
            transparent 174deg, #a0aec0 174deg, #a0aec0 186deg, transparent 186deg,
            transparent 264deg, #a0aec0 264deg, #a0aec0 276deg, transparent 276deg,
            transparent 354deg
        );
    }
    
    .hours-clock-fill {
        opacity: 0.5;
    }
    
    .schedule-summary {
        background: #1a202c;
    }
    
    .metric-input-group input[type="number"] {
        background: #1a202c;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .platform-dropdown {
        background: #1a202c;
        border-color: #4a5568;
        color: #f7fafc;
    }
}

/* ============================================
   Animation Classes
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gig-widget {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   Accessibility
   ============================================ */
.shift-btn:focus,
.platform-dropdown:focus,
.metric-input-group input:focus,
.btn-save-gig:focus,
.btn-secondary:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.remove-platform-btn:focus {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* ============================================
   Section Spinner Overlay (Full Gig Profile)
   ============================================ */
.gig-section-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.gig-section-spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.gig-section-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: gig-spin 1s linear infinite;
}

.gig-spinner-message {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    text-align: center;
    margin: 0;
}

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

/* ============================================
   Platform Section Spinner (Smaller)
   ============================================ */
.gig-platform-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 4px;
}

.gig-platform-spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.gig-platform-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: gig-spin 1s linear infinite;
}

/* Simple toast fallback animation */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Dark mode spinner support */
@media (prefers-color-scheme: dark) {
    .gig-section-spinner-overlay,
    .gig-platform-spinner-overlay {
        background: rgba(26, 32, 44, 0.9);
    }
    
    .gig-section-spinner,
    .gig-platform-spinner {
        border-color: #4a5568;
        border-top-color: #ffffff;
    }
    
    .gig-spinner-message {
        color: #f7fafc;
    }
}

/* ============================================
   Initial Loading Spinner (Full Section)
   ============================================ */
.gig-initial-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 200px;
}

.gig-initial-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: gig-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.gig-initial-loading-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

/* ============================================
   Custom Confirm Modal (replaces browser native)
   ============================================ */
.gig-confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.gig-confirm-modal-overlay.fade-out {
    animation: fadeOut 0.2s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.gig-confirm-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gig-confirm-message {
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    text-align: center;
    margin-bottom: 20px;
}

.gig-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.gig-confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.gig-confirm-cancel {
    background: #f3f4f6;
    color: #374151;
}

.gig-confirm-cancel:hover {
    background: #e5e7eb;
}

.gig-confirm-ok {
    background: #1f2937;
    color: #ffffff;
}

.gig-confirm-ok:hover {
    background: #374151;
}

.gig-confirm-ok:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode confirm modal */
[data-theme="dark"] .gig-confirm-modal {
    background: #1f2937;
}

[data-theme="dark"] .gig-confirm-message {
    color: #f3f4f6;
}

[data-theme="dark"] .gig-confirm-cancel {
    background: #374151;
    color: #e5e7eb;
}

[data-theme="dark"] .gig-confirm-cancel:hover {
    background: #4b5563;
}

[data-theme="dark"] .gig-confirm-ok {
    background: #10b981;
    color: #ffffff;
}

[data-theme="dark"] .gig-confirm-ok:hover {
    background: #059669;
}

/* ============================================
   Toast Notifications (AI Agent feedback)
   ============================================ */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.gig-toast {
    animation: slideIn 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.gig-toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gig-toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gig-toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gig-toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ============================================
   Animated Loading Indicator for Mini Chat
   ============================================ */
.animated-loading .loading-bubble {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.animated-loading .loading-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.animated-loading .loading-text {
    font-size: 13px;
    color: #1f2937;
    animation: fadeInOut 3s ease-in-out infinite;
}

.animated-loading .loading-dots {
    display: flex;
    gap: 4px;
}

.animated-loading .loading-dots .dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.animated-loading .loading-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.animated-loading .loading-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

.animated-loading .loading-progress-bar {
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.animated-loading .loading-progress-fill {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6, #10b981);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressSlide 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes progressSlide {
    0% {
        width: 10%;
        margin-left: 0;
        background-position: 0% 50%;
    }
    50% {
        width: 60%;
        margin-left: 20%;
        background-position: 100% 50%;
    }
    100% {
        width: 10%;
        margin-left: 90%;
        background-position: 0% 50%;
    }
}

/* ============================================
   Multi-Platform Slider (Draggable Dividers)
   ============================================ */
.multi-platform-slider {
    margin: 16px 0;
    padding: 8px 0;
}

.slider-track {
    position: relative;
    height: 28px;
    background: #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.slider-segment {
    position: absolute;
    top: 0;
    height: 100%;
    transition: width 0.1s ease, left 0.1s ease;
    border-radius: 0;
}

/* All segments get rounded ends via track overflow:hidden */
/* First segment needs left rounding */
.slider-segment[data-platform-index="0"] {
    border-radius: 14px 0 0 14px;
}

/* Last segment needs right rounding - handled dynamically */
.slider-segment:last-of-type {
    border-radius: 0 14px 14px 0;
}

/* Single segment gets both rounded */
.slider-segment:only-of-type {
    border-radius: 14px;
}

.slider-divider {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 32px;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-handle {
    width: 6px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #374151;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-divider:hover .divider-handle {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.slider-divider.dragging .divider-handle {
    transform: scale(1.2);
    background: #3b82f6;
    border-color: #1d4ed8;
}

.slider-labels {
    position: relative;
    height: 40px;
    margin-top: 8px;
}

.slider-platform-label {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    transition: left 0.1s ease;
}

.label-emoji {
    font-size: 18px;
    margin-bottom: 2px;
}

.label-percent {
    font-weight: 600;
    color: #374151;
}

/* ============================================
   Custom Rate Form - High Contrast Black/White
   ============================================ */
.add-custom-rate-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #d1d5db;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.add-custom-rate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #000000;
    border: none;
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-custom-rate-btn:hover {
    background: #333333;
}

.add-custom-rate-btn svg {
    stroke: #ffffff !important;
    width: 12px;
    height: 12px;
}

.add-custom-rate-btn span {
    color: #ffffff !important;
}

/* Custom Rate Form - Fits inside platform card */
.custom-rate-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Row 1: Rate name (full width) */
.custom-rate-row:first-child {
    margin-bottom: 8px;
}

.custom-rate-row {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.custom-rate-name {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #000000;
    box-sizing: border-box;
}

.custom-rate-name::placeholder {
    color: #9ca3af;
    font-size: 11px;
}

.custom-rate-name:focus {
    border-color: #000000;
}

/* Row 2: Value + Unit (side by side) */
.custom-rate-value {
    width: 55px;
    min-width: 55px;
    flex-shrink: 0;
    padding: 8px 4px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #000000;
    box-sizing: border-box;
    text-align: center;
}

.custom-rate-value::placeholder {
    color: #9ca3af;
}

.custom-rate-value:focus {
    border-color: #000000;
}

/* Unit Dropdown - Compact */
.unit-dropdown-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.unit-input-group {
    display: flex;
    align-items: stretch;
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.unit-text-input {
    flex: 1;
    min-width: 30px;
    padding: 0 6px;
    border: none;
    font-size: 12px;
    background: #ffffff;
    color: #000000;
    outline: none;
    text-align: center;
    box-sizing: border-box;
}

.unit-text-input::placeholder {
    color: #9ca3af;
}

.unit-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    padding: 0;
    border: none;
    border-left: 1px solid #e5e7eb;
    background: #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.unit-dropdown-btn:hover {
    background: #e5e7eb;
}

.unit-dropdown-btn:hover {
    background: #f3f4f6;
}

.unit-dropdown-btn svg {
    stroke: #000000;
}

.unit-dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    min-width: 90px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

.unit-dropdown-menu.open {
    display: block;
}

.unit-dropdown-option {
    padding: 8px 10px;
    font-size: 12px;
    color: #000000;
    cursor: pointer;
    transition: background 0.1s ease;
    border-bottom: 1px solid #f3f4f6;
}

.unit-dropdown-option:last-child {
    border-bottom: none;
}

.unit-dropdown-option:hover {
    background: #f3f4f6;
}

.unit-dropdown-option.selected {
    background: #000000;
    color: #ffffff;
}

/* Actions row - centered, compact */
.custom-rate-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

/* Cancel button - darker gray for contrast */
.custom-rate-cancel {
    padding: 8px 16px;
    background: #9ca3af !important;
    border: 1px solid #6b7280 !important;
    border-radius: 4px;
    color: #000000 !important;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-rate-cancel:hover {
    background: #6b7280 !important;
    border-color: #4b5563 !important;
}

/* Add button */
.custom-rate-save {
    padding: 8px 16px;
    background: #000000 !important;
    border: 1px solid #000000 !important;
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-rate-save:hover {
    background: #333333 !important;
}

/* Field labels/examples */
.custom-rate-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 3px;
    display: block;
}

