/* TalentMatched.com ROI Calculator Styles - Features */
/* styles-features.css - PHASE 1-3 features, validations, and guidance */

/* PHASE 1: Enhanced input validation states with benchmark validation */
.input-field.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
    background-color: #fff5f5 !important;
}

.input-field.valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
    background-color: #f8fff8 !important;
}

.input-field.warning {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2) !important;
    background-color: #fffef5 !important;
}

/* PHASE 1: Market validation feedback styling */
.input-field.market-low {
    border-color: #3182ce !important;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2) !important;
    background-color: #f7fafc !important;
}

.input-field.market-high {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
    background-color: #fff5f5 !important;
}

.input-field.market-warning {
    border-color: #dd6b20 !important;
    box-shadow: 0 0 0 2px rgba(221, 107, 32, 0.2) !important;
    background-color: #fffbeb !important;
}

.input-field.market-normal {
    border-color: #38a169 !important;
    box-shadow: 0 0 0 2px rgba(56, 161, 105, 0.2) !important;
    background-color: #f0fff4 !important;
}

/* PHASE 1: Market validation feedback element with smooth transitions */
.market-validation-feedback {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    animation: slideInFromLeft 0.3s ease-out;
    border-left: 4px solid;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.market-validation-feedback.low {
    background: #e6f3ff;
    border-left-color: #3182ce;
    color: #1e4a72;
}

.market-validation-feedback.high {
    background: #fff5f5;
    border-left-color: #e53e3e;
    color: #9b2c2c;
}

.market-validation-feedback.warning {
    background: #fffbeb;
    border-left-color: #dd6b20;
    color: #9c4221;
}

.market-validation-feedback.normal {
    background: #f0fff4;
    border-left-color: #38a169;
    color: #2f855a;
}

.market-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.market-content {
    flex: 1;
    min-width: 0; /* Prevent text overflow issues */
}

.market-message {
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.market-details {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.3;
}

.market-details .detail-line {
    margin: 2px 0;
    font-size: 0.8rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.market-details .detail-line:first-child {
    font-weight: 600;
    color: inherit;
}

.market-details .detail-line:last-child {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* PHASE 1: Benchmark validation feedback styling */
.benchmark-feedback {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    animation: slideInFromRight 0.3s ease-out;
    border: 1px solid;
}

.benchmark-feedback.above {
    background: #f0fff4;
    border-color: #9ae6b4;
    color: #276749;
}

.benchmark-feedback.below {
    background: #fffaf0;
    border-color: #fbb040;
    color: #c05621;
}

.benchmark-feedback.typical {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #4a5568;
}

.benchmark-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.benchmark-message {
    font-weight: 500;
    line-height: 1.3;
}

/* Industry validation warning with better transitions */
.industry-validation-warning {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fffbeb;
    border: 1px solid #fbb040;
    color: #c05621;
    animation: slideInFromRight 0.3s ease-out;
    opacity: 1;
    transition: all 0.3s ease;
    overflow: hidden;
    word-wrap: break-word;
}

.warning-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.warning-message {
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* PHASE 1: Field help icon with enhanced accessibility */
.input-group label .field-help-icon[role="button"]  {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    min-height: auto;
    height: 16px;
    width: 16px;
    background: #b49755;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    outline: none;
}

.field-help-icon:hover {
    background: #d4b366;
    transform: scale(1.1);
}

.field-help-icon:focus {
    outline: 2px solid #b49755;
    outline-offset: 2px;
    background: #d4b366;
}

/* PHASE 1: Enhanced field guidance system */
.field-guidance {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #b49755;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-guidance.show {
    opacity: 1;
    max-height: 400px;
    animation: expandGuidance 0.3s ease-out;
}

.field-guidance.hide {
    animation: collapseGuidance 0.3s ease-in;
}

.field-guidance:not(.show) {
    padding: 0 !important;
    border-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.guidance-section {
    margin-bottom: 0.75rem;
}

.guidance-section:last-child {
    margin-bottom: 0;
}

.guidance-title {
    font-weight: 600;
    color: #212a47;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.guidance-content {
    color: #4a5568;
    line-height: 1.5;
}

.guidance-examples {
    background: #edf2f7;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #2d3748;
}

.guidance-ranges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.guidance-range-item {
    background: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.range-label {
    font-weight: 600;
    color: #212a47;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.range-value {
    color: #4a5568;
    font-size: 0.75rem;
}

/* ENHANCED: Improved field guidance with industry context */
.guidance-industry-context {
    background: #f0f8ff;
    padding: 0.5rem;
    border-left: 3px solid #b49755;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: #2c5282;
}

.guidance-research {
    background: #f7fafc;
    padding: 0.5rem;
    border-left: 3px solid #38a169;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    color: #2d3748;
    font-style: italic;
}

/* Enhanced industry examples styling */
.industry-examples {
    font-style: italic;
    opacity: 0.9;
}

/* Research attribution styling */
.research-note {
    font-weight: 500;
    opacity: 0.85;
    color: #666;
}

/* PHASE 2: Calculator Mode Toggle System */
.calculator-mode-toggle {
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(12, 19, 44, 0.1);
    position: relative;
    z-index: 100; /* CRITICAL: Ensure above hero */
}

.mode-toggle-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(12, 19, 44, 0.15);
    border-color: #b49755;
}

.mode-btn.active {
    background: linear-gradient(135deg, #b49755 0%, #d4b366 100%);
    color: white;
    border-color: #b49755;
    box-shadow: 0 8px 25px rgba(180, 151, 85, 0.3);
}

.mode-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    display: block;
}

.mode-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.mode-btn.active .mode-title {
    color: white;
}

.mode-description {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.3;
}

.mode-btn.active .mode-description {
    color: rgba(255, 255, 255, 0.9);
}

/* PHASE 2: Mode notice styling */
.mode-notice {
    display: flex;
    align-items: center;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-left: 4px solid #38b2ac;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #234e52;
}

.notice-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
    line-height: 1.4;
}

/* PHASE 2: Field visibility control */
.input-group.basic-mode-hidden {
    display: none !important;
}

.input-group.advanced-mode-hidden {
    display: none !important;
}

/* PHASE 2: Auto-calculated field styling */
.input-field.auto-calculated {
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-color: #68d391;
    position: relative;
}

.input-field.auto-calculated::after {
    content: "🤖";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.7;
    pointer-events: none;
}

/* PHASE 2: Field transition animations for mode switching */
.input-group.mode-transition-in {
    animation: fieldFadeIn 0.4s ease-out forwards;
}

.input-group.mode-transition-out {
    animation: fieldFadeOut 0.4s ease-in forwards;
}

/* PHASE 3: Alternative Input System */
.alternative-input-toggle {
    background: transparent;
    border: 1px solid #b49755;
    color: #b49755;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 500;
}

.alternative-input-toggle:hover {
    background: #b49755;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(180, 151, 85, 0.2);
}

.alternative-input-toggle:focus {
    outline: 2px solid #b49755;
    outline-offset: 2px;
}

.toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.toggle-text {
    font-size: 0.8rem;
    line-height: 1.2;
}

/* PHASE 3: Alternative input container */
.alternative-input-container {
    margin-top: 15px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    border-left: 4px solid #b49755;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.alternative-input-container[style*="block"] {
    opacity: 1;
    max-height: 500px;
    animation: expandAlternative 0.4s ease-out;
}

.alternative-input-header {
    font-weight: bold;
    color: #212a47;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* PHASE 3: Alternative field groups */
.alternative-field-group {
    margin-bottom: 15px;
}

.alternative-field-group:last-child {
    margin-bottom: 0;
}

.alternative-field-group label {
    display: block;
    font-weight: 600;
    color: #212a47;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.alternative-select,
.alternative-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #212a47;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.alternative-select:focus,
.alternative-input:focus {
    outline: none;
    border-color: #b49755;
    box-shadow: 0 0 0 3px rgba(180, 151, 85, 0.1);
}

/* PHASE 3: Alternative calculation feedback */
.alternative-calculation-feedback {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px 12px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-left: 4px solid #38a169;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #276749;
    animation: slideInFeedback 0.3s ease-out;
}

.feedback-icon {
    font-size: 1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.feedback-text {
    flex: 1;
    font-weight: 500;
}

.calculated-value {
    font-weight: bold;
    color: #22543d;
    margin-left: 8px;
}

/* PHASE 3: Calculated from alternative styling */
.input-field.calculated-from-alternative {
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-color: #4fd1c7;
    color: #212a47;
    font-weight: 600;
}

/* UPDATED: Currency dropdown with NO BORDERS and collision prevention */
.currency-dropdown {
    position: relative;
    display: inline-block;
    min-width: 200px;
    z-index: 1000;
}

.currency-select-custom {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: none !important;
    border-radius: 8px;
    background: #f8fafc; /* TASK 1: Removed !important */
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Verdana, sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 44px !important;
    min-width: 180px !important;
}

.currency-select-custom:hover {
    background: #edf2f7; /* TASK 1: Removed !important */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.currency-select-custom:focus {
    outline: 3px solid #b49755 !important;
    outline-offset: 2px !important;
    background: #f7fafc; /* TASK 1: Removed !important */
}

.currency-select-custom.open {
    background: #edf2f7; /* TASK 1: Removed !important */
    box-shadow: 0 0 0 3px rgba(180, 151, 85, 0.1);
}

/* Base flag styling */
.currency-flag {
    width: 24px;
    height: 16px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 2px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 8px;
    /* Smooth transitions for flag changes */
    transition: background-image 0.2s ease-in-out;
}

/* Currency-specific flag backgrounds */
.currency-flag[data-currency="gbp"] {
    content: url('/wp-content/themes/bb-theme-child/flags/gbp.svg');
}

.currency-flag[data-currency="usd"] {
    content: url('/wp-content/themes/bb-theme-child/flags/usd.svg');
}

.currency-flag[data-currency="eur"] {
    content: url('/wp-content/themes/bb-theme-child/flags/eur.svg');
}

/* Fallback for missing or unset currency */
.currency-flag:not([data-currency]),
.currency-flag[data-currency=""] {
    background-image: none;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

/* Error state - when flag image fails to load */
.currency-flag::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* Text fallback for completely missing flags */
.currency-flag[data-currency]:empty::after {
    content: attr(data-currency);
    font-size: 10px;
    font-weight: bold;
    color: #666;
    line-height: 16px;
    text-align: center;
    display: block;
    text-transform: uppercase;
}

/* Responsive sizing for different contexts */
.currency-flag.small {
    width: 16px;
    height: 12px;
    margin-right: 4px;
}

.currency-flag.large {
    width: 32px;
    height: 24px;
    margin-right: 12px;
}

.currency-text {
    flex: 1;
    font-weight: 600;
    color: #212a47;
}

.currency-arrow {
    margin-left: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: #f0fff4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 1px solid #b49755;
}

.currency-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: none !important;
    border-radius: 8px;
    margin-top: 4px;
    z-index: 1001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.currency-options.show {
    display: block;
    opacity: 1;
	background: #f9f9f9;
    transform: translateY(0);
}

.currency-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    min-height: 44px !important;
}

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

.currency-option:hover {
    background: #f8fafc; /* TASK 1: Removed !important */
}

.currency-option:focus {
    background: #edf2f7; /* TASK 1: Removed !important */
    outline: 2px solid #b49755;
    outline-offset: -2px;
}

.currency-option.selected {
    background: #e6fffa; /* TASK 1: Removed !important */
    color: #212a47;
    font-weight: bold;
    border-left: 4px solid #b49755;
}

.currency-option .currency-flag {
    margin-right: 12px;
    width: 24px;
    height: 18px;
}

/* Hidden input for form compatibility */
.currency-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* CR-2025-005: Progressive disclosure for long cards */
.assumption-group.has-more-content li:nth-child(n+4) {
    display: none;
}

.assumption-group.expanded li {
    display: block;
}

.show-more-toggle {
    background: transparent;
    border: 1px solid #b49755;
    color: #b49755;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.show-more-toggle:hover {
    background: #b49755;
    color: white;
}

/* Tooltip enhancements for evidence links */
.tooltip-evidence {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted #b49755;
    color: #212a47;
}

.tooltip-evidence:focus {
    outline: 2px solid #b49755;
    outline-offset: 1px;
}

.tooltiptext {
    visibility: hidden;
    width: 320px;
    background: rgba(12, 19, 44, 0.95);
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -160px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(12, 19, 44, 0.95) transparent transparent transparent;
}

.tooltip-evidence:hover .tooltiptext,
.tooltip-evidence:focus .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* PHASE 1: Focus states for validation elements */
.field-help-icon:focus {
    outline: 2px solid #b49755;
    outline-offset: 2px;
    background: #d4b366;
}