/**
 * Philippine Freelancer Rate Calculator
 * Mobile-First Responsive CSS Framework
 */

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Accessible Color Scheme with Proper Contrast Ratios */
:root {
    --primary-color: #2563eb;      /* Blue with 4.5:1 contrast ratio */
    --primary-dark: #1d4ed8;       /* Darker blue for hover states */
    --secondary-color: #059669;     /* Green with 4.5:1 contrast ratio */
    --secondary-dark: #047857;      /* Darker green for hover states */
    --text-color: #1f2937;         /* Dark gray with 12:1 contrast ratio */
    --text-light: #6b7280;         /* Light gray with 4.5:1 contrast ratio */
    --background: #ffffff;          /* Pure white background */
    --background-light: #f9fafb;    /* Light gray background */
    --border-color: #d1d5db;       /* Border gray with good contrast */
    --error-color: #dc2626;        /* Red with 4.5:1 contrast ratio */
    --success-color: #059669;      /* Green with 4.5:1 contrast ratio */
    --warning-color: #d97706;      /* Orange with 4.5:1 contrast ratio */
    --border-radius: 8px;     /* Consistent border radius for all elements */

    /* Typography Scale */
    --font-size-xs: 0.75rem;       /* 12px */
    --font-size-sm: 0.875rem;      /* 14px */
    --font-size-base: 1rem;        /* 16px */
    --font-size-lg: 1.125rem;      /* 18px */
    --font-size-xl: 1.25rem;       /* 20px */
    --font-size-2xl: 1.5rem;       /* 24px */
    --font-size-3xl: 1.875rem;     /* 30px */

    /* Spacing Scale */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */

    /* Border Radius */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.375rem; /* 6px */
    --radius-lg: 0.5rem;   /* 8px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* DEBUG: CSS Updated - if you see this comment in dev tools, CSS is updating */
}

/* Mobile-First Grid System */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-4);
}

.grid {
    display: grid;
    gap: var(--space-4);
    width: 100%;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }

/* Form Controls with Large Touch Targets (44px minimum) */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 44px; /* Minimum touch target size */
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:invalid,
.form-select:invalid,
.form-textarea:invalid {
    border-color: var(--error-color);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right var(--space-3) center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: var(--space-10);
}

.form-textarea {
    min-height: 88px; /* Double the minimum touch target */
    resize: vertical;
}

/* Range Slider with Large Touch Target */
.form-range {
    width: 100%;
    height: 44px; /* Large touch target */
    background: linear-gradient(to right, var(--border-color) 0%, var(--border-color) 100%);
    background-size: 100% 8px;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    border-radius: var(--radius-lg);
}

.form-range::-webkit-slider-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-lg);
    border: none;
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: -8px;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-lg);
    border: none;
    outline: none;
}

.form-range::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer Adjustments */
footer {
    margin-top: 24px;
}

/* Buttons with Large Touch Targets */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* Minimum touch target size */
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: var(--text-color);
    background-color: var(--background);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--background-light);
}

.btn-success {
    color: white;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

/* Form Step Navigation */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* Progress Indicator */
.progress-indicator {
    margin-bottom: var(--space-8);
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--background-light);
    border-left: 4px solid var(--primary-color);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-light);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: var(--background);
}

.step-label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Horizontal progress for larger screens */
@media (min-width: 768px) {
    .progress-steps {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 var(--space-4);
    }

    .progress-step {
        flex-direction: column;
        text-align: center;
        flex: 1;
        position: relative;
        padding: var(--space-2);
        background: transparent;
        border-left: none;
    }

    .progress-step.active {
        background: transparent;
        border-left: none;
    }

    .progress-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 16px;
        left: 60%;
        right: -40%;
        height: 2px;
        background: var(--border-color);
        z-index: 1;
    }

    .progress-step.active:not(:last-child)::after {
        background: var(--primary-color);
    }

    .step-number {
        width: 40px;
        height: 40px;
        margin-bottom: var(--space-2);
        position: relative;
        z-index: 2;
    }

    .step-label {
        max-width: 80px;
        line-height: 1.2;
    }
}

/* Form Validation Styles */
.form-error {
    color: var(--error-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
    display: block;
}

.form-help {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
    display: block;
}

/* Card Components */
.card {
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Allow dropdown to escape card overflow */
.card-body:has(.work-type-autocomplete) {
    overflow: visible;
}

.card:has(.work-type-autocomplete .autocomplete-dropdown.show) {
    overflow: visible;
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
}

/* Step-specific color themes */
.card-header-step-1 {
    background: linear-gradient(135deg, #2a6edbff 0%, #1944a0ff 100%);
    color: white;
    border-bottom: 1px solid #1d4ed8;
}

.card-header-step-2 {
    background: linear-gradient(135deg, #06835bff 0%, #045c43ff 100%);
    color: white;
    border-bottom: 1px solid #065f46;
}

.card-header-step-3 {
    background: linear-gradient(135deg, #ee8b0aff 0%, #b16809ff 100%);
    color: white;
    border-bottom: 1px solid #cf7c0fff;
}

.card-header-step-4 {
    background: linear-gradient(135deg, #2d2f33ff 0%, #202226ff 100%);
    color: white;
    border-bottom: 1px solid #47526B;
}

.card-title, .card-subtitle {
    color: #fff;
}

/* Step number colors to match headers */
.progress-step.active .step-number-1,
.progress-step.completed .step-number-1 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.progress-step.active .step-number-2,
.progress-step.completed .step-number-2 {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.progress-step.active .step-number-3,
.progress-step.completed .step-number-3 {
    background: linear-gradient(135deg, #f69d29ff 0%, #cf7c0fff 100%);
    color: white;
}

.progress-step.active .step-number-4,
.progress-step.completed .step-number-4 {
    background: linear-gradient(135deg, #6a758fff 0%, #47526B 100%);
    color: white;
}

.card-body {
    padding: var(--space-6);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
Based on your financial needs and availability
    margin-bottom: var(--space-2);
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: white;
    margin-bottom: 0;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-error { color: var(--error-color); }
.text-success { color: var(--success-color); }
.text-muted { color: var(--text-light); }

.bg-primary { background-color: var(--primary-color); }
.bg-light { background-color: var(--background-light); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Responsive Breakpoints - Mobile First */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        padding: var(--space-6);
    }

    .grid {
        gap: var(--space-6);
    }

    .md\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

    .md\\:col-span-1 { grid-column: span 1; }
    .md\\:col-span-2 { grid-column: span 2; }
    .md\\:col-span-3 { grid-column: span 3; }

    .card-body {
        padding: var(--space-8);
    }

    .card-header {
        padding: var(--space-8);
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: var(--space-8);
    }

    .grid {
        gap: var(--space-8);
    }

    .lg\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

    .lg\\:col-span-1 { grid-column: span 1; }
    .lg\\:col-span-2 { grid-column: span 2; }
    .lg\\:col-span-3 { grid-column: span 3; }
    .lg\\:col-span-4 { grid-column: span 4; }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--text-light);
    cursor: pointer;
    padding: var(--space-2);
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: var(--space-6);
}

.modal-body .form-group {
    margin-bottom: var(--space-4);
}

.modal-body .form-actions {
    margin-top: var(--space-6);
    display: flex;
    gap: var(--space-4);
    justify-content: flex-end;
}

/* Success/Error Message Styles */
.alert {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    max-width: 400px;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

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

/* Mobile responsive modal */
@media (max-width: 640px) {
    .modal {
        padding: var(--space-2);
    }

    .modal-content {
        max-width: 100%;
    }

    .modal-body .form-actions {
        flex-direction: column;
    }

    .modal-body .form-actions .btn {
        width: 100%;
    }

    .alert {
        position: fixed;
        top: var(--space-2);
        left: var(--space-2);
        right: var(--space-2);
        max-width: none;
    }
}

/* Tooltip and Help System Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: var(--space-2);
    transition: all 0.2s ease;
    user-select: none;
}

.help-icon:hover {
    background: var(--secondary-dark);
    transform: scale(1.1);
}

.tooltip {
    position: fixed;
    background: var(--text-color);
    color: var(--background);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    white-space: nowrap;
    max-width: 300px;
    white-space: normal;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-color);
}

/* Desktop hover tooltips */
@media (min-width: 769px) {
    .tooltip-container:hover .tooltip,
    .tooltip-container:focus-within .tooltip {
        opacity: 1;
        visibility: visible;
    }
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* Help sections */
.help-section {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-4) 0;
    border-left: 4px solid var(--primary-color);
}

.help-section h4 {
    color: var(--primary-color);
    margin: 0 0 var(--space-2) 0;
    font-size: var(--font-size-base);
    font-weight: 600;
}

.help-section p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.help-section ul {
    margin: var(--space-2) 0 0 0;
    padding-left: var(--space-4);
}

.help-section li {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-1);
}

/* Expandable help sections */
.help-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: var(--space-2) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: color 0.2s ease;
}

.help-toggle:hover {
    color: var(--primary-dark);
}

.help-toggle::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.2s ease;
}

.help-toggle.expanded::before {
    transform: rotate(90deg);
}

.help-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.help-content.expanded {
    max-height: 500px;
}

/* Calculation explanation styles */
.calculation-explanation {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    margin-top: var(--space-6);
}

.calculation-explanation h3 {
    color: var(--primary-color);
    margin: 0 0 var(--space-4) 0;
    font-size: var(--font-size-lg);
}

.calculation-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--background-light);
}

.calculation-step:last-child {
    border-bottom: none;
    font-weight: 600;
    background: var(--background-light);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-3) calc(-1 * var(--space-4)) 0;
    border-radius: var(--radius-sm);
}

.calculation-label {
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.calculation-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.calculation-formula {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    font-style: italic;
    margin-top: var(--space-1);
}

/* Mobile responsive tooltips */
@media (max-width: 768px) {
    .tooltip {
        position: fixed;
        bottom: var(--space-4);
        left: var(--space-4);
        right: var(--space-4);
        transform: none;
        max-width: none;
        white-space: normal;
        z-index: 1100;
    }

    .tooltip::after {
        display: none;
    }

    .help-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .calculation-step {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }

    .calculation-value {
        align-self: flex-end;
    }
}

/* Touch-friendly tooltips for mobile */
@media (hover: none) {
    .tooltip-container:hover .tooltip {
        opacity: 0;
        visibility: hidden;
    }

    .tooltip-container.active .tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* Geography Rate Adjustment Styles */
.geography-adjustment {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-6);
    margin: var(--space-6) 0;
}

.geography-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.geography-tab {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition-duration);
    flex: 1;
    min-width: 120px;
}

.geography-tab:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
}

.geography-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.geography-content {
    display: none;
}

.geography-content.active {
    display: block;
}

.rate-display-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-6);
    text-align: center;
}

.rate-display-card h4 {
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.adjusted-rate {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: var(--space-4) 0;
    line-height: 1.2;
}

.usd-rate {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--text-light);
    font-weight: normal;
    margin-top: var(--space-2);
}

.adjustment-slider {
    margin: var(--space-6) 0;
    text-align: left;
}

.adjustment-slider label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--space-3);
}

.adjustment-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    opacity: 0.7;
    transition: opacity var(--transition-duration);
    margin: var(--space-2) 0;
}

.adjustment-slider input[type="range"]:hover {
    opacity: 1;
}

.adjustment-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.adjustment-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-top: var(--space-1);
}

.comparison-note {
    background: var(--success-color);
    color: white;
    padding: var(--space-3);
    border-radius: var(--border-radius);
    margin-top: var(--space-4);
}

.comparison-note small {
    font-size: var(--font-size-sm);
}

/* Responsive adjustments for geography section */
@media (max-width: 768px) {
    .geography-tabs {
        flex-direction: column;
    }

    .geography-tab {
        flex: none;
        text-align: center;
    }

    .adjusted-rate {
        font-size: 2rem;
    }

    .usd-rate {
        font-size: var(--font-size-base);
    }
}

/* Work Type Autocomplete Styles */
.work-type-autocomplete {
    position: relative !important;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
}

.work-type-autocomplete input {
    padding-right: 40px !important; /* Make room for clear button */
    width: 100%;
    box-sizing: border-box;
}

.clear-work-type {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    color: var(--text-light) !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: all var(--transition-duration) !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1000 !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    line-height: 1 !important;
}

.clear-work-type:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.work-type-autocomplete.has-value .clear-work-type {
    opacity: 1;
    visibility: visible;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-category {
    background: var(--background-light);
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color var(--transition-duration);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    user-select: none;
    position: relative;
    z-index: 1;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: var(--background-light);
}

.autocomplete-item.selected {
    background: var(--primary-color);
    color: white;
}

.autocomplete-item-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.autocomplete-item-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: var(--space-1);
}

.autocomplete-item.selected .autocomplete-item-name {
    color: white;
}

.autocomplete-item-category {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    text-transform: capitalize;
}

.autocomplete-item.selected .autocomplete-item-category {
    color: rgba(255, 255, 255, 0.8);
}

.autocomplete-item-rate {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
    margin-left: var(--space-2);
}

.autocomplete-item.selected .autocomplete-item-rate {
    color: rgba(255, 255, 255, 0.9);
}

.autocomplete-empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.autocomplete-show-all {
    padding: var(--space-3) var(--space-4);
    background: var(--background-light);
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
    transition: background-color var(--transition-duration);
}

.autocomplete-show-all:hover {
    background: #e0f2fe;
}

/* Loading state */
.autocomplete-loading {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.autocomplete-loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: var(--text-light);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 var(--text-light),
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 var(--text-light),
            .5em 0 0 var(--text-light);
    }
}

/* Focus styles for accessibility */
.work-type-autocomplete input:focus + .autocomplete-dropdown {
    border-color: var(--primary-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 250px;
    }

    .autocomplete-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .autocomplete-item-rate {
        margin-left: 0;
        margin-top: var(--space-1);
    }
}
/* Updated: 1753267361 */
