/* Frontend Styles */
:root {
    --ds-primary: #F2F3EF;
    --ds-light: #FFF;
    --ds-grey-light: #F5F7FA;
    --ds-grey: #E0E5EC;
    --ds-text: #54595F;
    --ds-text-light: #464C5A;
    --ds-accent: #a1937e;
    --ds-shadow-soft: 0 5px 15px rgba(0,0,0,.05);
    --ds-shadow-inner: inset 2px 2px 5px rgba(0,0,0,.05), inset -2px -2px 5px rgba(255,255,255,.8);
    --ds-border: 1px solid rgba(0,0,0,.1);
}

.ds_valuation-container {
    width: 100%;
    max-width: 800px;
    background: var(--ds-light);
    border-radius: 20px;
    box-shadow: var(--ds-shadow-soft);
    overflow: hidden;
    position: relative;
    margin: 2rem auto;
    border: var(--ds-border);
}

.ds_valuation-header {
    background: var(--ds-light);
    padding: 20px 30px;
    color: var(--ds-text);
    position: relative;
    overflow: hidden;
    border-bottom: var(--ds-border);
}

.ds_header-content {
    position: relative;
    z-index: 2;
}

.ds_header-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(193, 156, 138, 0.1));
    z-index: 1;
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

.ds_valuation-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds_valuation-title span {
    color: var(--ds-accent);
}

.ds_valuation-subtitle {
    font-size: 14px;
    color: var(--ds-text-light);
    margin-bottom: 20px;
    max-width: 500px;
}

.ds_progress-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    position: relative;
}

.ds_progress-line {
    position: absolute;
    height: 3px;
    background: var(--ds-grey);
    width: 100%;
    top: 22px;
    z-index: 1;
}

.ds_progress-line-fill {
    position: absolute;
    height: 3px;
    background: #a1937e !important;
    width: 0;
    top: 22px;
    z-index: 2;
    transition: width .4s ease;
}

.ds_progress-step {
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
}

.ds_step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ds-grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    transition: all .4s ease;
    color: var(--ds-text-light);
}

.ds_step-number::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--ds-grey);
    transition: all .4s ease;
}

.ds_progress-step.active .ds_step-number {
    background: #a1937e;
    color: var(--ds-light);
    box-shadow: 0 8px 16px rgba(193, 156, 138, 0.2);
    transform: scale(1.1);
}

.ds_progress-step.active .ds_step-number::after {
    border-color: rgba(0,0,0,.1);
}

.ds_progress-step.completed .ds_step-number {
    background: #a1937e;
    color: var(--ds-light);
}

.ds_step-label {
    font-size: 11px;
    color: #a1937e !important;
    text-align: center;
    transition: all .4s ease;
}

.ds_progress-step.active .ds_step-label {
    color: var(--ds-accent);
    font-weight: 600;
}

.ds_form-content {
    padding: 30px;
    background: var(--ds-light);
}

.ds_step-form {
    display: none;
    animation: ds_fadeIn .5s ease;
}

.ds_step-form.active {
    display: block;
}

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

.ds_step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ds-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds_step-title span {
    color: #a1937e;
}

.ds_step-description {
    font-size: 14px;
    color: var(--ds-text-light);
    margin-bottom: 20px;
    max-width: 90%;
}

.ds_form-group {
    margin-bottom: 20px;
}

.ds_form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ds-text);
}

.ds_form-input {
    width: 100%;
    border-radius: 12px;
    border: var(--ds-border);
    background: var(--ds-light);
    color: var(--ds-text);
    font-size: 14px;
    box-shadow: var(--ds-shadow-inner);
    transition: all .3s ease;
    padding: 12px 15px;
}

.ds_form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 156, 138, 0.2), var(--ds-shadow-inner);
    border-color: var(--ds-accent);
}

.ds_property-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.ds_property-type-card {
    background: var(--ds-light);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: var(--ds-shadow-soft);
    position: relative;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid var(--ds-grey);
}

.ds_property-type-card:hover {
    transform: translateY(-4px);
    border-color: var(--ds-accent);
}

.ds_property-type-card.selected {
    border-color: #a1937e;
    background: rgba(193, 156, 138, 0.05);
}

.ds_property-icon {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--ds-text);
    transition: all .3s ease;
}

.ds_property-type-card.selected .ds_property-icon {
    color: #a1937e;
}

.ds_property-type-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--ds-text);
}

.ds_range-slider {
    width: 100%;
    margin-bottom: 20px;
}

.ds_range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ds_range-min, .ds_range-max {
    font-size: 13px;
    color: var(--ds-text-light);
}

.ds_range-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-accent);
}

.ds_range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--ds-grey);
    outline: none;
    padding: 0;
    margin: 0;
}

.ds_range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a1937e !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(193, 156, 138, 0.3);
    transition: all .2s ease;
}

.ds_range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.ds_checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.ds_custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: var(--ds-text);
}

.ds_custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ds_checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--ds-light);
    border-radius: 6px;
    box-shadow: var(--ds-shadow-inner);
    border: var(--ds-border);
    transition: all .2s ease;
}

.ds_custom-checkbox:hover input ~ .ds_checkmark {
    border-color: var(--ds-accent);
}

.ds_custom-checkbox input:checked ~ .ds_checkmark {
    background-color: var(--ds-accent);
    box-shadow: 0 4px 8px rgba(193, 156, 138, 0.2);
    border-color: var(--ds-accent);
}

.ds_checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.ds_custom-checkbox input:checked ~ .ds_checkmark:after {
    display: block;
}

.ds_custom-checkbox .ds_checkmark:after {
    left: 7px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ds_form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    border-top: 1px solid var(--ds-grey);
    padding-top: 20px;
}

.ds_nav-button {
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.ds_btn-prev {
    background: var(--ds-grey-light);
    color: var(--ds-text);
    box-shadow: var(--ds-shadow-soft);
}

.ds_btn-prev:hover {
    background: var(--ds-grey);
}

.ds_btn-next, .ds_btn-submit {
    background: #54595F;
    color: #fff;
    box-shadow: 0 8px 16px rgba(193, 156, 138, 0.2);
}

.ds_btn-next:hover, .ds_btn-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(193, 156, 138, 0.3);
}

.ds_results-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    justify-content: center;
    align-items: center;
    animation: ds_fadeIn .3s ease;
}

.ds_modal-content {
    background: var(--ds-light);
    border-radius: 18px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--ds-shadow-soft);
    position: relative;
    padding: 30px;
    text-align: center;
    overflow: hidden;
    border: var(--ds-border);
}

.ds_modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    color: var(--ds-text-light);
    transition: all .3s ease;
}

.ds_modal-close:hover {
    color: var(--ds-accent);
    transform: rotate(90deg);
}

.ds_result-icon {
    width: 100px;
    height: 100px;
    background: rgba(193, 156, 138, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 50px;
    color: var(--ds-accent);
}

.ds_result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ds-text);
}

.ds_result-description {
    color: var(--ds-text-light);
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

.ds_result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.ds_result-button {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
}

.ds_btn-details {
    background: var(--ds-accent);
    color: var(--ds-light);
    border: none;
    box-shadow: 0 8px 16px rgba(193, 156, 138, 0.2);
}

.ds_btn-details:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(193, 156, 138, 0.3);
}

.ds_btn-restart {
    background: transparent;
    color: var(--ds-text);
    border: 1px solid var(--ds-grey);
}

.ds_btn-restart:hover {
    background: var(--ds-grey-light);
}

@media (max-width: 768px) {
    .ds_valuation-header { padding: 15px; }
    .ds_form-content { padding: 20px; }
    .ds_progress-tracker { margin-bottom: 15px; }
    .ds_progress-step { width: 40px; }
    .ds_step-number { width: 40px; height: 40px; font-size: 16px; }
    .ds_step-number::after { width: 32px; height: 32px; }
    .ds_step-label { font-size: 9px; }
    .ds_property-types { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .ds_property-type-card { height: 110px; padding: 12px; }
    .ds_property-icon { font-size: 26px; }
    .ds_checkbox-group { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .ds_form-navigation { flex-direction: column; gap: 10px; }
    .ds_nav-button { width: 100%; justify-content: center; }
    .ds_result-actions { flex-direction: column; gap: 10px; }
    .ds_result-button { width: 100%; }
}

/* Range slider base styling */
.ds_range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    cursor: pointer;
}

/* Remove default focus outline */
.ds_range-input:focus {
    outline: none;
}

/* Default track background (will be overridden by JavaScript) */
.ds_range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e5e5e5;
    border-radius: 3px;
    border: none;
    box-shadow: none;
}

/* Webkit browsers - Thumb */
.ds_range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c19c8a;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(193, 156, 138, 0.4);
    transition: all 0.2s ease;
    margin-top: -7px; /* Center the thumb on the track */
    border: 2px solid #ffffff;
}

.ds_range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(193, 156, 138, 0.5);
}

/* Firefox - Track */
.ds_range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e5e5e5;
    border-radius: 3px;
    border: none;
    box-shadow: none;
}

/* Firefox - Thumb */
.ds_range-input::-moz-range-thumb {
    border: 2px solid #ffffff;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #c19c8a;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(193, 156, 138, 0.4);
    transition: all 0.2s ease;
}

.ds_range-input::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(193, 156, 138, 0.5);
}

/* Style for min/max input fields */
.ds_range-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ds_range-min-input,
.ds_range-max-input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.2s ease;
}

.ds_range-min-input:focus,
.ds_range-max-input:focus {
    outline: none;
    border-color: #c19c8a;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(193, 156, 138, 0.1);
}

.ds_range-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Hide number input spinners for cleaner look */
.ds_range-min-input::-webkit-outer-spin-button,
.ds_range-min-input::-webkit-inner-spin-button,
.ds_range-max-input::-webkit-outer-spin-button,
.ds_range-max-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ds_range-min-input[type=number],
.ds_range-max-input[type=number] {
    -moz-appearance: textfield;
}
