:root {
    --primary-orange: #ff7849;
    --text-color: #2c3e50;
    --background-color: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #cbd5e1;
    --error-color: #dc2626;
    --popup-overlay: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content {
    max-width: 400px;
    width: 100%;
    text-align: center;
    padding: 2rem;
}

h1 {
    font-size: 1.8rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    text-align: center;
}

.house-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.input-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.input-field,
.select-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    margin-bottom: 0.25rem;
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    font-size: 1rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: var(--background-color);
    padding: 0 0.25rem;
    transform-origin: left top;
}

.input-field:focus+.floating-label,
.input-field:not(:placeholder-shown)+.floating-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-orange);
    font-weight: 500;
    transform: scale(1);
}

.input-field:focus+.floating-label {
    color: var(--primary-orange);
}

.input-field[readonly]+.floating-label {
    color: #6b7280;
}

.input-field[readonly]:focus+.floating-label,
.input-field[readonly]:not(:placeholder-shown)+.floating-label {
    color: #6b7280;
}


.select-field {
    background-color: white;
}

.input-field:focus,
.select-field:focus {
    outline: none;
    border-color: var(--input-focus);
}

.select-field:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    text-align: right;
}

.start-button {
    width: 100%;
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.start-button:hover {
    background-color: #e66a3e;
}

.start-button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.start-button:disabled:hover {
    background-color: #cbd5e1;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--popup-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.popup-text {
    margin-bottom: 1rem;
}

.confirmation-address {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-orange);
}

.confirmation-text {
    margin-bottom: 1.5rem;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.change-button,
.proceed-button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.change-button {
    background-color: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
}

.proceed-button {
    background-color: var(--primary-orange);
    border: none;
    color: white;
}

.change-button:hover {
    background-color: rgba(255, 120, 73, 0.1);
}

.proceed-button:hover {
    background-color: #e66a3e;
}

.address-display {
    visibility: hidden;
    background-color: #f8fafc;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    height: 38px;
    /* Fixed height to prevent jumping */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.address-display::before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--primary-orange);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.address-display.show {
    visibility: visible;
    opacity: 1;
}

.address-display.show::before {
    opacity: 1;
}

.address-text {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 1rem);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .content {
        padding: 1.5rem;
    }

    .popup-content {
        padding: 1.5rem;
    }

    .popup-buttons {
        flex-direction: column;
    }

    .change-button,
    .proceed-button {
        width: 100%;
    }
}