/* Reset and base styles */
.valuation-tool-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


.logo {
    width: 130px;
    margin: 20px auto;
    display: block;
}


.valuation-tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Manrope", Sans-serif;
    color: #333;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tool-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

/* Step styles */
.tool-step {
    display: none;
    padding: 20px;
}

.tool-step.active {
    display: block;
}

.tool-step h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: black;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background-color: black;
    color: white;
}

.btn.primary:hover {
    background-color: #333;
}

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

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

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Search results styles */
.search-results {
    margin-top: 20px;
}

.company-list {
    list-style: none;
}

.company-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.company-item:hover {
    background-color: #f9f9f9;
}

.company-name {
    font-weight: bold;
    color: #2c3e50;
}

.company-registry {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

/* Company details styles */
.company-details {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
    margin-bottom: 20px;
}

.company-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.company-info h5 {
    color: #34495e;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.company-info h6 {
    color: #34495e;
    margin: 15px 0 8px;
    font-size: 14px;
}

.financial-data p,
.smb-data p {
    margin: 5px 0;
    color: #444;
}

.smb-data {
    margin-top: 25px;
}

.characteristic {
    background-color: #fff;
    padding: 15px;
    border-radius: 0;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.characteristic h6 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.characteristic p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.characteristic p:last-child {
    margin-bottom: 0;
}

/* Valuation results styles */
.valuation-results {
    background-color: #f9f9f9;
    padding: 0px;
    border-radius: 0;
    margin-bottom: 20px;
}

/* Step indicators */
.step-indicators {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.step-indicator {
    width: 10px;
    height: 10px;
    border-radius: 0;
    background-color: #ddd;
    margin: 0 5px;
}

.step-indicator.active {
    background-color: black;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Error state */
.error {
    color: #e74c3c;
    padding: 10px;
    margin: 10px 0;
    background-color: #fadbd8;
    border-radius: 0;
}

/* Input toggle */
.input-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn.toggle {
    background-color: #e0e0e0;
    color: #666;
    padding: 8px 16px;
    border-radius: 0;
    transition: all 0.3s;
}

.btn.toggle.active {
    background-color: #000;
    color: white;
}

/* Input sections */
.input-section {
    display: none;
}

.input-section.active {
    display: block;
}

/* Search form specific */
.search-form .form-group {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.search-form input {
    flex: 1;
}

/* Financial table styles */
.financial-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.financial-table th {
    background-color: #f5f5f5;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    color: #2c3e50;
    font-weight: bold;
}

.financial-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.financial-table tr:hover {
    background-color: #f9f9f9;
}

.financial-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.financial-input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    /*Extrapaddingonrightforresetbutton*/border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    transition: all 0.2s ease;
}

.reset-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    display: none; /* Hidden by default */
}

.reset-button:hover {
    opacity: 1;
}

.modified-row .reset-button {
    display: block; /* Show only in modified rows */
}

.financial-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Modified row highlighting */
.modified-row {
    background-color: #f9f9f9 !important; /* Light gray instead of yellow */
}

.modified-row:hover {
    background-color: #f0f0f0 !important; /* Slightly darker gray on hover */
}

.modified-row td {
    border-bottom: 1px solid #ddd;
}

/* Rows with data */
.has-data {
    font-weight: 500;
}

.has-data td:first-child {
    color: #2c3e50;
}

tr:not(.has-data) {
    color: #95a5a6;
    font-style: italic;
}

.year-display {
    margin-bottom: 15px;
    text-align: center;
}

.year-display h4 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

.year-navigation {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.year-navigation button {
    min-width: 120px;
}

.year-navigation button:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Required fields styling */
.required-field td:first-child {
    font-weight: bold;
    color: #2c3e50;
}

.required-field td:first-child::after {
    content: " *";
    color: #000;
}

.required-field input {
    border-color: #000;
}

.required-field input:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Manual form specific */
.manual-form {
    max-width: 600px;
    margin: 0 auto;
}

.manual-form h4 {
    color: #2c3e50;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.manual-form h4:first-child {
    margin-top: 0;
}

.manual-form .form-group {
    margin-bottom: 15px;
}

.manual-form label {
    display: block;
    margin-bottom: 5px;
    color: #34495e;
}

.manual-form input,
.manual-form select,
.manual-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
}

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

.manual-form small {
    display: block;
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 4px;
}

.manual-form .form-group.inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.manual-form .form-group.inline label {
    margin-bottom: 0;
    flex-shrink: 0;
}

.manual-form .form-group.inline select {
    width: auto;
}

.manual-form input[type="number"] {
    width: 150px;
}

.manual-form input:focus,
.manual-form select:focus,
.manual-form textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.manual-form .button-group {
    margin-top: 30px;
    text-align: center;
}

/* SMB Analysis Styles */
.smb-progress {
    margin: 30px 0 50px;
}

#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
    counter-reset: step;
    padding: 0;
}

#progressbar li {
    list-style-type: none;
    color: #c0c0c0;
    text-transform: normal;
    font-size: 12px;
    width: 20%;
    float: left;
    position: relative;
    font-size: 16px;
    font-family: "Manrope", Sans-serif;
    text-align: center;
}

#progressbar li:before {
    content: counter(step);
    counter-increment: step;
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block;
    font-size: 14px;
    color: #fff;
    background: #c0c0c0;
    border-radius: 0;
    margin: 0 auto 10px auto;
    font-weight: bold;
}

#progressbar li:after {
    content: "";
    width: 100%;
    height: 2px;
    background: #666;
    position: absolute;
    left: -50%;
    top: 15px;
    z-index: -1;
}

#progressbar li:first-child:after {
    content: none;
}

#progressbar li.active {
    color: #000;
    font-weight: bold;
}

#progressbar li.active:before,
#progressbar li.active:after {
    background: #000;
    color: white;
}

.smb-substep {
    display: none;
    animation: fadeIn 0.3s ease;
}

.smb-substep.active {
    display: block;
}

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

.step-header {
    margin-bottom: 30px;
}

.step-header h4 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 10px;
}

.step-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 0;
    border-left: 4px solid #000;
}

.step-info p {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.textarea-container {
    position: relative;
    margin-bottom: 20px;
}

.textarea-container textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s ease;
    resize: vertical;
}

.textarea-container textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 5px;
}

.textarea-help-text {
    display: block;
    color: #666;
    font-size: 15px;
    margin: 8px 0;
    line-height: 1.4;
    font-style: normal;
}

.char-counter {
    font-size: 12px;
    color: #95a5a6;
}

.tooltip-icon {
    cursor: help;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tooltip-icon:hover {
    opacity: 1;
}

.slider-container {
    position: relative;
    padding: 10px 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #eee;
    border-radius: 0;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: white;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 12px;
}

.value-indicator {
    margin-top: 20px;
}

.indicator-bar {
    background: #f8f9fa;
    border-radius: 0;
    padding: 10px;
}

.indicator-segments {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.segment {
    padding: 4px 8px;
    border-radius: 0;
    color: white;
}

.segment.good { background: #000; }
.segment.medium { background: #666; }
.segment.high { background: #000; }    /* High should be black (best) for recurring revenue */
.segment.low { background: #333; }     /* Low should be dark gray (worst) */

.smb-navigation {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator {
    color: #666;
    font-size: 14px;
}

/* Success message */
.success {
    color: #27ae60;
    padding: 10px;
    margin: 10px 0;
    background-color: #d4f5e2;
    border-radius: 0;
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.spinner {
    width: 30px;
    height: 30px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 2s linear infinite;
    perspective: 800px;
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.8;
}

.cube-face:nth-child(1) { /* front */
    transform: translateZ(15px);
}

.cube-face:nth-child(2) { /* back */
    transform: rotateY(180deg) translateZ(15px);
}

.cube-face:nth-child(3) { /* right */
    transform: rotateY(90deg) translateZ(15px);
}

.cube-face:nth-child(4) { /* left */
    transform: rotateY(-90deg) translateZ(15px);
}

.cube-face:nth-child(5) { /* top */
    transform: rotateX(90deg) translateZ(15px);
}

.cube-face:nth-child(6) { /* bottom */
    transform: rotateX(-90deg) translateZ(15px);
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
    .valuation-tool-container {
        padding: 10px;
    }

    .tool-step {
        padding: 15px;
    }

    .search-form .form-group {
        flex-direction: column;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
}
